:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(245, 158, 11, 0.34);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --amber-dark: #b45309;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 26rem),
    radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.14), transparent 22rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.72));
  backdrop-filter: blur(18px);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(2, 6, 23, 0.92);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.36);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(245, 158, 11, 0.13);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #ffffff;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-panel a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.mobile-panel a:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #ffffff;
}

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

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.28) 55%, rgba(2, 6, 23, 0.74) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 720px;
  margin: 0 auto;
  padding: 120px 0 76px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
  align-items: center;
  gap: 56px;
}

.hero-copy {
  max-width: 760px;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.12);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-copy p {
  max-width: 650px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.quick-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

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

.hero-tags span,
.tag-row span,
.quick-categories a,
.detail-meta span,
.meta-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
}

.hero-tags span,
.tag-row span,
.quick-categories a {
  padding: 7px 10px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 16px 42px rgba(245, 158, 11, 0.34);
}

.ghost-btn,
.section-more {
  color: #e2e8f0;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
}

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

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.hero-dot {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 56px;
  background: var(--amber);
}

.page-main {
  padding-top: 100px;
}

.page-hero,
.search-panel,
.content-section,
.detail-hero,
.player-section,
.detail-content {
  margin-top: 32px;
}

.page-hero {
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.13), transparent 36%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.page-hero h1,
.section-heading h2,
.search-panel h2 {
  margin: 12px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.page-hero p,
.search-panel p {
  max-width: 760px;
  color: #cbd5e1;
  line-height: 1.8;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.global-search {
  position: relative;
}

.global-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 17px;
  outline: none;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.78);
  padding: 0 16px;
}

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

.search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  max-height: 440px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.98);
  box-shadow: var(--shadow);
}

.search-results.open {
  display: block;
}

.search-results a {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.search-results a:hover {
  background: rgba(245, 158, 11, 0.1);
}

.search-results img {
  width: 52px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
}

.search-results strong,
.search-results span {
  display: block;
}

.search-results span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.quick-categories {
  grid-column: 1 / -1;
}

.quick-categories a:hover {
  border-color: rgba(245, 158, 11, 0.52);
  color: #ffffff;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.content-section {
  padding: 24px 0 16px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  background: var(--bg-card-strong);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
  filter: brightness(1.06);
}

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

.play-pill {
  right: 10px;
  bottom: 10px;
  padding: 7px 10px;
  color: #111827;
  background: var(--amber-light);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, var(--amber));
}

.card-body {
  padding: 15px;
}

.meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.meta-row span,
.detail-meta span {
  padding: 4px 8px;
  font-size: 12px;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--amber-light);
}

.movie-card p {
  margin: 9px 0 12px;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.tag-row span {
  padding: 5px 8px;
  color: #cbd5e1;
  font-size: 12px;
}

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

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

.category-card {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 22% 12%, rgba(245, 158, 11, 0.16), transparent 38%),
    rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.12);
  font-size: 13px;
  font-weight: 800;
}

.category-card h2 {
  margin: 18px 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 180px));
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

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

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

.breadcrumb a:hover {
  color: var(--amber-light);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.lead-text {
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.8;
}

.detail-tags {
  margin: 12px 0 24px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.76)),
    rgba(2, 6, 23, 0.22);
}

.player-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.overlay-play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.38);
  font-size: 28px;
}

.player-overlay strong {
  max-width: min(720px, 90%);
  text-align: center;
  font-size: clamp(20px, 4vw, 36px);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.detail-article {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-article h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  margin: 0;
  color: #dbe4ef;
  line-height: 2;
  font-size: 16px;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 1fr;
  gap: 32px;
}

.footer-logo {
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer a:not(.site-logo) {
  display: inline-flex;
  margin: 0 10px 10px 0;
  color: #94a3b8;
}

.site-footer a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted-2);
  text-align: center;
}

@media (max-width: 1120px) {
  .movie-grid,
  .compact-grid,
  .category-movie-grid,
  .ranking-page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .mobile-toggle {
    display: inline-block;
  }

  .hero-carousel,
  .hero-content {
    min-height: 680px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 110px;
  }

  .hero-poster {
    display: none;
  }

  .search-panel,
  .detail-grid,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 30px;
  }
}

@media (max-width: 620px) {
  .container,
  .header-inner,
  .mobile-panel,
  .footer-grid,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    height: 64px;
  }

  .site-logo span:last-child {
    font-size: 15px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 620px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .movie-card p {
    display: none;
  }

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

  .detail-article {
    padding: 22px;
  }

  .overlay-play-icon {
    width: 62px;
    height: 62px;
  }
}
