:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.68);
  --line: rgba(96, 165, 250, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --gold: #facc15;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 32rem),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #08111f 44%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(96, 165, 250, 0.22);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.95));
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #2563eb, #7c3aed 55%, #06b6d4);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a,
.nav-search button,
.action-button,
.filter-button,
.play-overlay,
.page-link {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.46);
  color: #e5e7eb;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.main-nav a:hover,
.nav-search button:hover,
.action-button:hover,
.filter-button:hover,
.play-overlay:hover,
.page-link:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.7);
  background: rgba(37, 99, 235, 0.52);
  color: white;
}

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

.nav-search input,
.search-box input,
.search-panel input,
.search-panel select {
  width: 190px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  color: white;
  background: rgba(2, 6, 23, 0.52);
}

.nav-search input::placeholder,
.search-box input::placeholder,
.search-panel input::placeholder {
  color: rgba(203, 213, 225, 0.72);
}

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

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid rgba(96, 165, 250, 0.18);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  background-position: center;
  background-size: cover;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(15, 23, 42, 0.18) 78%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.92));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  gap: 32px;
  align-items: center;
  padding: 58px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(30, 64, 175, 0.28);
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.page-hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero .summary {
  max-width: 680px;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-meta {
  margin: 18px 0 22px;
}

.badge,
.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

.badge.hot {
  color: #fef3c7;
  border-color: rgba(250, 204, 21, 0.32);
  background: rgba(234, 179, 8, 0.15);
}

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

.action-button.primary,
.play-overlay {
  border-color: transparent;
  color: white;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.35);
}

.action-button.ghost {
  background: rgba(15, 23, 42, 0.64);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 560px);
  padding: 10px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.search-box input {
  flex: 1;
  width: auto;
  border: none;
  background: transparent;
}

.hero-poster-card {
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.5);
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #1e3a8a, #020617);
}

.hero-thumbs {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  width: min(1240px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.hero-thumb {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  padding: 8px;
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(12px);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.hero-thumb.active,
.hero-thumb:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.78);
  background: rgba(37, 99, 235, 0.34);
}

.hero-thumb strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}

.hero-thumb span {
  color: var(--subtle);
  font-size: 12px;
}

.section {
  padding: 54px 0 10px;
}

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

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

.section-subtitle,
.page-hero p,
.card p,
.movie-card p,
.detail-copy p {
  color: var(--muted);
}

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

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

.movie-card,
.card,
.rank-card,
.detail-panel,
.search-panel,
.video-panel {
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.46));
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.22);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.64);
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.46), rgba(15, 23, 42, 0.72));
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.poster-wrap .badge {
  position: absolute;
  top: 10px;
  left: 10px;
}

.poster-wrap .score {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-width: 52px;
  text-align: center;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fef3c7;
  font-weight: 900;
  font-size: 12px;
  background: rgba(234, 179, 8, 0.18);
  border: 1px solid rgba(250, 204, 21, 0.38);
  backdrop-filter: blur(8px);
}

.movie-card-body {
  padding: 15px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.32;
}

.line-clamp-2,
.movie-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card {
  padding: 22px;
}

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

.category-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 68%);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.rank-no {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fef3c7;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.28), rgba(59, 130, 246, 0.2));
}

.rank-card img {
  width: 78px;
  height: 105px;
  border-radius: 14px;
  object-fit: cover;
  background: #1e3a8a;
}

.page-hero {
  padding: 54px 0 10px;
  align-items: center;
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 58px);
}

.breadcrumb {
  margin: 24px 0 10px;
  color: var(--subtle);
  font-size: 14px;
}

.breadcrumb a {
  color: #bfdbfe;
}

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

.video-panel {
  overflow: hidden;
  margin-bottom: 24px;
}

.video-shell {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #020617;
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 900;
}

.player-status {
  padding: 12px 16px 16px;
  color: var(--subtle);
  font-size: 13px;
}

.detail-panel {
  padding: 24px;
}

.detail-copy h2,
.detail-copy h3 {
  margin: 0 0 12px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  background: #0f172a;
}

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

.search-panel {
  padding: 18px;
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  border-radius: 16px;
}

.sitemap-list {
  columns: 4 220px;
  column-gap: 24px;
  padding: 22px;
}

.sitemap-list a {
  display: block;
  break-inside: avoid;
  padding: 7px 0;
  color: #dbeafe;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.16);
}

.footer {
  margin-top: 64px;
  padding: 34px 0 42px;
  color: var(--subtle);
  border-top: 1px solid rgba(96, 165, 250, 0.18);
  background: rgba(2, 6, 23, 0.48);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

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

.footer-links a {
  color: #bfdbfe;
}

.hidden-card {
  display: none !important;
}

@media (max-width: 980px) {
  .header-inner {
    height: auto;
    padding: 12px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
  }

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

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

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

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

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

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

@media (max-width: 640px) {
  .container,
  .header-inner,
  .footer-inner,
  .hero-content,
  .hero-thumbs {
    width: min(100% - 22px, 1240px);
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    min-height: 590px;
    padding-top: 38px;
  }

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

  .hero-thumbs {
    bottom: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .rank-card img {
    display: none;
  }

  .rank-no {
    display: none;
  }

  .nav-search {
    width: 100%;
  }

  .nav-search input {
    flex: 1;
    width: auto;
  }

  .video-shell {
    min-height: auto;
  }
}
