:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --orange: #f97316;
  --green: #10b981;
  --red: #ef4444;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 12%, rgba(34, 211, 238, 0.18), transparent 30%),
    radial-gradient(circle at 85% 0%, rgba(59, 130, 246, 0.16), transparent 28%),
    linear-gradient(180deg, #0f172a 0%, #020617 32%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.28s ease, background 0.28s ease;
}

.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
}

.nav-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.42);
}

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

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  transform: translateY(-1px);
}

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

.main-top {
  padding-top: 100px;
}

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
}

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

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

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

.hero-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.06);
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.1) 36%, rgba(2, 6, 23, 0.28));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 720px;
  margin: 0 auto;
  padding: 150px 0 160px;
  display: flex;
  align-items: flex-end;
}

.hero-copy {
  width: min(680px, 100%);
}

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

.kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-description {
  max-width: 640px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.75;
}

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

.meta-pill,
.tag,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.meta-pill {
  padding: 8px 12px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.tag {
  padding: 8px 11px;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.18);
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  min-height: 48px;
  border-radius: 15px;
  border: 1px solid transparent;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 20px 50px rgba(34, 211, 238, 0.34);
}

.btn-ghost {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.66);
  border-color: rgba(148, 163, 184, 0.18);
}

.hero-previews {
  position: absolute;
  left: 50%;
  bottom: 44px;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.hero-preview {
  min-height: 92px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  color: #e2e8f0;
  text-align: left;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.hero-preview strong,
.hero-preview span {
  display: block;
}

.hero-preview strong {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.35;
}

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

.hero-preview.is-active,
.hero-preview:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(8, 145, 178, 0.18);
}

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

.section {
  padding: 76px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.055em;
}

.section-lead {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: var(--cyan);
  font-weight: 800;
}

.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));
  gap: 18px;
}

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.52));
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.2);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.28), rgba(30, 41, 59, 0.8));
}

.movie-grid.compact .poster-link {
  aspect-ratio: 3 / 4;
}

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

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

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 32px;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 9px;
  color: var(--cyan);
  background: rgba(2, 6, 23, 0.76);
}

.type-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.78);
}

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

.movie-title {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.movie-title a:hover {
  color: var(--cyan);
}

.movie-desc {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: #64748b;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(8, 145, 178, 0.28));
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -40px;
  top: -50px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.16);
}

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

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 24px;
}

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

.rank-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row {
  display: grid;
  grid-template-columns: 72px 100px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(15, 23, 42, 0.92);
}

.rank-number {
  color: var(--cyan);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.9);
}

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

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

.rank-title a:hover {
  color: var(--cyan);
}

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

.page-hero {
  padding: 150px 0 62px;
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.02));
}

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

.breadcrumb a:hover {
  color: var(--cyan);
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

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

.filter-bar,
.search-panel {
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
}

.input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  color: #ffffff;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

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

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.12), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.22s ease;
}

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

.player-button {
  width: 94px;
  height: 94px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 0 14px rgba(34, 211, 238, 0.12), 0 22px 60px rgba(34, 211, 238, 0.3);
  cursor: pointer;
}

.detail-panel,
.side-panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.detail-panel,
.content-panel {
  padding: 26px;
}

.side-panel {
  position: sticky;
  top: 96px;
  padding: 20px;
}

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

.detail-meta {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.content-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.content-panel p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.9;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

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

.side-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-card:hover {
  background: rgba(8, 145, 178, 0.14);
  transform: translateY(-2px);
}

.side-card img {
  width: 96px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.92);
}

.side-card strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.35;
}

.side-card span {
  color: var(--muted);
  font-size: 12px;
}

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

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

.site-footer {
  margin-top: 70px;
  padding: 56px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.48), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.footer-grid p,
.footer-grid a {
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid a:hover {
  color: var(--cyan);
}

.footer-title {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.copyright {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

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

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

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

  .side-panel {
    position: static;
  }

  .hero-previews {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-preview:nth-child(n + 4) {
    display: none;
  }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 82px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-content {
    padding: 126px 0 190px;
  }

  .hero h1,
  .hero h2 {
    font-size: clamp(38px, 13vw, 58px);
  }

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

  .hero-previews {
    grid-template-columns: 1fr;
    bottom: 24px;
  }

  .hero-preview:nth-child(n + 2) {
    display: none;
  }

  .section-header,
  .footer-grid {
    display: block;
  }

  .section {
    padding: 52px 0;
  }

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

  .rank-row {
    grid-template-columns: 48px 76px 1fr;
  }

  .rank-row .btn {
    grid-column: 2 / -1;
  }

  .page-hero {
    padding-top: 126px;
  }

  .detail-panel,
  .content-panel {
    padding: 20px;
  }
}
