:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(245, 158, 11, 0.18);
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --orange: #fb923c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.15), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(249, 115, 22, 0.13), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.header-inner {
  max-width: 1280px;
  height: 76px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--amber-light), var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo {
  font-size: 24px;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

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

.desktop-nav a,
.mobile-panel nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  transition: 0.22s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel nav a:hover,
.mobile-panel nav a.is-active {
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.1);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 288px;
}

.top-search input,
.mobile-panel input,
.search-large input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(245, 158, 11, 0.26);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  outline: none;
  border-radius: 14px;
  padding: 11px 14px;
  transition: 0.2s ease;
}

.top-search input:focus,
.mobile-panel input:focus,
.search-large input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(251, 191, 36, 0.68);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.top-search button,
.mobile-panel button,
.search-large button {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  cursor: pointer;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  font-weight: 900;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
  padding: 9px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 6px 0;
  border-radius: 999px;
  background: var(--amber-light);
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

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

.mobile-panel nav,
.mobile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-categories a {
  color: var(--subtle);
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

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

.hero-bg::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.38) 70%, rgba(2, 6, 23, 0.82) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.15) 0%, #020617 100%);
}

.hero-content {
  max-width: 1280px;
  min-height: 78vh;
  margin: 0 auto;
  padding: 104px 24px 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 420px);
  align-items: center;
  gap: 56px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

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

.hero-copy p,
.sub-hero p,
.detail-copy p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(245, 158, 11, 0.09);
  color: #fde68a;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.btn,
.quick-actions a,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.22s ease;
}

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

.btn.ghost,
.quick-actions a,
.section-link {
  color: var(--amber-light);
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(15, 23, 42, 0.72);
}

.btn.soft {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn:hover,
.quick-actions a:hover,
.section-link:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.64);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.24);
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateY(-6deg) rotateX(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.74));
}

.hero-control {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  background: rgba(2, 6, 23, 0.52);
  backdrop-filter: blur(14px);
  padding: 10px 14px;
  border-radius: 999px;
}

.hero-control button {
  border: 0;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 22px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.3);
}

.hero-dots button.is-active {
  width: 28px;
  background: var(--amber-light);
}

.section,
.sub-hero,
.detail-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section {
  padding-top: 58px;
  padding-bottom: 58px;
}

.sub-hero {
  padding-top: 92px;
  padding-bottom: 56px;
}

.sub-hero h1 {
  font-size: clamp(38px, 5vw, 68px);
}

.sub-hero p {
  max-width: 820px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.03em;
}

.section-head.small-head {
  align-items: center;
  margin-bottom: 18px;
}

.quick-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 24px;
}

.quick-card,
.content-card,
.category-overview-card,
.filter-panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.54));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.quick-card {
  padding: 30px;
}

.intro-card h2,
.content-card h2 {
  margin: 0 0 14px;
  font-size: 32px;
}

.intro-card p,
.content-card p,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.82;
}

.mini-list {
  display: grid;
  gap: 12px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 58px 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(2, 6, 23, 0.3);
  border-radius: 16px;
  transition: 0.22s ease;
}

.mini-card:hover {
  border-color: rgba(251, 191, 36, 0.48);
  transform: translateX(4px);
}

.mini-card img {
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
}

.mini-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.13);
  color: var(--amber-light);
}

.mini-card b,
.mini-card em {
  display: block;
}

.mini-card b {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card em {
  margin-top: 6px;
  color: var(--subtle);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.category-card,
.category-overview-card {
  overflow: hidden;
  transition: 0.22s ease;
}

.category-card {
  min-height: 236px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  background: rgba(15, 23, 42, 0.72);
  border-radius: var(--radius-md);
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
  border-color: rgba(251, 191, 36, 0.46);
  transform: translateY(-4px);
}

.category-thumbs,
.category-cover {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.category-thumbs img,
.category-cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.category-card span {
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.65;
}

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

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

.movie-card {
  position: relative;
  border: 1px solid var(--line-soft);
  background: rgba(15, 23, 42, 0.7);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: 0.22s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.86);
}

.poster-link img {
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
  transition: 0.28s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.04);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(2, 6, 23, 0.78));
  opacity: 0.82;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  color: #111827;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.card-content {
  padding: 14px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--amber-light);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.movie-meta span {
  padding: 4px 7px;
  background: rgba(245, 158, 11, 0.09);
  border-radius: 999px;
}

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

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

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

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

.overview-list {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
}

.category-cover {
  margin: 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 16px;
  padding: 18px;
  margin-bottom: 24px;
}

.filter-panel label span {
  display: block;
  margin-bottom: 8px;
  color: var(--subtle);
  font-size: 13px;
  font-weight: 800;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 590px;
  isolation: isolate;
}

.detail-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) saturate(1.05);
  transform: scale(1.05);
}

.detail-inner {
  padding-top: 72px;
  padding-bottom: 68px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--subtle);
  margin-bottom: 24px;
  font-size: 14px;
}

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

.detail-top {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: center;
  gap: 44px;
}

.detail-poster {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.24);
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 3 / 4.12;
  object-fit: cover;
}

.detail-copy h1 {
  font-size: clamp(36px, 5vw, 70px);
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.detail-meta-grid span {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: rgba(2, 6, 23, 0.32);
  color: var(--muted);
}

.detail-meta-grid b {
  color: var(--amber-light);
  font-size: 12px;
}

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

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  background: #000;
}

.player-cover {
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--text);
  background: #000;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.22), rgba(2, 6, 23, 0.78));
}

.play-icon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  padding-left: 6px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  font-size: 38px;
  box-shadow: 0 20px 70px rgba(245, 158, 11, 0.42);
}

.player-cover strong {
  position: absolute;
  z-index: 2;
  left: 28px;
  bottom: 24px;
  max-width: calc(100% - 56px);
  font-size: clamp(20px, 4vw, 38px);
  text-align: left;
}

.player-shell.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
}

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

.content-card {
  padding: 26px;
}

.search-large {
  display: flex;
  max-width: 720px;
  gap: 12px;
  margin-top: 28px;
}

.search-results-section:empty {
  display: none;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
}

.footer-logo {
  font-size: 22px;
}

.footer-inner p {
  color: var(--subtle);
  line-height: 1.7;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-inner nav a {
  color: var(--muted);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 12px;
}

.footer-inner nav a:hover {
  color: var(--amber-light);
  border-color: rgba(251, 191, 36, 0.42);
}

@media (max-width: 1180px) {
  .movie-grid,
  .compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .top-search {
    min-width: 220px;
  }
}

@media (max-width: 960px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-content,
  .quick-panel,
  .detail-top,
  .category-overview-card,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    max-width: 360px;
  }

  .detail-meta-grid,
  .filter-panel,
  .detail-content-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mini-list.columns {
    grid-template-columns: 1fr;
  }

  .footer-inner nav {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 66px;
    padding: 0 16px;
  }

  .logo {
    font-size: 20px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
  }

  .section,
  .sub-hero,
  .detail-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content {
    min-height: 76vh;
    padding: 82px 16px 92px;
    gap: 28px;
  }

  .hero-copy p,
  .sub-hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .hero-poster {
    display: none;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .detail-meta-grid,
  .filter-panel,
  .detail-content-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .card-content {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p,
  .tag-row {
    display: none;
  }

  .search-large {
    flex-direction: column;
  }

  .play-icon {
    width: 72px;
    height: 72px;
    font-size: 30px;
  }
}

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

  .mini-card {
    grid-template-columns: 52px 28px minmax(0, 1fr);
  }
}
