:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.88);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --amber: #f59e0b;
  --amber-2: #d97706;
  --orange: #ea580c;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  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.16), transparent 32rem), linear-gradient(180deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.locked {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

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

.nav-wrap {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.3);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.nav-links a,
.mobile-panel a {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.25s ease;
}

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

.nav-search,
.mobile-search,
.panel-search,
.hero-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.68);
  border-radius: 999px;
  overflow: hidden;
}

.nav-search input,
.mobile-search input,
.panel-search input,
.hero-search input,
.filter-bar input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.nav-search input {
  width: 210px;
  padding: 11px 14px;
}

.nav-search button,
.mobile-search button,
.panel-search button,
.hero-search button,
.filter-bar button {
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  padding: 11px 18px;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(30, 41, 59, 0.85);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.28), transparent 28rem), linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.96));
  pointer-events: none;
  z-index: 3;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.62fr);
  align-items: end;
  gap: 44px;
  padding: 110px max(32px, calc((100vw - 1180px) / 2)) 86px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.82) 38%, rgba(15, 23, 42, 0.3) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
  transform: scale(1.04);
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-content,
.hero-cover {
  position: relative;
  z-index: 5;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-kicker span,
.hero-tag,
.detail-tag,
.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

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

.hero p {
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.8;
  max-width: 680px;
  margin: 0 0 24px;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-actions,
.detail-title-row,
.section-heading,
.quick-inner,
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.btn-primary,
.btn-ghost,
.inline-link,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  padding: 15px 28px;
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.22);
}

.btn-primary.small {
  padding: 11px 18px;
  font-size: 14px;
}

.btn-ghost {
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--line);
  padding: 14px 24px;
}

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

.hero-cover {
  align-self: center;
  width: min(360px, 100%);
  justify-self: end;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-nav {
  position: absolute;
  z-index: 10;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-nav.prev {
  left: 22px;
}

.hero-nav.next {
  right: 22px;
}

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

.hero-dots button {
  width: 34px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

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

.quick-strip {
  border-block: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
}

.quick-inner {
  padding: 24px 0;
}

.quick-inner strong {
  display: block;
  font-size: 21px;
  margin-bottom: 4px;
}

.quick-inner p {
  margin: 0;
  color: var(--muted);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.quick-links a {
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
}

.content-section {
  padding: 64px 0;
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading span,
.sub-hero span,
.spotlight-panel span,
.detail-kicker {
  display: inline-block;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-heading h2,
.spotlight-panel h2,
.side-panel h2,
.detail-text-card h2 {
  margin: 0;
  color: #fff;
}

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

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

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

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

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

.movie-card {
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.26);
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #020617;
}

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

.movie-card:hover .movie-poster img {
  transform: scale(1.07);
  opacity: 0.9;
}

.poster-mask {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #fff;
  font-weight: 900;
}

.play-chip {
  left: 12px;
  bottom: 12px;
  background: rgba(245, 158, 11, 0.92);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border-radius: 12px;
}

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

.movie-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
}

.movie-card-title:hover {
  color: #fbbf24;
}

.movie-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-card-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #cbd5e1;
  line-height: 1.65;
  font-size: 13px;
  margin: 10px 0 0;
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--line);
}

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

.category-tile span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.95));
}

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

.category-tile strong {
  font-size: 24px;
  margin-bottom: 8px;
}

.category-tile em {
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.7;
}

.category-tile:hover img {
  transform: scale(1.07);
  opacity: 0.58;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.72fr);
  align-items: start;
  gap: 28px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 48px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.76);
  transition: 0.25s ease;
}

.ranking-row:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.45);
}

.ranking-row img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.ranking-num {
  color: #fbbf24;
  font-size: 22px;
  font-weight: 950;
  text-align: center;
}

.ranking-info {
  min-width: 0;
}

.ranking-info strong,
.ranking-info em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  margin-top: 5px;
}

.ranking-action {
  color: #fff;
  background: rgba(245, 158, 11, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
}

.spotlight-panel,
.side-panel,
.detail-text-card,
.player-card,
.detail-info-panel,
.category-overview-card {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.spotlight-panel,
.side-panel {
  padding: 28px;
  position: sticky;
  top: 96px;
}

.spotlight-panel p,
.side-panel p,
.detail-text-card p,
.sub-hero p,
.category-overview-card p {
  color: #cbd5e1;
  line-height: 1.8;
}

.panel-search {
  margin-top: 22px;
}

.panel-search input,
.hero-search input {
  flex: 1;
  padding: 14px 16px;
}

.sub-hero {
  background: radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.28), transparent 28rem), linear-gradient(135deg, rgba(217, 119, 6, 0.95), rgba(234, 88, 12, 0.85));
  padding: 82px 0;
}

.sub-hero h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 62px);
  letter-spacing: -0.04em;
}

.sub-hero p {
  max-width: 760px;
  font-size: 18px;
  margin: 16px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 18px;
}

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

.breadcrumb em {
  font-style: normal;
  color: #fff;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

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

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

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

.filter-bar {
  margin: 0 0 22px;
  justify-content: flex-start;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.58);
  border-radius: 18px;
  padding: 10px;
}

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

.filter-bar input {
  flex: 1;
  padding: 12px 14px;
}

.filter-bar button {
  border-radius: 12px;
}

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

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

.empty-state.show {
  display: block;
}

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

.detail-layout {
  padding: 36px 0 0;
}

.detail-breadcrumb {
  margin: 0 0 24px;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(300px, 0.62fr);
  gap: 28px;
  align-items: start;
}

.detail-main {
  min-width: 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), rgba(0, 0, 0, 0.62));
  transition: 0.25s ease;
}

.player-start span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 36px;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.28);
}

.player-start strong {
  font-size: 20px;
}

.player-card.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-text-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-title-row {
  align-items: flex-start;
  margin-bottom: 18px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-one-line {
  font-size: 18px;
  margin-bottom: 20px;
}

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

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

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

.detail-meta-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-cover {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
}

.detail-info-panel {
  margin-top: 20px;
  padding: 22px;
}

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

.compact-list .ranking-action {
  display: none;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 0.9fr;
  gap: 28px;
  padding: 46px 0;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
}

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

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

.site-footer h2 {
  font-size: 17px;
  margin: 0 0 16px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

@media (max-width: 1080px) {
  .nav-links,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    align-items: center;
    padding-top: 96px;
  }

  .hero-cover {
    display: none;
  }

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

  .category-grid,
  .category-overview-grid,
  .ranking-columns,
  .two-column-section,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .spotlight-panel,
  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 22px, 1180px);
  }

  .brand,
  .footer-brand {
    font-size: 18px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-slide {
    padding: 92px 18px 76px;
  }

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

  .hero-actions,
  .quick-inner,
  .section-heading,
  .detail-title-row,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .hero-nav {
    display: none;
  }

  .movie-grid,
  .featured-grid,
  .related-grid,
  .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

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

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

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

  .ranking-action {
    display: none;
  }

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

@media (max-width: 440px) {
  .movie-grid,
  .featured-grid,
  .related-grid,
  .category-list {
    grid-template-columns: 1fr 1fr;
  }

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

  .movie-card-title {
    font-size: 14px;
  }

  .detail-text-card {
    padding: 20px;
  }
}
