:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.12), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.1), transparent 35rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans CJK SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::selection {
  background: var(--accent);
  color: #111827;
}

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

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

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

.container.narrow {
  width: min(820px, calc(100% - 32px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.18);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #facc15);
  color: #111827;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.28);
}

.brand-name {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-current,
.mobile-link.is-current {
  color: #fbbf24;
}

.search-form,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  min-width: 220px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  outline: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--text);
  padding: 11px 15px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-form button,
.mobile-search button,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.search-form button,
.mobile-search button,
.primary-button {
  background: linear-gradient(135deg, #f59e0b, #facc15);
  color: #111827;
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.22);
}

.ghost-button {
  border: 1px solid rgba(245, 158, 11, 0.36);
  background: rgba(15, 23, 42, 0.68);
  color: #fcd34d;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  padding: 9px 12px;
  font-size: 20px;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-menu.is-open {
  display: grid;
  gap: 12px;
}

.mobile-link {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-track,
.hero-slide {
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
  gap: 40px;
  align-items: center;
  padding: 70px max(32px, calc((100vw - 1180px) / 2)) 90px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-copy {
  max-width: 760px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p,
.detail-line {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.85;
}

.hero-tags,
.detail-meta,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.hero-tags span,
.detail-meta span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.center-actions {
  justify-content: center;
}

.hero-poster {
  width: min(360px, 100%);
  justify-self: end;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-controls button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.is-active {
  width: 34px;
  background: #f59e0b;
}

.section {
  padding: 68px 0;
}

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

.section-head h2,
.category-preview-head h2,
.text-page h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  font-weight: 900;
}

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

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

.movie-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.54));
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card[hidden] {
  display: none;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.28);
}

.poster-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #0f172a, #111827 52%, #1e293b);
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.06);
  opacity: 0.86;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  background: rgba(245, 158, 11, 0.92);
  color: #111827;
  padding: 7px 11px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.82);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.36);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 13px;
}

.card-desc {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  margin-top: 14px;
}

.compact-card .card-desc {
  -webkit-line-clamp: 2;
}

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

.category-card {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: end;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  padding: 22px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.42);
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: #dbeafe;
  line-height: 1.7;
  font-size: 14px;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  padding: 82px 0 64px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92)),
    radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.18), transparent 26rem);
}

.small-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.stacked-content {
  padding: 56px 0;
}

.category-preview {
  padding: 36px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
}

.filter-panel input {
  flex: 1 1 320px;
}

.filter-panel select {
  min-width: 160px;
}

.search-wide input {
  width: 100%;
}

.detail-hero {
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  min-height: 560px;
  padding-top: 64px;
  padding-bottom: 64px;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #0f172a;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #fcd34d;
}

.player-section {
  padding: 54px 0 26px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(2, 6, 23, 0.56));
  color: #111827;
  cursor: pointer;
}

.player-start span {
  display: inline-grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #fde68a);
  box-shadow: 0 20px 45px rgba(245, 158, 11, 0.35);
  font-size: 34px;
  padding-left: 5px;
}

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

.text-page {
  padding: 42px 0 58px;
}

.text-page h2 {
  margin-top: 34px;
}

.text-page h2:first-child {
  margin-top: 0;
}

.text-page p {
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 2;
  margin: 16px 0 0;
}

.related-section {
  padding-top: 20px;
}

.site-footer {
  margin-top: 34px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.86);
}

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

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 18px;
}

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

.footer-grid a:hover {
  color: #fbbf24;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .main-nav,
  .search-form {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

  .detail-hero-inner {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

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

  .header-inner {
    min-height: 64px;
  }

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

  .hero,
  .hero-track,
  .hero-slide {
    min-height: 560px;
  }

  .hero-slide {
    padding: 58px 20px 84px;
  }

  .hero h1,
  .hero h2,
  .detail-copy h1 {
    font-size: 38px;
  }

  .movie-grid,
  .category-grid,
  .preview-grid,
  .ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 13px;
  }

  .card-desc {
    display: none;
  }

  .section {
    padding: 46px 0;
  }

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

  .detail-hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: auto;
  }

  .detail-poster {
    width: min(240px, 72vw);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

@media (max-width: 440px) {
  .movie-grid,
  .category-grid,
  .preview-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}
