:root {
  --bg: #070716;
  --panel: rgba(18, 18, 42, 0.86);
  --panel-strong: rgba(31, 25, 62, 0.95);
  --text: #f8fafc;
  --muted: #a8b1c7;
  --soft: #cbd5e1;
  --amber: #f6c453;
  --amber-strong: #f59e0b;
  --purple: #7c3aed;
  --purple-soft: #a78bfa;
  --line: rgba(167, 139, 250, 0.2);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(124, 58, 237, 0.22), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(245, 158, 11, 0.14), transparent 28rem),
    linear-gradient(135deg, #050510 0%, #11102a 48%, #090914 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(8, 9, 24, 0.96), rgba(54, 31, 94, 0.94), rgba(8, 9, 24, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #1a1030;
  background: linear-gradient(135deg, var(--amber), #fde68a);
  box-shadow: 0 12px 32px rgba(246, 196, 83, 0.25);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-name,
.footer-brand {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fde68a, #fbbf24, #f8fafc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #d9def0;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber);
  background: rgba(124, 58, 237, 0.26);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
}

.header-search input {
  width: 190px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 9px 12px;
}

.header-search input::placeholder {
  color: #8790a8;
}

.header-search button,
.primary-button,
.secondary-button,
.text-button,
.back-top {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.primary-button {
  color: #191020;
  background: linear-gradient(135deg, var(--amber), #fde68a);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.24);
}

.header-search button {
  padding: 9px 14px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
}

.secondary-button {
  color: #f8fafc;
  border: 1px solid rgba(246, 196, 83, 0.45);
  background: rgba(124, 58, 237, 0.24);
}

.header-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.text-button:hover,
.back-top:hover {
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.18);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--amber);
}

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

.page-shell {
  padding: 42px 0 70px;
}

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

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(circle at 26% 28%, rgba(124, 58, 237, 0.32), transparent 28rem);
}

.hero-slide {
  display: none;
  min-height: 650px;
  align-items: center;
  background-image:
    linear-gradient(90deg, rgba(6, 7, 18, 0.95) 0%, rgba(14, 10, 31, 0.76) 46%, rgba(7, 7, 18, 0.42) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  display: flex;
  animation: heroFade 0.45s ease both;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: scale(1.012);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  align-items: center;
  gap: 54px;
  padding: 72px 0;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(246, 196, 83, 0.34);
  border-radius: 999px;
  color: var(--amber);
  background: rgba(124, 58, 237, 0.22);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  max-width: 780px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 700px;
  margin: 0 0 26px;
  color: #d7deee;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.tag-row span,
.detail-tags span {
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 999px;
  color: #e9d5ff;
  background: rgba(24, 19, 52, 0.72);
}

.hero-meta span {
  padding: 8px 12px;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(9, 9, 20, 0.72) 100%);
}

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

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

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

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

.section-block {
  margin: 54px 0;
}

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

.section-title h1,
.section-title h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-title p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
}

.category-grid,
.movie-grid,
.related-grid {
  display: grid;
  gap: 20px;
}

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

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

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

.category-card,
.movie-card,
.rank-row,
.detail-panel,
.filter-panel,
.breadcrumb {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 22px;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -35% -15% auto auto;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(246, 196, 83, 0.24), transparent 65%);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.category-card a,
.text-button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--amber);
  font-weight: 800;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(246, 196, 83, 0.38);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(124, 58, 237, 0.16);
}

.movie-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #1b1226;
  background: linear-gradient(135deg, var(--amber), #fde68a);
  font-weight: 900;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 750;
}

.movie-card h3,
.rank-content h2 {
  margin: 8px 0 8px;
  line-height: 1.28;
}

.movie-card h3 {
  font-size: 18px;
}

.movie-card p,
.rank-content p {
  color: var(--muted);
  margin: 0;
}

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

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

.tag-row span,
.detail-tags span {
  padding: 4px 9px;
  font-size: 12px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 130px 1fr;
}

.movie-card-horizontal .movie-cover img {
  height: 100%;
  aspect-ratio: auto;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin: 22px 0 28px;
  padding: 18px;
  border-radius: var(--radius);
}

