:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --orange-500: #f97316;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --shadow: 0 22px 45px rgba(15, 23, 42, 0.13);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-900);
  background: var(--slate-50);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark,
.footer-logo span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.35);
}

.brand strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #f87171, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: #e2e8f0;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fb7185;
}

.header-search,
.mobile-search,
.page-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.header-search input,
.mobile-search input,
.page-search input {
  width: 220px;
  min-width: 0;
  padding: 11px 16px;
  color: var(--white);
  border: 0;
  outline: 0;
  background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.page-search input::placeholder {
  color: #cbd5e1;
}

.header-search button,
.mobile-search button,
.page-search button {
  border: 0;
  color: var(--white);
  cursor: pointer;
  padding: 11px 15px;
  background: rgba(239, 68, 68, 0.95);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border: 0;
  cursor: pointer;
  color: var(--white);
  background: transparent;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  border-radius: 10px;
  background: currentColor;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.open {
  display: block;
}

.mobile-panel-inner {
  display: grid;
  gap: 14px;
  padding: 18px 0 22px;
}

.category-line {
  color: #cbd5e1;
  font-size: 14px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-700), var(--orange-500), var(--amber-400));
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(251, 191, 36, 0.34), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(127, 29, 29, 0.72), rgba(15, 23, 42, 0.24)),
    linear-gradient(0deg, rgba(248, 250, 252, 1) 0, transparent 22%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1180px) / 2));
  padding-top: 130px;
}

.hero-label,
.eyebrow {
  margin: 0 0 14px;
  color: #fed7aa;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 24px 0 0;
  color: #fff7ed;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.75;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  padding: 6px 11px;
  border-radius: 999px;
  color: #7f1d1d;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags {
  margin-top: 24px;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--red-700);
  background: var(--white);
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.2);
}

.ghost-button {
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: rgba(239, 68, 68, 0.28);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 44px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.section {
  padding: 64px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-head p:not(.eyebrow) {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--slate-500);
}

.section-head a {
  color: var(--red-600);
  font-weight: 900;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

.featured-grid,
.all-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.latest-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #7f1d1d, #f97316);
}

.poster img,
.wide-cover img,
.rank-thumb img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.movie-card:hover .poster img,
.wide-card:hover .wide-cover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent 62%);
  transition: opacity 0.22s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 9px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.badge-type {
  right: 12px;
  background: var(--red-600);
}

.badge-year {
  left: 12px;
  background: rgba(2, 6, 23, 0.72);
}

.poster-play,
.wide-cover span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 48px;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play,
.wide-card:hover .wide-cover span {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 900;
}

.compact .card-body h3 {
  min-height: 44px;
  font-size: 15px;
}

.card-body h3 a:hover {
  color: var(--red-600);
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 13px;
}

.card-meta {
  justify-content: space-between;
}

.warm-section {
  background: linear-gradient(90deg, #fff7ed, #fef3c7);
}

.wide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.wide-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.wide-cover {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  background: linear-gradient(135deg, #7f1d1d, #fb923c);
}

.wide-content {
  padding: 22px;
}

.wide-kicker {
  color: var(--red-600);
  font-size: 13px;
  font-weight: 900;
}

.wide-content h3 {
  margin: 10px 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.wide-content p {
  margin: 0 0 18px;
  color: var(--slate-600);
  line-height: 1.75;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.category-tile {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--red-700));
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.category-tile-main span {
  display: block;
  color: #fed7aa;
  font-size: 14px;
  font-weight: 900;
}

.category-tile-main strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.35;
}

.category-mini-links {
  display: grid;
  gap: 8px;
  color: #e2e8f0;
  font-size: 13px;
}

.category-mini-links a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 34px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 52px 76px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 18px;
  background: var(--white);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(248, 113, 113, 0.45);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.home-rank-list .rank-row {
  grid-template-columns: 42px 58px 1fr;
}

.home-rank-list .rank-play,
.home-rank-list .rank-meta,
.home-rank-list .rank-info p {
  display: none;
}

.rank-num {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
}

.rank-thumb {
  display: block;
  width: 76px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: #fee2e2;
}

.home-rank-list .rank-thumb {
  width: 58px;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--slate-600);
  line-height: 1.65;
}

.rank-play {
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--red-700);
  font-weight: 900;
  background: #fee2e2;
}

