:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-card-strong: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(245, 158, 11, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-strong: #d97706;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --radius-small: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.08), transparent 30%), var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #111827, #020617);
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), #fbbf24);
  color: #111827;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.2);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 99px;
}

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

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-nav-link {
  display: block;
  padding: 11px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.42);
}

.hero-slider {
  position: relative;
  height: 620px;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.018);
  transition: opacity 0.65s ease, transform 0.9s ease;
  pointer-events: none;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72) 43%, rgba(2, 6, 23, 0.15)), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.16) 42%, rgba(2, 6, 23, 0.32) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 92px;
  width: min(660px, calc(100% - 48px));
}

.eyebrow,
.hero-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 20px 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-content p {
  max-width: 630px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 19px;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

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

.primary-button,
.ghost-button,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.hero-search button {
  background: var(--amber);
  color: #111827;
}

.primary-button:hover,
.hero-search button:hover {
  background: var(--amber-strong);
  transform: translateY(-1px);
}

.ghost-button {
  background: rgba(15, 23, 42, 0.62);
  border-color: var(--line);
  color: #f8fafc;
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 92px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(14px);
}

.hero-controls button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.85);
  color: #f8fafc;
  cursor: pointer;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.search-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.82);
}

.search-band-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 430px);
  gap: 30px;
  align-items: center;
  padding: 44px 0;
}

.search-band h2,
.section-heading h2,
.ranking-panel h2,
.watch-header h2,
.story-card h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.035em;
}

.search-band p,
.page-hero p {
  margin: 10px 0 0;
  color: var(--muted);
}

.hero-search,
.archive-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.68);
  box-shadow: var(--shadow);
}

.hero-search input,
.archive-search input {
  width: 100%;
  min-height: 56px;
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
  color: var(--text);
}

.hero-search input::placeholder,
.archive-search input::placeholder {
  color: var(--muted-2);
}

.content-section {
  padding: 72px 0;
}

.dark-section {
  background: rgba(15, 23, 42, 0.62);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-heading a {
  color: #fbbf24;
  font-weight: 800;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.poster-play,
.detail-cover span,
.player-icon {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber);
  color: #111827;
  font-weight: 900;
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.25);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

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

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-tile img,
.category-overview-card img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-tile:hover img,
.category-overview-card:hover img {
  transform: scale(1.06);
}

.category-tile-shade,
.category-overview-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.14));
}

.category-tile-text,
.category-overview-card span {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 2;
}

.category-tile-text strong,
.category-overview-card strong {
  display: block;
  font-size: 21px;
  font-weight: 900;
}

.category-tile-text em,
.category-overview-card em {
  display: block;
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-style: normal;
}

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

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
}

.ranking-panel ol {
  display: grid;
  gap: 6px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.ranking-panel a {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-number {
  grid-row: span 2;
  color: var(--amber);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--muted);
  font-size: 12px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 58px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 34%), linear-gradient(135deg, #0f172a, #020617);
  border-bottom: 1px solid var(--line);
}

.compact-page-hero h1,
.category-page-hero h1 {
  margin: 16px 0 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.052em;
}

.archive-search {
  max-width: 640px;
  margin-top: 28px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-chip {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: #cbd5e1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: var(--line-strong);
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
}

.ranking-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
}

.ranking-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-poster span {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--amber);
  color: #111827;
  font-weight: 900;
}

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

.ranking-card h2 a:hover {
  color: var(--amber);
}

.ranking-card p {
  max-width: 760px;
  margin: 0 0 14px;
  color: var(--muted);
}

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

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

.breadcrumb strong {
  color: #cbd5e1;
}

.detail-hero {
  padding: 56px 0;
  background: radial-gradient(circle at 76% 10%, rgba(245, 158, 11, 0.18), transparent 26%), linear-gradient(135deg, #0f172a, #020617);
  border-bottom: 1px solid var(--line);
}

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

.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(38px, 6.4vw, 72px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 19px;
}

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

.detail-cover {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111827;
  box-shadow: var(--shadow);
}

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

.detail-cover span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
}

.watch-section {
  background: #020617;
}

.watch-header {
  margin-bottom: 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.72));
  color: #f8fafc;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-icon {
  width: 74px;
  height: 74px;
  font-size: 24px;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.24);
}

.player-overlay strong {
  font-size: 20px;
}

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

.story-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
}

.story-card h2 {
  margin-top: 0;
}

.story-card p {
  margin: 14px 0 0;
  color: #cbd5e1;
}

.compact-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.compact-card img {
  width: 76px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  font-weight: 850;
}

.compact-card em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #020617;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-main p {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
}

.footer-column h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

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

.footer-column a {
  color: var(--muted);
}

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

.footer-bottom {
  padding: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  text-align: center;
  font-size: 14px;
}

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

@media (max-width: 1100px) {
  .movie-grid,
  .featured-grid,
  .latest-grid,
  .related-grid,
  .archive-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .ranking-panel {
    position: static;
  }

  .detail-cover {
    max-width: 360px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-slider {
    height: 590px;
  }

  .hero-content {
    bottom: 112px;
  }

  .hero-controls {
    right: auto;
    left: 24px;
    bottom: 34px;
  }

  .search-band-inner,
  .text-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .featured-grid,
  .latest-grid,
  .related-grid,
  .archive-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-card {
    grid-template-columns: 96px 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .section-inner,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 24px, 1180px);
  }

  .hero-slider {
    height: 610px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 42px;
  }

  .hero-content p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-actions,
  .hero-search {
    flex-direction: column;
  }

  .hero-search button {
    width: 100%;
  }

  .movie-grid,
  .featured-grid,
  .latest-grid,
  .related-grid,
  .archive-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 52px 0;
  }

  .ranking-card {
    grid-template-columns: 1fr;
  }
}
