: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(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --gold: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.15), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(239, 68, 68, 0.13), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 74px;
}

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #111827;
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.32);
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(245, 158, 11, 0.16);
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input {
  width: 240px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 15px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus {
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.header-search button,
.mobile-search button,
.filter-buttons button,
.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.header-search button,
.mobile-search button,
.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  font-weight: 800;
  padding: 10px 18px;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.22);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  font-weight: 800;
  padding: 10px 18px;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn:hover,
.secondary-btn:hover,
.header-search button:hover,
.mobile-search button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 18px 18px;
  background: rgba(2, 6, 23, 0.96);
}

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

.mobile-panel .nav-link {
  display: block;
}

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

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 43%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 38%),
    radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.25), transparent 28rem);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 420px);
  align-items: center;
  gap: 54px;
  min-height: 700px;
  padding: 80px 0 118px;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-copy .lead-text,
.intro-panel p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.24);
  font-size: 12px;
}

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

.hero-card {
  position: relative;
  align-self: center;
  border-radius: 28px;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.hero-card img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-card:hover img {
  transform: scale(1.06);
}

.hero-card span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(14px);
  color: var(--text);
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
}

.hero-controls button {
  pointer-events: auto;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--line);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.hero-dot {
  width: 38px;
  height: 6px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.22);
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--gold), var(--orange));
}

.section-block {
  margin: 42px auto;
}

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

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

.section-head > a {
  color: #fcd34d;
  font-weight: 800;
}

.intro-panel,
.page-hero.slim .container,
.story-panel,
.player-section,
.category-card-large {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.58));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.intro-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 30px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.76);
  transition: transform 0.25s ease, border 0.25s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-card-large:hover,
.rank-item:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.45);
}

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

.category-tile:hover img {
  transform: scale(1.08);
}

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

.category-tile span {
  display: block;
  margin-top: 72px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card:hover {
  background: rgba(30, 41, 59, 0.82);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.movie-poster img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.movie-score {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--gold));
  font-size: 13px;
  font-weight: 900;
  border-radius: 999px;
  padding: 5px 9px;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  font-size: 12px;
}

.movie-meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgba(148, 163, 184, 0.5);
}

.movie-card h3,
.rank-item h3 {
  margin: 9px 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.35;
}

.movie-card p,
.rank-item p,
.story-panel p,
.category-card-large p {
  color: var(--muted);
  line-height: 1.78;
}

.movie-card p {
  min-height: 3.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card.compact p {
  min-height: auto;
}

.ranking-panel,
.ranking-page {
  border-radius: 30px;
  padding: 30px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--line);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 116px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(2, 6, 23, 0.42);
  transition: transform 0.25s ease, border 0.25s ease;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #111827;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
}

.page-hero {
  position: relative;
  padding: 58px 0 20px;
}

.page-hero.slim .container {
  padding: 44px;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 26px;
  padding: 20px;
  transition: transform 0.25s ease, border 0.25s ease;
}

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

.category-collage img {
  width: 100%;
  height: 142px;
  object-fit: cover;
  border-radius: 16px;
}

.muted-line {
  color: var(--soft) !important;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.66);
}

.filter-bar input {
  width: min(420px, 100%);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-buttons button {
  color: var(--muted);
  background: rgba(30, 41, 59, 0.88);
  border: 1px solid var(--line);
  padding: 8px 13px;
}

.filter-buttons button.active,
.filter-buttons button:hover {
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  background: #020617;
}

.detail-head {
  position: relative;
  padding: 68px 0 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--soft);
  font-size: 14px;
  margin-bottom: 28px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

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

.detail-meta div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
}

.detail-meta span {
  display: block;
  color: var(--soft);
  font-size: 12px;
  margin-bottom: 5px;
}

.detail-meta strong {
  color: var(--text);
  font-size: 15px;
}

.detail-main {
  margin-top: -32px;
  position: relative;
  z-index: 2;
}

.player-section {
  padding: 22px;
}

.compact-head {
  margin-bottom: 18px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  aspect-ratio: 16 / 9;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--text);
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.24), rgba(0, 0, 0, 0.66));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  padding-left: 6px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--orange));
  font-size: 32px;
  box-shadow: 0 20px 54px rgba(245, 158, 11, 0.28);
}

.story-panel {
  padding: 30px;
  margin-top: 28px;
}

.inner-related {
  margin-top: 34px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 28px;
}

.footer-grid p,
.copyright {
  color: var(--soft);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

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

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

.copyright {
  width: min(1180px, calc(100% - 36px));
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

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

  .hero-content,
  .detail-layout,
  .category-card-large {
    grid-template-columns: 1fr;
  }

  .hero-card {
    display: none;
  }

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

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .header-inner {
    min-height: 66px;
  }

  .hero {
    min-height: 650px;
  }

  .hero-content {
    min-height: 610px;
    padding-top: 64px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: clamp(34px, 12vw, 54px);
  }

  .intro-panel,
  .footer-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .intro-panel,
  .filter-bar {
    display: grid;
  }

  .category-grid,
  .movie-grid.four-col,
  .movie-grid.three-col,
  .rank-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .brand {
    font-size: 19px;
  }

  .hero,
  .hero-content {
    min-height: 590px;
  }

  .hero p,
  .page-hero p,
  .detail-copy .lead-text {
    font-size: 16px;
  }

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

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

  .category-grid,
  .movie-grid.four-col,
  .movie-grid.three-col,
  .rank-grid.wide {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 92px 1fr;
    gap: 10px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .page-hero.slim .container,
  .story-panel,
  .player-section,
  .intro-panel,
  .ranking-panel,
  .ranking-page {
    padding: 20px;
    border-radius: 20px;
  }

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

  .player-frame {
    border-radius: 16px;
  }
}
