:root {
  --bg: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #111827;
  --muted: #94a3b8;
  --text: #f8fafc;
  --soft: #e2e8f0;
  --gold: #f59e0b;
  --gold-soft: #fef3c7;
  --rose: #ef4444;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.13), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #111827 48%, #1e293b 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(20px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fef3c7, #f59e0b 60%, #ef4444);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a,
.quick-entry a,
.footer-links a,
.section-link {
  color: var(--soft);
  padding: 9px 12px;
  border-radius: 999px;
  transition: 0.22s ease;
}

.nav-links a:hover,
.quick-entry a:hover,
.footer-links a:hover,
.section-link:hover {
  color: #111827;
  background: var(--gold-soft);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 12px;
}

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  margin: 24px auto 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.58fr);
  align-items: center;
  gap: 42px;
  padding: clamp(28px, 6vw, 76px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) saturate(1.08);
  opacity: 0.28;
  transform: scale(1.12);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.76) 55%, rgba(15, 23, 42, 0.42)),
    radial-gradient(circle at 78% 22%, rgba(245, 158, 11, 0.36), transparent 28rem);
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-desc,
.page-hero p,
.detail-line,
.section-heading p,
.movie-card p,
.detail-content p,
.ranking-list-row p,
.site-footer p {
  color: var(--muted);
  line-height: 1.82;
}

.hero-desc {
  max-width: 760px;
  font-size: 1.08rem;
}

.hero-tags,
.movie-meta,
.tag-line,
.hero-actions,
.quick-entry,
.footer-links,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags span,
.tag-line span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-size: 0.88rem;
}

.hero-actions {
  margin-top: 28px;
}

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

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, #fef3c7, #f59e0b 58%, #ef4444);
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.28);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-3px);
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.06);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  right: 26px;
  bottom: 24px;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.quick-entry {
  margin: 0 0 38px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
}

.content-section {
  margin: 34px 0;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.6);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.16);
}

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

.section-heading.compact {
  margin-bottom: 12px;
}

.section-heading h2,
.detail-content h2,
.ranking-card h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
}

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

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

.category-tile,
.category-card-large,
.movie-card,
.ranking-card,
.search-panel,
.ranking-list-row,
.detail-content,
.player-shell {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
}

.category-tile,
.category-card-large {
  padding: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile span,
.category-card-main span {
  display: block;
  margin-bottom: 10px;
  color: var(--gold-soft);
  font-weight: 900;
  font-size: 1.1rem;
}

.category-tile strong,
.category-card-main p {
  display: block;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 500;
}

.category-tile div,
.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.category-tile div a,
.mini-links a {
  color: var(--soft);
  font-size: 0.88rem;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

.search-panel {
  padding: 18px;
}

.search-box {
  display: grid;
  gap: 9px;
}

.search-box span {
  color: var(--gold-soft);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.56);
  outline: none;
}

.filter-chips {
  margin-top: 14px;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.filter-chip.is-active {
  color: #111827;
  background: var(--gold-soft);
}

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

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

.movie-card {
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card.is-hidden,
.ranking-list-row.is-hidden {
  display: none;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.46);
  background: rgba(255, 255, 255, 0.08);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 900;
  background: var(--gold-soft);
}

.movie-card-body {
  padding: 14px;
}

.movie-meta {
  margin-bottom: 9px;
  gap: 6px;
}

.movie-meta.wide {
  margin-top: 14px;
}

.movie-meta span {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 0.76rem;
}

.movie-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.42;
}

.movie-card p {
  margin: 9px 0 12px;
  font-size: 0.9rem;
}

.tag-line span {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 0.76rem;
}

.ranking-card {
  padding: 18px;
}

.ranking-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.rank-row span,
.ranking-index {
  color: var(--gold);
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
}

.page-hero,
.detail-hero {
  margin: 24px 0 34px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 30rem),
    rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

.page-hero {
  padding: clamp(34px, 6vw, 72px);
}

.category-hero {
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.16), transparent 28rem),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 30rem),
    rgba(15, 23, 42, 0.68);
}

.simple-hero p {
  max-width: 720px;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0 0;
  color: var(--muted);
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  padding: clamp(22px, 4vw, 42px);
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.detail-line {
  font-size: 1.08rem;
}

.detail-tags {
  margin: 18px 0;
}

.player-section {
  margin: 24px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  align-content: center;
  color: var(--text);
  border: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.22), transparent 18rem),
    rgba(2, 6, 23, 0.46);
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fef3c7, #f59e0b 60%, #ef4444);
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.3);
}

.play-overlay.is-hidden {
  display: none;
}

.detail-content {
  padding: clamp(22px, 4vw, 34px);
}

.detail-content section + section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

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

.ranking-list-row {
  display: grid;
  grid-template-columns: 68px 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.ranking-cover {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.06);
}

.ranking-index {
  font-size: 1.24rem;
}

.ranking-list-row h2 {
  margin: 0;
  font-size: 1.18rem;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

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

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

  .split-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero-carousel {
    min-height: 760px;
    border-radius: 26px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px;
  }

  .hero-poster {
    max-width: 240px;
  }

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

  .detail-poster {
    max-width: 260px;
  }

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

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

  .ranking-list-row {
    grid-template-columns: 48px 78px minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  main,
  .nav-shell,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .hero-carousel {
    min-height: 720px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2.25rem;
  }

  .movie-grid,
  .movie-grid.full-grid {
    grid-template-columns: 1fr 1fr;
  }

  .movie-card-body {
    padding: 11px;
  }

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

  .content-section,
  .page-hero,
  .detail-hero {
    border-radius: 22px;
  }
}
