:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-2: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --blue: #60a5fa;
  --green: #34d399;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.13), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(37, 99, 235, 0.16), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  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.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-size: 14px;
}

.nav-link {
  position: relative;
  padding: 22px 0;
  transition: color 0.22s ease;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 15px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--amber);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav-inner {
  display: grid;
  gap: 10px;
  padding: 16px 0 20px;
}

.mobile-nav a {
  padding: 11px 12px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.42);
  border-radius: 12px;
}

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

.hero-stage,
.hero-slide,
.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.72s ease;
}

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

.hero-bg {
  background-position: center;
  background-size: cover;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.05);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.42) 72%, rgba(2, 6, 23, 0.88) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.24), #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 370px;
  align-items: center;
  min-height: 680px;
  gap: 54px;
  padding: 80px 0 120px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 26px;
  height: 2px;
  content: "";
  background: var(--amber);
  border-radius: 99px;
}

.hero h1,
.page-hero h1,
.detail-title-block h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-line,
.page-hero p {
  max-width: 780px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags {
  margin-top: 24px;
}

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

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.27);
}

.btn.ghost {
  color: #fff;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster,
.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(96, 165, 250, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.hero-poster {
  aspect-ratio: 3 / 4.35;
  transform: rotate(2deg);
}

.hero-poster::before,
.detail-poster::before {
  position: absolute;
  inset: 18px;
  z-index: -1;
  content: "";
  background: rgba(245, 158, 11, 0.32);
  filter: blur(42px);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 52px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

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

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

.hero-search {
  position: absolute;
  z-index: 5;
  bottom: -30px;
  left: 50%;
  display: flex;
  width: min(780px, calc(100% - 32px));
  padding: 10px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.hero-search input,
.filter-search input,
.filter-selects select {
  width: 100%;
  min-height: 48px;
  color: #fff;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  outline: none;
}

.hero-search input {
  flex: 1;
  padding: 0 18px;
  border: 0;
  background: transparent;
}

.hero-search button {
  min-width: 120px;
  color: #111827;
  font-weight: 800;
  background: var(--amber);
  border: 0;
  border-radius: 16px;
  cursor: pointer;
}

.section {
  padding: 82px 0;
}

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

.section-head h2,
.compact-head h2,
.side-card h2,
.info-card h2,
.category-overview-card h2,
.rank-panel h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.text-link {
  color: var(--amber-light);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: 0 28px 62px rgba(0, 0, 0, 0.3);
  transform: translateY(-6px);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 2.85;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(96, 165, 250, 0.12));
}

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

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

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

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111827;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.movie-info {
  padding: 16px;
}

.movie-tags {
  margin-bottom: 12px;
}

.movie-info h3,
.horizontal-card h3,
.rank-card h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}

.movie-info h3 a:hover,
.horizontal-card h3 a:hover,
.rank-card h3 a:hover {
  color: var(--amber-light);
}

.movie-info p,
.horizontal-card p,
.rank-card p,
.category-overview-card p,
.site-footer p,
.info-card p {
  color: var(--muted);
}

.movie-info p {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 14px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.movie-meta,
.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted-2);
  font-size: 13px;
}

.movie-meta span,
.detail-meta-row span {
  padding: 3px 8px;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 999px;
}

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

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

.category-tile {
  display: grid;
  gap: 8px;
  min-height: 168px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(96, 165, 250, 0.08)),
    rgba(15, 23, 42, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  border-color: rgba(245, 158, 11, 0.38);
  transform: translateY(-4px);
}

.category-tile span {
  color: #fff;
  font-size: 22px;
  font-weight: 850;
}

.category-tile strong,
.category-tile em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
}

.rank-panel,
.side-card,
.info-card,
.player-card,
.filter-panel,
.category-overview-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.2);
}

.rank-panel {
  padding: 24px;
}

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

.rank-list.small .rank-card:nth-child(n+7) {
  display: none;
}

.rank-card,
.horizontal-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
}

.rank-thumb,
.horizontal-thumb {
  display: block;
  aspect-ratio: 1 / 1.18;
  overflow: hidden;
  background: rgba(245, 158, 11, 0.14);
  border-radius: 14px;
}

.rank-thumb img,
.horizontal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-index {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #111827;
  background: var(--amber);
  border-radius: 50%;
  font-weight: 900;
}

.rank-info p,
.horizontal-card p {
  display: -webkit-box;
  margin: 8px 0 10px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.page-main {
  min-height: 70vh;
  padding-bottom: 72px;
}

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

.page-hero h1 {
  font-size: clamp(42px, 7vw, 76px);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px;
  margin-bottom: 28px;
}

.filter-panel.compact {
  margin-bottom: 24px;
}

.filter-search input {
  padding: 0 16px;
}

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

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

.filter-selects select {
  padding: 0 12px;
}

.empty-state {
  display: none;
  padding: 32px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 24px;
  padding: 24px;
}

.category-overview-copy p {
  margin: 14px 0 20px;
}

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

.detail-main {
  padding-bottom: 0;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
}

.detail-backdrop,
.detail-cover-layer {
  position: absolute;
  inset: 0;
}

.detail-backdrop {
  background-position: center;
  background-size: cover;
  filter: blur(8px) saturate(1.1);
  opacity: 0.42;
  transform: scale(1.08);
}

.detail-cover-layer {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.84) 50%, rgba(2, 6, 23, 0.72) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), #020617 100%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 32px 0 78px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #cbd5e1;
}

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

.detail-top-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 2 / 2.85;
}

.detail-title-block h1 {
  margin-top: 20px;
}

.detail-meta-row {
  margin: 26px 0 30px;
  color: #cbd5e1;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 28px;
  align-items: start;
  margin-top: -46px;
  padding-bottom: 82px;
}

.detail-content,
.detail-side {
  display: grid;
  gap: 24px;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.info-card,
.side-card,
.player-card {
  padding: 24px;
}

.info-card h2,
.side-card h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.info-card p {
  margin: 0;
  font-size: 16px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
}

.site-video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.42));
  border: 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-frame.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-play-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: #111827;
  background: var(--amber);
  border-radius: 50%;
  font-size: 30px;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.34);
}

.player-status {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 10px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  font-size: 12px;
  pointer-events: none;
}

.player-frame.is-ready .player-status {
  display: none;
}

.site-footer {
  padding: 46px 0 28px;
  background: rgba(2, 6, 23, 0.92);
  border-top: 1px solid var(--line);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.site-footer p {
  max-width: 430px;
}

.footer-links {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 20px;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

[data-hidden="true"] {
  display: none !important;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
  }

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

  .hero-poster {
    display: none;
  }

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

  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-content {
    padding: 78px 0 130px;
  }

  .hero-search {
    display: grid;
    gap: 10px;
    border-radius: 20px;
  }

  .hero-search button {
    min-height: 46px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-card,
  .footer-grid,
  .detail-top-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

  .detail-poster {
    width: min(280px, 100%);
  }
}

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

  .brand-text {
    font-size: 18px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title-block h1 {
    font-size: 38px;
  }

  .movie-grid,
  .compact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 15px;
  }

  .movie-info p,
  .movie-tags,
  .movie-meta {
    display: none;
  }

  .rank-card,
  .horizontal-card {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .info-card,
  .side-card,
  .player-card,
  .rank-panel {
    padding: 16px;
  }
}