.filter-search-wrap input,
.filter-selects select {
  width: 100%;
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 14px;
  color: var(--text);
  outline: 0;
  background: rgba(8, 10, 25, 0.7);
}

.filter-search-wrap input {
  min-height: 48px;
  padding: 0 16px;
}

.filter-selects {
  display: flex;
  gap: 12px;
}

.filter-selects label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.filter-selects select {
  min-width: 136px;
  height: 48px;
  padding: 0 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 86px 1fr auto;
  align-items: center;
  gap: 18px;
  border-radius: 20px;
  padding: 12px 16px;
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #1b1226;
  background: linear-gradient(135deg, var(--amber), #fde68a);
  font-weight: 900;
}

.rank-poster img {
  width: 86px;
  height: 116px;
  border-radius: 14px;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 34px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.detail-panel {
  border-radius: 30px;
  padding: 30px;
}

.detail-panel h1 {
  margin: 10px 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-lead {
  color: #dbe4f3;
  font-size: 18px;
  margin-bottom: 22px;
}

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

.detail-facts div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 10, 25, 0.46);
}

.detail-facts span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-facts strong {
  display: block;
  color: var(--text);
  margin-top: 2px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(246, 196, 83, 0.28);
  border-radius: 28px;
  background: #02030a;
  box-shadow: var(--shadow);
}

.player-video {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #02030a;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #1b1226;
  background: linear-gradient(180deg, rgba(7, 7, 18, 0.15), rgba(7, 7, 18, 0.72));
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), #fde68a);
  box-shadow: 0 18px 50px rgba(246, 196, 83, 0.28);
  font-size: 34px;
  transform: translateX(3px);
}

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

.article-content {
  display: grid;
  gap: 24px;
  margin: 34px 0;
}

.article-content section {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  padding: 26px;
}

.article-content h2 {
  margin: 0 0 12px;
  color: var(--amber);
}

.article-content p {
  margin: 0;
  color: #d7deee;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(5, 5, 16, 0.82);
}

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

.footer-grid p {
  max-width: 540px;
  color: var(--muted);
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: var(--amber);
}

.footer-grid a:not(.footer-brand) {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: #7f8aa3;
}

.back-top {
  color: var(--amber);
  background: rgba(124, 58, 237, 0.22);
  padding: 10px 16px;
}

.empty-state {
  display: none;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--panel);
  text-align: center;
}

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

@media (max-width: 1100px) {
  .site-header-inner {
    grid-template-columns: auto auto;
  }

  .mobile-toggle {
    display: block;
    justify-self: end;
  }

  .main-nav,
  .header-search {
    display: none;
  }

  body.nav-open .main-nav,
  body.nav-open .header-search {
    display: flex;
    position: fixed;
    left: 16px;
    right: 16px;
    z-index: 120;
    background: rgba(9, 9, 24, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
  }

  body.nav-open .main-nav {
    top: 84px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px 22px 0 0;
  }

  body.nav-open .header-search {
    top: 268px;
    padding: 12px;
    border-radius: 0 0 22px 22px;
  }

  body.nav-open .header-search input {
    width: 100%;
  }

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

  .hero-poster {
    max-width: 360px;
    transform: none;
  }

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

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 46px 72px 1fr;
  }

  .rank-row .text-button {
    grid-column: 3 / 4;
  }
}

@media (max-width: 720px) {
  .site-header-inner,
  .page-main,
  .page-shell,
  .hero-content,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

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

  .hero,
  .hero-slide {
    min-height: 620px;
  }

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

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

  .section-head,
  .footer-bottom {
    align-items: start;
    flex-direction: column;
  }

  .category-grid,
  .movie-grid,
  .related-grid,
  .footer-grid,
  .detail-facts {
    grid-template-columns: 1fr;
  }

  .filter-selects {
    display: grid;
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 104px 1fr;
  }

  .rank-row {
    grid-template-columns: 40px 64px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .rank-poster img {
    width: 64px;
    height: 92px;
  }

  .rank-content p,
  .rank-row .text-button {
    display: none;
  }
}
