:root {
  color-scheme: dark;
  --bg-a: #020617;
  --bg-b: #0f172a;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.78);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.18);
  --rose: #fb7185;
  --yellow: #facc15;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius: 22px;
  --max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, var(--bg-a), var(--bg-b) 42%, var(--bg-a));
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), #059669);
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.4);
  font-size: 14px;
  padding-left: 2px;
}

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

.nav-link,
.mobile-nav a {
  padding: 10px 16px;
  color: var(--muted-strong);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
}

.mobile-nav {
  display: none;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 16px;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav.open {
  display: flex;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 28%, rgba(16, 185, 129, 0.16), transparent 26%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.86) 48%, rgba(15, 23, 42, 0.16));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--emerald);
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0 0 28px;
  max-width: 680px;
  color: var(--muted-strong);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.8;
}

.hero-actions,
.section-head,
.meta-line,
.card-tags,
.breadcrumbs,
.detail-tags,
.action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), #059669);
  box-shadow: 0 14px 35px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

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

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

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

.main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 20px 0;
}

.full-band {
  margin: 56px 0;
  padding: 56px 0;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.86));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.band-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  margin-bottom: 64px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 26px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.section-title span {
  color: var(--rose);
  font-size: 28px;
}

.section-more {
  color: var(--emerald);
  font-weight: 700;
}

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

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

.movie-card,
.list-card,
.category-tile,
.panel {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.movie-card {
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1e293b);
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.poster-badge,
.poster-year,
.rank-num {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: #fff;
  background: var(--emerald);
}

.poster-year {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%) scale(0.86);
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border-radius: 999px;
  color: #fff;
  background: var(--emerald);
  opacity: 0;
  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,
.list-info h3 {
  margin: 0 0 8px;
  color: #fff;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.card-body p,
.list-info p,
.page-title p,
.category-tile p,
.detail-copy p,
.footer-inner p {
  color: var(--muted);
  line-height: 1.75;
}

.card-body p {
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags span,
.detail-tags span,
.meta-line span {
  color: var(--muted);
  font-size: 13px;
}

.movie-card:hover h3,
.list-card:hover h3 {
  color: var(--emerald);
}

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

.category-tile {
  position: relative;
  min-height: 168px;
  padding: 24px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 84% 14%, rgba(255, 255, 255, 0.18), transparent 30%);
}

.category-tile:hover {
  transform: translateY(-4px) scale(1.01);
}

.category-tile h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 22px;
}

.category-tile p {
  position: relative;
  margin: 0 0 18px;
}

.category-tile span {
  position: relative;
  color: #fff;
  font-weight: 800;
}

.category-hot-dramas {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
}

.category-classic-series {
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
}

.category-suspense-crime {
  background: linear-gradient(135deg, #0f172a, #475569);
}

.category-romance-life {
  background: linear-gradient(135deg, #fb7185, #f97316);
}

.category-action-adventure {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
}

.category-costume-fantasy {
  background: linear-gradient(135deg, #7c3aed, #10b981);
}

.category-comedy-animation {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.category-global-picks {
  background: linear-gradient(135deg, #14b8a6, #2563eb);
}

.list-stack {
  display: grid;
  gap: 18px;
}

.list-card a {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 150px;
}

.list-poster {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1e293b);
}

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

.list-info {
  padding: 22px;
}

.meta-line {
  margin-top: 12px;
}

.meta-line span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.rank-num {
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--yellow));
}

.page-hero {
  padding: 62px 0 22px;
}

.page-title {
  max-width: 850px;
}

.page-title p {
  margin: 16px 0 0;
  font-size: 17px;
}

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

.search-field {
  position: relative;
}

.search-field span {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-field input,
.filter-bar select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: #fff;
  background: rgba(30, 41, 59, 0.86);
}

.search-field input {
  padding: 0 18px 0 46px;
}

.filter-bar select {
  padding: 0 18px;
}

.search-field input:focus,
.filter-bar select:focus {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

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

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

.breadcrumbs {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--emerald);
}

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

.player-card {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #000;
  box-shadow: var(--shadow);
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.18));
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 7px;
  border-radius: 999px;
  background: var(--emerald);
  box-shadow: 0 18px 44px rgba(16, 185, 129, 0.34);
  font-size: 36px;
  transition: transform 0.25s ease;
}

.play-overlay:hover span {
  transform: scale(1.08);
}

.play-overlay.is-hidden {
  display: none;
  pointer-events: none;
}

.detail-title {
  margin: 28px 0 20px;
}

.detail-tags {
  margin: 16px 0 0;
}

.detail-tags span {
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: #a7f3d0;
}

.detail-copy {
  margin-top: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
}

.detail-copy h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-copy p {
  margin: 0 0 18px;
}

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

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

.side-poster {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #111827, #1e293b);
  margin-bottom: 18px;
}

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

.info-list {
  display: grid;
  gap: 12px;
  color: var(--muted-strong);
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.info-list span:first-child {
  color: var(--muted);
}

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

.site-footer {
  margin-top: 72px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 1));
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 28px;
}

.footer-inner p {
  margin: 14px 0 0;
}

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

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

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

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 76px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.52));
  }

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

  .list-card a {
    grid-template-columns: 132px 1fr;
  }

  .list-info {
    padding: 14px;
  }

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

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

@media (max-width: 480px) {
  .header-inner {
    padding: 12px 14px;
  }

  .logo {
    font-size: 17px;
  }

  .main,
  .band-inner,
  .hero-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .movie-grid,
  .movie-grid.compact-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .list-card a {
    grid-template-columns: 1fr;
  }

  .play-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