.page-hero {
  color: var(--white);
  padding: 92px 0;
  background:
    radial-gradient(circle at 76% 20%, rgba(251, 191, 36, 0.32), transparent 30%),
    linear-gradient(135deg, var(--slate-950), var(--red-700), var(--orange-500));
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 22px 0 0;
  color: #ffedd5;
  font-size: 18px;
  line-height: 1.8;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.local-filter {
  width: min(420px, 100%);
  padding: 13px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  outline: 0;
  color: var(--slate-900);
  background: var(--white);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.local-filter:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.12);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.pagination a {
  min-width: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  text-align: center;
  color: var(--slate-700);
  font-weight: 900;
  background: var(--white);
  border: 1px solid #e2e8f0;
}

.pagination a.active,
.pagination a:hover {
  color: var(--white);
  border-color: var(--red-600);
  background: var(--red-600);
}

.page-search {
  width: min(620px, 100%);
  margin-top: 28px;
  background: rgba(15, 23, 42, 0.68);
}

.page-search input {
  flex: 1;
  width: auto;
}

.detail-header {
  padding: 58px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 15%, rgba(251, 191, 36, 0.26), transparent 28%),
    linear-gradient(135deg, var(--slate-950), #7f1d1d 56%, var(--orange-500));
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  background: linear-gradient(135deg, #7f1d1d, #fb923c);
  box-shadow: 0 24px 58px rgba(2, 6, 23, 0.35);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #fed7aa;
  font-weight: 800;
}

.detail-info h1 {
  font-size: clamp(34px, 6vw, 66px);
}

.detail-one-line {
  max-width: 820px;
  margin: 20px 0;
  color: #fff7ed;
  font-size: 20px;
  line-height: 1.75;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.12);
}

.detail-tags {
  margin-top: 18px;
}

.detail-play-jump {
  margin-top: 26px;
}

.player-section {
  padding-top: 42px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: var(--slate-950);
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.32);
  aspect-ratio: 16 / 9;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 24px;
  border: 0;
  color: var(--white);
  cursor: pointer;
  background-size: cover;
  background-position: center;
  text-align: center;
  z-index: 2;
}

.player-cover.is-hidden {
  display: none;
}

.play-button {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  color: var(--red-700);
  font-size: 34px;
  background: var(--white);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.22);
}

.player-cover strong {
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.15;
}

.player-cover em {
  color: #fed7aa;
  font-style: normal;
  font-weight: 900;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.content-card {
  padding: 28px;
  border-radius: 26px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.content-card p {
  margin: 0;
  color: var(--slate-700);
  line-height: 1.9;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 42px;
  padding: 48px 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 22px;
}

.site-footer p {
  max-width: 460px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: var(--white);
}

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #fb7185;
}

.footer-bottom {
  padding: 18px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.js-movie-card.hidden {
  display: none;
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

  .featured-grid,
  .all-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .latest-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 840px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    padding-top: 104px;
  }

  .wide-grid,
  .detail-content,
  .footer-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 260px;
  }

  .rank-row {
    grid-template-columns: 42px 58px 1fr;
  }

  .rank-play {
    display: none;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand strong {
    font-size: 18px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .hero-content {
    width: min(100% - 24px, 760px);
    margin-left: 12px;
  }

  .section {
    padding: 44px 0;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .featured-grid,
  .latest-grid,
  .all-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p,
  .card-meta {
    display: none;
  }

  .wide-card {
    grid-template-columns: 110px 1fr;
  }

  .wide-cover {
    min-height: 160px;
  }

  .wide-content {
    padding: 16px;
  }

  .wide-content h3 {
    font-size: 18px;
  }

  .wide-content p,
  .wide-content .tag-list {
    display: none;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    display: none;
  }

  .player-card {
    border-radius: 18px;
  }

  .play-button {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }

  .rank-info p,
  .rank-meta {
    display: none;
  }
}
