:root {
  --bg-deep: #020617;
  --bg-main: #0f172a;
  --bg-soft: #1e293b;
  --bg-card: #111827;
  --line: rgba(245, 158, 11, 0.18);
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --emerald: #34d399;
  --rose: #fb7185;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--amber-soft);
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--amber-soft));
  color: #111827;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.32);
}

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

.main-nav a,
.mobile-nav a,
.footer-links a,
.text-link {
  color: #d1d5db;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active,
.footer-links a:hover,
.text-link:hover {
  color: var(--amber-soft);
}

.header-search {
  position: relative;
  margin-left: 6px;
}

.header-search input,
.toolbar input {
  width: 240px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--text);
  padding: 11px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.toolbar input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--text);
  background: rgba(30, 41, 59, 0.9);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: #0f172a;
}

.mobile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.mobile-categories a {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 7px 11px;
}

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

.hero-stage {
  position: relative;
  min-height: 600px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 380px);
  align-items: center;
  gap: 48px;
  padding: 80px max(32px, calc((100vw - 1180px) / 2)) 70px;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  filter: saturate(1.18) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 26%, rgba(245, 158, 11, 0.32), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.92));
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 13px;
}

.eyebrow.emerald {
  color: var(--emerald);
}

.eyebrow.rose {
  color: var(--rose);
}

.hero-content h1 {
  margin: 0 0 22px;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 0.96;
  color: var(--amber-soft);
  text-shadow: 0 12px 40px rgba(245, 158, 11, 0.18);
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(18px, 2.3vw, 24px);
  line-height: 1.7;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  padding: 7px 11px;
  font-size: 13px;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 13px 22px;
  font-weight: 800;
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--amber), var(--amber-soft));
  color: #111827;
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.2);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.secondary-button {
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(15, 23, 42, 0.76);
  color: var(--text);
}

.secondary-button.ghost {
  color: #fde68a;
}

.primary-button.full {
  width: 100%;
  margin-top: 22px;
}

.hero-poster {
  align-self: center;
  justify-self: end;
  width: min(360px, 32vw);
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgba(245, 158, 11, 0.22);
  transform: rotate(2deg);
}

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

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

.hero-dots button {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.36);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--amber-soft);
}

.intro-block {
  padding: 72px 0 32px;
  text-align: center;
}

.intro-block h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 0;
  color: var(--text);
  line-height: 1.15;
}

.intro-block h2 {
  font-size: clamp(30px, 4vw, 48px);
  color: var(--amber-soft);
}

.intro-block p:last-child,
.section-heading p,
.page-hero p,
.detail-line {
  color: var(--muted);
  line-height: 1.8;
}

.section-heading {
  margin: 64px 0 26px;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-heading.small {
  margin-top: 0;
}

.section-heading.split,
.toolbar,
.rank-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.text-link {
  color: var(--amber-soft);
  font-weight: 800;
  white-space: nowrap;
}

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

.category-grid.large {
  padding-top: 56px;
}

.category-card {
  position: relative;
  min-height: 220px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-soft);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 10px 34px rgba(2, 6, 23, 0.25);
  transform: translateZ(0);
}

.category-card:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(2, 6, 23, 0.88));
  z-index: 1;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.66;
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  color: var(--amber-soft);
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
}

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

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

.movie-grid.full-grid {
  padding-bottom: 44px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid var(--line-soft);
  box-shadow: 0 14px 38px rgba(2, 6, 23, 0.22);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 22px 54px rgba(245, 158, 11, 0.11);
}

.movie-card.compact {
  border-radius: 18px;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.compact .movie-cover {
  aspect-ratio: 16 / 10;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
}

.movie-cover:after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

.movie-year {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: var(--amber);
  color: #111827;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 900;
}

.movie-body {
  padding: 18px;
}

.movie-kicker {
  margin-bottom: 8px;
  color: var(--emerald);
  font-size: 13px;
  font-weight: 700;
}

.movie-body h3 {
  margin: 0 0 10px;
  color: var(--amber-soft);
  font-size: 19px;
  line-height: 1.35;
}

.movie-body h3 a:hover {
  color: #fde68a;
}

.movie-body p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 70px;
  margin: 0 0 14px;
  color: #cbd5e1;
  line-height: 1.65;
}

