:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --card: rgba(30, 41, 59, 0.72);
  --card-strong: rgba(15, 23, 42, 0.9);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --brand: #2563eb;
  --brand-2: #06b6d4;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
}

* {
  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;
  color: var(--text);
  background: radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.28), transparent 34%), linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.25);
}

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

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

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(37, 99, 235, 0.22);
}

.header-search {
  display: flex;
  align-items: center;
  min-width: 220px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.58);
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 12px 10px 16px;
  color: #fff;
  background: transparent;
}

.header-search button {
  border: 0;
  cursor: pointer;
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: currentColor;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74) 44%, rgba(2, 6, 23, 0.12)), linear-gradient(0deg, rgba(15, 23, 42, 0.85), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 570px;
  display: flex;
  align-items: center;
}

.hero-panel {
  max-width: 700px;
  padding: 80px 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.18);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 8px 42px rgba(0, 0, 0, 0.45);
}

.hero p {
  margin: 0 0 28px;
  max-width: 620px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 45px rgba(14, 165, 233, 0.3);
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: none;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 36px;
  background: #fff;
}

.page-hero {
  padding: 58px 0 30px;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.045em;
}

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

.section {
  padding: 42px 0;
}

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

.section-title {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.section-more {
  color: #7dd3fc;
  font-weight: 700;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(30, 41, 59, 0.88);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(8, 47, 73, 0.84));
}

.poster-link.wide {
  aspect-ratio: 16 / 9;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.9);
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 13px;
  margin-bottom: 10px;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.clamp-2,
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-2 {
  -webkit-line-clamp: 2;
}

.clamp-3 {
  -webkit-line-clamp: 3;
}

.category-strip,
.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-pill,
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.52);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-pill:hover,
.filter-pill:hover,
.filter-pill.active {
  color: #fff;
  border-color: rgba(125, 211, 252, 0.44);
  background: rgba(37, 99, 235, 0.26);
}

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(15, 23, 42, 0.84));
  box-shadow: var(--shadow);
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

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

.category-card span {
  margin-top: 22px;
  color: #7dd3fc;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 96px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.8), rgba(6, 182, 212, 0.8));
}

.rank-cover {
  width: 96px;
  height: 126px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

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

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

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

.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 150px;
  gap: 14px;
  margin: 20px 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: 0;
  border-radius: 14px;
  padding: 12px 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.3));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-control {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 22px 54px rgba(14, 165, 233, 0.36);
}

.play-control svg {
  margin-left: 5px;
}

.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 52px rgba(2, 6, 23, 0.24);
}

.detail-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.045em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-meta span,
.tag {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.2);
}

.detail-card h2 {
  margin: 28px 0 12px;
  font-size: 22px;
}

.detail-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 4px;
}

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
}

.side-link:hover {
  background: rgba(37, 99, 235, 0.2);
}

.side-link img {
  width: 74px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.side-link h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.side-link p {
  margin: 0;
  color: var(--subtle);
  font-size: 13px;
}

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

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

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--subtle);
}

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

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

.empty-state {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--card);
}

.empty-state:empty {
  display: none;
}

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

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

  .rank-list,
  .category-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
  }

  .mobile-toggle {
    display: inline-block;
  }

  .nav-links,
  .header-search {
    display: none;
    width: 100%;
  }

  .nav-links.open,
  .header-search.open {
    display: flex;
  }

  .nav-links.open {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    width: 100%;
  }

  .hero,
  .hero-content {
    min-height: 520px;
  }

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

  .rank-item {
    grid-template-columns: 52px 82px 1fr;
  }

  .rank-cover {
    width: 82px;
    height: 108px;
  }

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

@media (max-width: 560px) {
  .container {
    padding: 0 14px;
  }

  .logo {
    font-size: 19px;
  }

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

  .hero p {
    font-size: 16px;
  }

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

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

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

  .detail-card {
    padding: 20px;
  }
}
