:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.76);
  --panel-deep: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --orange: #ea580c;
  --red: #dc2626;
  --cyan: #06b6d4;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  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.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.10), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26);
}

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  font-size: 18px;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand-name {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #fde68a, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 1;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  border-radius: 13px;
  transition: all 0.2s ease;
}

.nav-link {
  padding: 10px 13px;
  font-size: 14px;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: rgba(148, 163, 184, 0.14);
}

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid var(--line);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero {
  padding: 28px 20px 18px;
}

.hero-shell {
  position: relative;
  max-width: 1280px;
  min-height: 580px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: relative;
  min-height: 580px;
  padding: 72px;
  display: none;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
}

.hero-slide.active {
  display: grid;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  opacity: 0.92;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.22), transparent 28rem);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.34);
  color: #fde68a;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-content h1 {
  margin: 16px 0 18px;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero-line {
  max-width: 720px;
  margin: 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2.1vw, 22px);
}

.hero-tags,
.tag-row,
.detail-tags,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a,
.filter-chip {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-size: 12px;
  padding: 6px 10px;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  min-height: 48px;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.28);
}

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

.ghost-btn {
  min-height: 48px;
  padding: 0 20px;
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.55);
}

.hero-poster {
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  background: #111827;
}

.hero-poster img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 800;
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.7);
  transform: translateY(-50%);
  font-size: 34px;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 72px;
  bottom: 30px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 30px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.active {
  width: 48px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.search-panel,
.content-section,
.filter-panel,
.detail-shell,
.split-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 20px;
}

.search-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.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);
}

.search-inner h2,
.section-heading h2,
.spotlight-block h2,
.side-card h2,
.detail-content h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.search-inner p,
.section-heading p,
.spotlight-block p,
.page-hero p,
.category-overview-card p,
.detail-content p {
  margin: 0;
  color: var(--muted);
}

.global-search {
  position: relative;
}

.global-search input,
.filter-row input {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  color: #fff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
}

.search-results {
  position: absolute;
  z-index: 30;
  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.96);
  box-shadow: var(--shadow);
}

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

.search-result-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.search-result-item img {
  width: 64px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
}

.search-result-item strong {
  display: block;
  margin-bottom: 4px;
}

.search-result-item small {
  color: var(--muted);
}

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

.section-more,
.text-link {
  color: #fbbf24;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

.category-tile img {
  position: absolute;
  right: -18px;
  bottom: -22px;
  width: 110px;
  height: 150px;
  object-fit: cover;
  border-radius: 18px;
  opacity: 0.38;
  transform: rotate(8deg);
}

.category-tile strong,
.category-tile small,
.category-icon {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  display: block;
  margin: 20px 0 8px;
  font-size: 21px;
}

.category-tile small {
  display: block;
  color: var(--muted);
}

.category-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  font-weight: 900;
}

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

.movie-card,
.compact-card,
.category-overview-card,
.side-card,
.detail-content,
.player-card,
.spotlight-block {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  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.07);
}

.quality-badge,
.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.quality-badge {
  left: 10px;
  top: 10px;
  background: rgba(220, 38, 38, 0.92);
}

.score-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(245, 158, 11, 0.94);
}

.movie-body {
  padding: 14px;
}

.movie-body h3,
.compact-info h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.25;
}

.movie-body p,
.compact-info p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta,
.tiny-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #94a3b8;
  font-size: 12px;
}

.tag-row {
  margin-top: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 0.8fr;
  gap: 24px;
}

.ranking-block,
.spotlight-block {
  min-width: 0;
}

.spotlight-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 420px;
  padding: 38px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.22), transparent 18rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.82));
}

.spotlight-block p {
  margin-bottom: 26px;
}

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

.compact-card {
  position: relative;
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
}

.compact-poster {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.compact-poster img {
  width: 118px;
  height: 78px;
  object-fit: cover;
}

.compact-info p {
  min-height: auto;
}

.rank-badge {
  left: 8px;
  top: 8px;
  min-width: 30px;
  text-align: center;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.page-hero {
  max-width: 1280px;
  margin: 28px auto 8px;
  padding: 70px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 10%, rgba(245, 158, 11, 0.18), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.92));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-bottom: 12px;
}

.small-hero,
.category-hero,
.ranking-hero {
  min-height: 280px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: 24px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-overview-card small {
  display: block;
  margin: 12px 0;
  color: #cbd5e1;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-cover-stack img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  border-radius: 15px;
}

.filter-row {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
}

.filter-chip {
  cursor: pointer;
}

.filter-chip.active {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border-color: transparent;
}

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

.ranking-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
}

.ranking-list {
  position: sticky;
  top: 94px;
  align-self: start;
}

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

.detail-shell {
  padding-top: 26px;
}

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

.breadcrumb a:hover {
  color: #fbbf24;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
}

.player-card,
.detail-content,
.side-card {
  border-radius: 26px;
}

.player-card {
  overflow: hidden;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.35);
  font-size: 34px;
}

.detail-content {
  margin-top: 24px;
  padding: 30px;
}

.detail-content h1 {
  font-size: clamp(34px, 4vw, 56px);
}

.detail-content .lead {
  color: #e2e8f0;
  font-size: 19px;
}

.detail-meta {
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-content h2 {
  margin-top: 26px;
  font-size: 26px;
}

.detail-content p {
  color: #cbd5e1;
  font-size: 16px;
}

.side-column {
  min-width: 0;
}

.detail-poster {
  display: block;
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.side-card {
  padding: 18px;
}

.side-card .compact-card {
  grid-template-columns: 96px 1fr;
  box-shadow: none;
}

.side-card .compact-poster img {
  width: 96px;
  height: 68px;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 20px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
}

.footer-brand p {
  max-width: 420px;
  margin: 16px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  color: #cbd5e1;
}

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

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 22px;
  color: #64748b;
  border-top: 1px solid var(--line);
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 54px 34px 86px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .ranking-list {
    position: static;
  }
}

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

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

  .hero {
    padding: 14px;
  }

  .hero-shell,
  .hero-slide {
    min-height: 540px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 46px 22px 86px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    left: 22px;
    bottom: 26px;
  }

  .search-inner,
  .category-overview-card,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .page-hero {
    margin: 16px 14px 0;
    padding: 42px 22px;
    align-items: flex-start;
    flex-direction: column;
  }

  .content-section,
  .filter-panel,
  .detail-shell,
  .split-section,
  .search-panel {
    padding: 28px 14px;
  }

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

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

  .compact-poster img {
    width: 96px;
    height: 70px;
  }

  .detail-content {
    padding: 22px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

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

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