.movie-card.compact .movie-body p {
  min-height: 48px;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted-2);
  font-size: 13px;
}

.movie-meta a {
  color: var(--amber-soft);
}

.wide-section {
  margin-top: 74px;
  padding: 58px 0;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.86));
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
}

.rank-card {
  align-self: start;
  padding: 26px;
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.48);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.rank-link {
  padding: 12px;
  border-radius: 15px;
  background: rgba(30, 41, 59, 0.62);
  border: 1px solid transparent;
}

.rank-link:hover {
  border-color: rgba(245, 158, 11, 0.3);
}

.rank-number {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--amber);
  color: #111827;
  font-weight: 900;
}

.rank-title {
  flex: 1;
  color: #f8fafc;
  font-weight: 800;
}

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

.category-panel {
  margin-bottom: 58px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 20%, rgba(245, 158, 11, 0.24), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid var(--line);
}

.compact-hero {
  padding: 78px 0;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 66px);
  color: var(--amber-soft);
}

.page-hero p {
  max-width: 720px;
  font-size: 18px;
}

.toolbar {
  margin: 38px 0 26px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.62);
  border: 1px solid var(--line-soft);
}

.toolbar.prominent input,
.toolbar input {
  width: min(560px, 100%);
}

.ranking-layout {
  padding-top: 46px;
}

.featured-ranks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 34px;
}

.long-rank {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: 50px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 30px 0 20px;
  color: var(--muted);
}

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

.detail-page {
  padding-bottom: 56px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 30px;
  align-items: stretch;
}

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

.movie-video,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.movie-video {
  display: block;
  min-height: 420px;
  background: #000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
  overflow: hidden;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(1.1) contrast(1.05);
}

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

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--amber);
  color: #111827;
  font-size: 36px;
  padding-left: 6px;
  box-shadow: 0 0 0 18px rgba(245, 158, 11, 0.16), 0 18px 45px rgba(0, 0, 0, 0.34);
}

.detail-info {
  padding: 30px;
  border-radius: 28px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--line-soft);
}

.detail-info h1 {
  color: var(--amber-soft);
  font-size: clamp(32px, 4vw, 52px);
}

.detail-line {
  font-size: 17px;
}

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

.detail-meta span {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 11px 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
}

.large-tags span {
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 34px;
}

.detail-content section {
  padding: 28px;
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.68);
  border: 1px solid var(--line-soft);
}

.detail-content h2 {
  color: var(--amber-soft);
  margin-bottom: 14px;
}

.detail-content p {
  color: #cbd5e1;
  line-height: 1.92;
  margin: 0;
}

.related-section {
  margin-top: 26px;
}

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

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

.footer-inner p {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.copyright {
  border-top: 1px solid var(--line-soft);
  padding: 18px 0;
  color: var(--muted-2);
  text-align: center;
}

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

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding-top: 72px;
  }

  .hero-poster {
    display: none;
  }

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

  .split-layout,
  .detail-hero,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .long-rank {
    grid-template-columns: 1fr;
  }
}

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

  .hero-section,
  .hero-stage {
    min-height: 540px;
  }

  .hero-slide {
    padding: 60px 18px 66px;
  }

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

  .hero-summary,
  .page-hero p {
    font-size: 16px;
  }

  .hero-actions,
  .page-actions,
  .section-heading.split,
  .toolbar,
  .rank-link {
    align-items: stretch;
    flex-direction: column;
  }

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

  .category-grid,
  .movie-grid,
  .movie-grid.mini-grid,
  .featured-ranks {
    grid-template-columns: 1fr;
  }

  .compact-hero {
    padding: 54px 0;
  }

  .player-wrap,
  .movie-video {
    min-height: 260px;
  }

  .detail-info,
  .detail-content section {
    padding: 22px;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }

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