:root {
  --bg: #050816;
  --bg-soft: #0b1024;
  --panel: rgba(16, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --primary: #38bdf8;
  --secondary: #a78bfa;
  --accent: #f59e0b;
  --danger: #fb7185;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.28), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(168, 85, 247, 0.22), transparent 28rem),
    linear-gradient(180deg, #030712 0%, #07111f 42%, #050816 100%);
}

body.menu-open {
  overflow: hidden;
}

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

img,
video {
  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: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 34px rgba(56, 189, 248, 0.28);
}

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

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

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

.nav a:hover,
.nav a.active {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.14);
  transform: translateY(-1px);
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 34px 0 42px;
}

.hero-shell {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
}

.hero-track {
  position: relative;
  min-height: 610px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 38px;
  align-items: center;
  padding: 58px;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease, visibility 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.82) 42%, rgba(3, 7, 18, 0.26) 100%),
    radial-gradient(circle at 28% 20%, rgba(56, 189, 248, 0.26), transparent 32rem),
    radial-gradient(circle at 78% 32%, rgba(167, 139, 250, 0.34), transparent 24rem);
  z-index: 1;
}

.hero-content,
.hero-poster-wrap {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 22px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-text {
  max-width: 690px;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.85;
}

.hero-meta,
.meta-row,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin: 20px 0 26px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.62);
  font-size: 13px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #06111f;
  background: linear-gradient(135deg, #7dd3fc, #c4b5fd);
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.24);
}

.btn-ghost {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.58);
}

.hero-poster-wrap {
  justify-self: end;
  width: min(420px, 100%);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  aspect-ratio: 3 / 4;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.52);
  transform: rotate(1.5deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(3, 7, 18, 0.88) 100%);
}

.hero-poster-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  font-size: 14px;
  color: var(--muted-strong);
}

.hero-dots {
  position: absolute;
  left: 58px;
  bottom: 34px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.search-panel {
  margin-top: -18px;
  position: relative;
  z-index: 6;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr 170px 170px;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.search-box input,
.search-box select,
.inline-filter input,
.inline-filter select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  outline: none;
  padding: 0 14px;
}

.search-box input:focus,
.search-box select:focus,
.inline-filter input:focus,
.inline-filter select:focus {
  border-color: rgba(56, 189, 248, 0.64);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.section {
  padding: 36px 0;
}

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

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

.section-desc {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
}

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

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

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

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

.movie-card,
.category-card,
.rank-item,
.info-panel,
.player-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.62));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 24px 70px rgba(14, 165, 233, 0.14);
}

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

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 10px;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title a:hover {
  color: #7dd3fc;
}

.card-meta {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.card-summary {
  display: -webkit-box;
  min-height: 66px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.16);
  font-size: 12px;
}

.category-card {
  display: grid;
  min-height: 160px;
  padding: 20px;
  border-radius: var(--radius-lg);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(167, 139, 250, 0.46);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 60px 76px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #06111f;
  background: linear-gradient(135deg, #fcd34d, #fb7185);
  font-weight: 1000;
}

.rank-cover {
  width: 76px;
  height: 104px;
  overflow: hidden;
  border-radius: 14px;
  background: #020617;
}

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

.rank-title {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.page-hero {
  padding: 48px 0 24px;
}

.page-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(168, 85, 247, 0.14)),
    rgba(15, 23, 42, 0.78);
  padding: 34px;
  box-shadow: var(--shadow);
}

.page-panel h1 {
  margin: 12px 0 10px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.inline-filter {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin: 22px 0 0;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.45fr);
  gap: 24px;
  padding: 34px 0;
}

.player-panel,
.info-panel {
  overflow: hidden;
  border-radius: var(--radius-xl);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text);
  background: rgba(3, 7, 18, 0.42);
  cursor: pointer;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, #7dd3fc, #c4b5fd);
  box-shadow: 0 18px 46px rgba(56, 189, 248, 0.34);
  font-size: 32px;
  transform: translateZ(0);
}

.player-info {
  padding: 24px;
}

.player-info h1 {
  margin: 12px 0 14px;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-meta {
  margin-bottom: 18px;
}

.prose {
  color: var(--muted-strong);
  line-height: 1.88;
}

.prose h2 {
  margin: 26px 0 10px;
  color: var(--text);
  font-size: 24px;
}

.prose p {
  margin: 0 0 14px;
}

.side-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #020617;
}

.side-poster img {
  width: 100%;
  height: auto;
}

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

.breadcrumb a:hover {
  color: #7dd3fc;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  padding: 32px 0;
  color: var(--muted);
}

.footer h2,
.footer h3 {
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.footer-links a:hover {
  color: #7dd3fc;
}

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 44px;
  }

  .hero-poster-wrap {
    display: none;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 76px 12px auto 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(3, 7, 18, 0.96);
    box-shadow: var(--shadow);
  }

  body.menu-open .nav {
    display: flex;
  }

  .nav a {
    border-radius: 14px;
  }

  .hero-shell,
  .hero-track {
    min-height: 560px;
  }

  .hero-slide {
    padding: 32px 22px 78px;
  }

  .hero h1,
  .hero h2 {
    font-size: 42px;
  }

  .hero-dots {
    left: 24px;
    bottom: 28px;
  }

  .search-box,
  .inline-filter {
    grid-template-columns: 1fr;
  }

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

  .section-head,
  .footer-inner {
    display: block;
  }

  .rank-item {
    grid-template-columns: 44px 64px 1fr;
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .preview-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .page-panel {
    padding: 24px;
  }

  .rank-summary {
    display: none;
  }
}
