:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.76);
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(245, 158, 11, 0.36);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --red: #ef4444;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 82%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.14);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: var(--panel-soft);
  cursor: pointer;
}

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-carousel {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.35) 100%),
    linear-gradient(0deg, #020617 0%, transparent 34%),
    var(--hero-image);
  background-position: center;
  background-size: cover;
}

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

.hero-content {
  width: min(1220px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 54px;
  padding: 64px 0 74px;
}

.hero-kicker {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions,
.detail-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.46);
  background: rgba(30, 41, 59, 0.92);
}

.button.primary {
  color: #111827;
  border-color: transparent;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.24);
}

.button.ghost {
  color: #fde68a;
}

.hero-poster-panel {
  position: relative;
  max-width: 420px;
  justify-self: end;
}

.hero-poster-panel::before {
  position: absolute;
  inset: -24px;
  z-index: -1;
  content: "";
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.42), rgba(59, 130, 246, 0.16));
  filter: blur(8px);
}

.hero-poster-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-meta-card {
  position: absolute;
  right: -18px;
  bottom: 28px;
  max-width: 290px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
}

.hero-meta-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.hero-meta-card span {
  display: block;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.6;
}

.hero-tabs {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-tab {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero-tab.is-active,
.hero-tab:hover {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.52);
  background: rgba(245, 158, 11, 0.14);
}

.hero-tab span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 750;
}

.section {
  padding: 54px 0;
}

.section.compact {
  padding: 34px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-subtitle {
  max-width: 740px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.category-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 50%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.28), transparent 52%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(51, 65, 85, 0.76));
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.7;
}

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

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.44);
  background: rgba(30, 41, 59, 0.86);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(59, 130, 246, 0.12)),
    #111827;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.card-type,
.rank-flag {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.card-type {
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
}

.rank-flag {
  top: 10px;
  left: 10px;
  padding: 7px 9px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
}

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

.movie-card-body strong,
.movie-card-body span {
  display: block;
}

.movie-card-body strong {
  overflow: hidden;
  margin-bottom: 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 16px;
}

.movie-meta {
  overflow: hidden;
  margin-bottom: 8px;
  color: #fcd34d;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}

.movie-desc {
  display: -webkit-box !important;
  overflow: hidden;
  min-height: 42px;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.6;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 38px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 42rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.5), transparent);
}

.page-hero h1 {
  max-width: 860px;
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  padding: 0 16px;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(30, 41, 59, 0.86);
}

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

.ranking-poster {
  width: 92px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

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

.ranking-copy strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.ranking-copy span,
.ranking-copy p {
  display: block;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.empty-state {
  display: none;
  padding: 42px;
  border: 1px dashed rgba(148, 163, 184, 0.34);
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72)),
    var(--detail-bg);
  background-position: center;
  background-size: cover;
}

.detail-hero-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  padding: 74px 0 50px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #111827;
}

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

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

.breadcrumb a {
  color: #fde68a;
}

.detail-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.detail-intro {
  max-width: 850px;
  margin: 0 0 20px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
  font-size: 13px;
  font-weight: 750;
}

.player-section {
  padding-top: 54px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 28rem),
    rgba(2, 6, 23, 0.42);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 22px 70px rgba(245, 158, 11, 0.35);
  font-size: 30px;
}

.player-overlay strong {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(14px);
  font-size: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
}

.content-panel,
.side-panel {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.content-panel {
  padding: 28px;
}

.content-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.content-panel p {
  margin: 0 0 20px;
  color: var(--soft);
  line-height: 2;
  font-size: 16px;
}

.side-panel {
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 92px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.52);
}

.side-link img {
  width: 58px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.side-link strong {
  display: block;
  overflow: hidden;
  margin-bottom: 4px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-link span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.72);
}

.footer-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.5fr) minmax(180px, 0.5fr);
  gap: 34px;
  padding: 38px 0;
}

.footer-brand p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.footer-links div {
  display: grid;
  gap: 8px;
}

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

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

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

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

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

  .hero-poster-panel {
    justify-self: start;
    width: min(360px, 100%);
  }

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .main-nav {
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .main-nav.is-open {
    display: grid;
  }

  .nav-link {
    text-align: center;
    background: rgba(15, 23, 42, 0.84);
  }

  .hero,
  .hero-carousel,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    display: block;
    padding: 46px 0 120px;
  }

  .hero h1,
  .page-hero h1,
  .detail-hero h1 {
    letter-spacing: -0.04em;
  }

  .hero-poster-panel {
    margin-top: 30px;
  }

  .hero-meta-card {
    right: 12px;
    bottom: 16px;
  }

  .hero-tabs {
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .hero-tab {
    min-width: 190px;
  }

  .section-head {
    display: block;
  }

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

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

  .ranking-item {
    grid-template-columns: 42px 70px minmax(0, 1fr);
  }

  .ranking-item .button {
    grid-column: 1 / -1;
  }

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

  .content-panel {
    padding: 20px;
  }
}

@media (max-width: 460px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

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