:root {
  --bg: #07111f;
  --bg-soft: #0d1b33;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-2: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #8b5cf6;
  --accent-3: #f59e0b;
  --success: #34d399;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
  --radius: 26px;
  --radius-sm: 18px;
  --max: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 25%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.16), transparent 28%),
    linear-gradient(180deg, #06101e 0%, #07111f 36%, #0a1324 100%);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(7, 17, 31, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 30px rgba(34, 211, 238, 0.22);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  font-size: 1.02rem;
}

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

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.25s ease;
}

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

.hero {
  padding: 24px 0 14px;
}

.hero-shell {
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 118, 110, 0.28)),
    radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 34%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(34, 211, 238, 0.15), transparent 30%),
    linear-gradient(300deg, rgba(139, 92, 246, 0.20), transparent 35%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  padding: 28px;
  min-height: 640px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: #e0f2fe;
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 0.92rem;
}

.hero-title {
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 0.98;
  margin: 0;
  letter-spacing: -0.03em;
}

.hero-desc {
  max-width: 64ch;
  font-size: 1.02rem;
  color: var(--muted);
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  border: 1px solid transparent;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 35px rgba(34, 211, 238, 0.20);
  color: #fff;
}

.btn-ghost {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.10);
  color: #fff;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.9rem;
}

.hero-carousel {
  position: relative;
  min-height: 100%;
  display: grid;
  align-content: center;
}

.slider {
  position: relative;
  min-height: 560px;
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

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

.slide-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(0,0,0,0.36);
  border: 1px solid rgba(255,255,255,0.12);
  background: #0b1020;
}

.slide-poster img,
.slide-poster svg {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.slide-card {
  border-radius: 24px;
  padding: 18px 18px 16px;
  background: rgba(7, 17, 31, 0.66);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.10);
}

.slide-card h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.slide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.slider-nav {
  position: absolute;
  inset: auto 18px 18px auto;
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  color: #fff;
  cursor: pointer;
}

.section {
  padding: 26px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.section-head p {
  margin: 0;
  color: var(--muted-2);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.35);
}

.movie-card .poster {
  aspect-ratio: 2 / 3;
  background: #0b1020;
  overflow: hidden;
}

.movie-card img,
.movie-card svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.movie-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card .meta,
.movie-card .excerpt {
  color: var(--muted-2);
  font-size: 0.89rem;
}

.movie-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: #dbeafe;
  font-size: 0.78rem;
}

.category-card,
.stat-card {
  padding: 18px;
}

.category-card h3,
.stat-card h3 {
  margin: 0 0 8px;
}

.category-card p,
.stat-card p {
  margin: 0;
  color: var(--muted-2);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 86px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.rank-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  text-align: center;
}

.rank-thumb {
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
}

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

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.rank-info p {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.88rem;
}

.detail-hero {
  padding: 24px 0 10px;
}

.detail-shell {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 22px;
  align-items: start;
  padding: 24px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(15,23,42,0.92), rgba(15,23,42,0.74));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
}

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

.detail-top h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.detail-top .lead {
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 72ch;
}

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

.info-box {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.info-box .label {
  color: var(--muted-2);
  font-size: 0.86rem;
}

.info-box .value {
  margin-top: 6px;
  font-weight: 700;
}

.player-shell {
  margin-top: 18px;
  border-radius: 26px;
  overflow: hidden;
  background: #050b17;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.28);
}

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

.player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  flex-wrap: wrap;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-2);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.breadcrumb a {
  color: #e2e8f0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  background: rgba(15,23,42,0.78);
  border: 1px solid var(--line);
  margin-bottom: 18px;
}

.filter-bar input,
.filter-bar select,
.search-panel input {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

.filter-bar input::placeholder,
.search-panel input::placeholder {
  color: #94a3b8;
}

.filter-bar .grow,
.search-panel .grow {
  flex: 1 1 280px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34,211,238,0.10);
  color: #cffafe;
  border: 1px solid rgba(34,211,238,0.16);
}

.footer {
  margin-top: 28px;
  padding: 24px 0 40px;
  color: var(--muted-2);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid rgba(148,163,184,0.14);
}

.small {
  font-size: 0.92rem;
}

.search-panel {
  padding: 18px;
  border-radius: 24px;
  background: rgba(15,23,42,0.78);
  border: 1px solid var(--line);
}

.search-results {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.search-card .body {
  padding: 12px 12px 14px;
}

.search-empty {
  padding: 24px;
  border-radius: 22px;
  border: 1px dashed rgba(255,255,255,0.18);
  color: var(--muted-2);
}

.pager {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pager button {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

@media (max-width: 1180px) {
  .grid.movies,
  .grid.categories,
  .grid.summary,
  .related-grid,
  .search-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-grid,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .slider {
    min-height: 520px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(var(--max), calc(100% - 22px));
  }

  .header-inner {
    flex-direction: column;
    align-items: start;
  }

  .grid.movies,
  .grid.categories,
  .grid.summary,
  .related-grid,
  .search-results,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid,
  .detail-shell,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
    padding: 20px;
  }

  .slider {
    min-height: 460px;
  }

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

  .nav {
    gap: 4px;
  }

  .nav a {
    padding: 8px 10px;
  }
}
