:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-card: #111c2f;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --emerald: #10b981;
  --cyan: #22d3ee;
  --rose: #fb7185;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 0%, rgba(34, 211, 238, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.nav-container {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-text {
  font-size: clamp(1.1rem, 2.8vw, 1.65rem);
  background: linear-gradient(90deg, #34d399, #22d3ee);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: white;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.42);
}

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #34d399;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
}

.nav-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 0;
  outline: none;
  color: var(--text);
  background: #0b1220;
}

.nav-search input {
  width: 190px;
  padding: 9px 8px 9px 14px;
  border-radius: 999px;
}

.nav-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, var(--emerald), #0891b2);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 4px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: clamp(560px, 78vh, 760px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.97) 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 42%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #34d399;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-article h1 {
  max-width: 780px;
  margin: 14px 0 20px;
  font-size: clamp(2.7rem, 8vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 650px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #d1fae5;
  font-size: 0.82rem;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.more-link,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 14px 24px;
  color: white;
  background: linear-gradient(135deg, var(--emerald), #0891b2);
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.28);
}

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

.primary-btn.small {
  padding: 10px 16px;
  font-size: 0.92rem;
}

.ghost-btn,
.more-link {
  padding: 13px 22px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
}

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

.hero-dot {
  width: 36px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.35);
}

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

.section,
.category-overview,
.detail-layout,
.breadcrumb {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 64px 0;
}

.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-top: 34px;
  padding-bottom: 22px;
}

.stat-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1;
  color: #67e8f9;
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

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

.section-head.left-only {
  justify-content: flex-start;
}

.section-head h2,
.side-panel h2,
.category-overview h2,
.text-card h2 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.05em;
}

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

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

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.78));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 24px 70px rgba(16, 185, 129, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0b1220;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.3s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.07);
  filter: saturate(1.08) contrast(1.05);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.year-badge {
  left: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-badge {
  right: 12px;
  background: linear-gradient(135deg, #fb7185, #f97316);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.86);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  color: white;
  opacity: 0;
  box-shadow: 0 20px 55px rgba(16, 185, 129, 0.42);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.card-body h3 a:hover,
.rank-main h3 a:hover {
  color: #34d399;
}

.card-body p,
.rank-main p,
.side-card p,
.text-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.card-meta {
  margin: 12px 0;
  color: #cbd5e1;
  font-size: 0.84rem;
}

.card-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.compact .card-body p {
  display: none;
}

.compact .tag-row {
  display: none;
}

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

.category-tile,
.side-panel,
.category-overview,
.text-card,
.side-card,
.detail-article,
.filter-panel,
.ranking-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile::before,
.category-overview::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--from, #10b981), var(--to, #06b6d4));
  opacity: 0.18;
  pointer-events: none;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.45);
}

.category-tile h3,
.category-tile p,
.category-tile strong,
.category-overview > * {
  position: relative;
  z-index: 2;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 1.32rem;
}

.category-tile p {
  margin: 0 0 16px;
  color: var(--muted-strong);
}

.category-tile strong {
  color: #67e8f9;
}

.category-thumbs {
  position: relative;
  z-index: 2;
  display: flex;
  margin-bottom: 18px;
}

.category-thumbs img {
  width: 44px;
  height: 58px;
  object-fit: cover;
  border: 2px solid rgba(15, 23, 42, 0.85);
  border-radius: 12px;
  margin-left: -10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.category-thumbs img:first-child {
  margin-left: 0;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.side-panel {
  padding: 22px;
}

.mini-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin: 32px auto 0;
  padding: clamp(46px, 8vw, 84px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.14), transparent 28rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.page-hero > div {
  position: relative;
  z-index: 2;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.8;
}

.category-overview {
  position: relative;
  overflow: hidden;
  padding: 28px;
  margin-bottom: 34px;
}

.category-overview-head {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.category-overview-head p {
  margin: 8px 0 0;
  color: var(--muted-strong);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, minmax(130px, 1fr));
  gap: 14px;
  align-items: end;
  margin-bottom: 24px;
  padding: 18px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 0.88rem;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.filter-count {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 14px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.12);
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 78px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
}

.rank-number {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #fb7185, #f97316);
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
}

.rank-thumb img {
  width: 78px;
  height: 104px;
  object-fit: cover;
}

.rank-main h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.rank-action {
  padding: 10px 16px;
  color: white;
  background: rgba(16, 185, 129, 0.9);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumb a:hover {
  color: #34d399;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.poster-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  color: white;
  background: #000;
}

.poster-layer.is-hidden {
  display: none;
}

.poster-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.62) saturate(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(2, 6, 23, 0.38) 48%, rgba(2, 6, 23, 0.85) 100%);
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 24px 80px rgba(16, 185, 129, 0.45);
}

.detail-article {
  margin-top: 22px;
  padding: clamp(22px, 4vw, 34px);
}

.detail-article h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.detail-article .lead {
  margin: 0 0 20px;
  color: #dbeafe;
  font-size: 1.18rem;
  line-height: 1.85;
}

.detail-article h2 {
  margin: 34px 0 12px;
  font-size: 1.45rem;
}

.detail-article p {
  color: var(--muted-strong);
  line-height: 2;
}

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

.detail-meta div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.08);
}

.detail-meta dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.detail-meta dd {
  margin: 5px 0 0;
  color: var(--text);
  font-weight: 800;
}

.side-card {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.side-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

.side-card h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.side-card .primary-btn {
  width: 100%;
  margin-top: 16px;
}

.text-section {
  display: grid;
  gap: 20px;
}

.text-card {
  padding: 28px;
}

.text-card h2 {
  font-size: 1.7rem;
}

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

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

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

.site-footer a {
  display: block;
  margin: 7px 0;
}

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

.site-footer h3 {
  margin: 0 0 10px;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.is-filter-hidden {
  display: none !important;
}

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

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

  .side-card {
    position: static;
  }

  .filter-panel {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero {
    min-height: 650px;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.55) 48%, rgba(2, 6, 23, 0.25) 100%),
      linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.38));
  }

  .stats-section {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .section-head,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-row {
    grid-template-columns: 44px 64px minmax(0, 1fr);
  }

  .rank-action {
    grid-column: 3;
    width: max-content;
  }

  .rank-thumb img {
    width: 64px;
    height: 86px;
  }

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

@media (max-width: 560px) {
  .nav-container {
    width: min(100% - 22px, 1240px);
    height: 66px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .hero-content,
  .section,
  .category-overview,
  .detail-layout,
  .breadcrumb,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1240px);
  }

  .hero-actions {
    width: 100%;
  }

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

  .page-hero {
    margin-top: 18px;
    padding: 30px 20px;
    border-radius: 24px;
  }

  .stats-section,
  .movie-grid,
  .movie-grid.compact-grid,
  .category-grid,
  .filter-panel,
  .detail-meta,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 42px 0;
  }

  .card-body {
    padding: 15px;
  }

  .rank-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rank-thumb {
    display: none;
  }

  .rank-action {
    grid-column: 2;
  }

  .play-button {
    width: 70px;
    height: 70px;
  }
}
