:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-glow: rgba(14, 165, 233, 0.45);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  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;
  background:
    radial-gradient(circle at 12% 12%, rgba(14, 165, 233, 0.13), transparent 34rem),
    radial-gradient(circle at 85% 4%, rgba(59, 130, 246, 0.15), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
}

body.is-locked {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}

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

.nav-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  box-shadow: 0 0 28px var(--accent-glow);
}

.brand-name {
  font-size: 20px;
  background: linear-gradient(90deg, #7dd3fc, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link,
.mobile-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  position: relative;
  padding: 22px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 15px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  border-radius: 99px;
  background: var(--accent);
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: white;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

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

.search-toggle,
.menu-toggle,
.ghost-button,
.primary-button,
.category-button,
.filter-button,
.player-start,
.search-close {
  border: 0;
  cursor: pointer;
}

.search-toggle,
.menu-toggle {
  border-radius: 12px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.search-toggle {
  padding: 9px 16px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  font-size: 20px;
}

.search-toggle:hover,
.menu-toggle:hover {
  color: white;
  background: rgba(51, 65, 85, 0.78);
}

.mobile-menu {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-menu.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--line);
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  padding: 92px 18px 24px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(16px);
}

.search-panel[hidden] {
  display: none;
}

.search-box {
  position: relative;
  width: min(760px, 100%);
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
  box-shadow: var(--shadow);
}

.search-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(51, 65, 85, 0.88);
  color: white;
  font-size: 22px;
}

.search-label {
  display: block;
  color: white;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

.search-input,
.local-filter {
  width: 100%;
  color: white;
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
}

.search-input:focus,
.local-filter:focus {
  border-color: rgba(56, 189, 248, 0.68);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.search-results {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  max-height: 58vh;
  overflow: auto;
}

.search-result-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
}

.search-result-item img {
  width: 64px;
  height: 90px;
  border-radius: 10px;
  object-fit: cover;
}

.search-result-item strong {
  display: block;
  color: white;
  margin: 5px 0 6px;
}

.search-result-item span {
  color: var(--dim);
  font-size: 13px;
}

.hero-slider {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(56, 189, 248, 0.18), transparent 32rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.70) 46%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 26%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 74vh;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 86px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7dd3fc;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
}

.hero-title {
  display: block;
  margin: 0 0 18px;
  color: white;
  font-size: clamp(38px, 8vw, 82px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.hero-desc {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.72;
  margin: 0 0 22px;
}

.hero-meta,
.detail-meta,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 18px 42px var(--accent-glow);
}

.ghost-button {
  color: white;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
}

.primary-button:hover,
.ghost-button:hover,
.category-card:hover,
.movie-card:hover,
.ranking-row:hover,
.compact-card:hover {
  transform: translateY(-3px);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  border: 0;
  background: rgba(203, 213, 225, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--accent);
}

.page-hero {
  padding: 72px 0 36px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.58), rgba(15, 23, 42, 0.82));
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 920px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 900;
}

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

.section {
  padding: 54px 0;
}

.section.compact {
  padding: 36px 0;
}

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

.section-head h2 {
  margin: 0;
  color: white;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--dim);
}

.section-more {
  flex: 0 0 auto;
  color: #7dd3fc;
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.35);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.68);
}

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

.movie-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0.9;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84) 0%, rgba(2, 6, 23, 0.22) 44%, rgba(2, 6, 23, 0.02) 100%);
}

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.92);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(14, 165, 233, 0.86);
  opacity: 0;
  box-shadow: 0 18px 42px var(--accent-glow);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 6px;
  padding: 52px 13px 14px;
}

.movie-info strong {
  color: white;
  font-size: 15px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info em,
.movie-info span {
  color: var(--dim);
  font-style: normal;
  font-size: 12px;
  line-height: 1.45;
}

.movie-info span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-card {
  display: block;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72));
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  border-color: rgba(56, 189, 248, 0.52);
}

.category-card h2,
.category-card h3 {
  margin: 14px 0 8px;
  font-size: 22px;
  font-weight: 900;
}

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

.preview-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preview-strip img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 28px 0 24px;
}

.filter-button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  color: white;
  background: rgba(14, 165, 233, 0.9);
  font-weight: 800;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 54px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.85);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-row:hover {
  border-color: rgba(56, 189, 248, 0.5);
}

.rank-number {
  color: #7dd3fc;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.ranking-row img {
  width: 72px;
  height: 104px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-copy strong {
  display: block;
  color: white;
  font-size: 18px;
  margin-bottom: 6px;
}

.ranking-copy p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

.ranking-copy span,
.ranking-link {
  color: var(--dim);
  font-size: 13px;
}

.ranking-link {
  font-weight: 800;
  color: #7dd3fc;
}

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

.player-panel,
.detail-panel,
.related-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
}

.player-panel {
  position: relative;
  overflow: hidden;
  background: black;
}

.player-panel video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background:
    radial-gradient(circle at 50% 45%, rgba(14, 165, 233, 0.24), transparent 22rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.34));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 22px 60px var(--accent-glow);
  font-size: 30px;
}

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

.detail-panel,
.related-panel {
  padding: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--dim);
  font-size: 14px;
}

.breadcrumb a {
  color: #7dd3fc;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  font-weight: 900;
}

.detail-section {
  margin-top: 24px;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 22px;
}

.detail-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

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

.compact-card {
  display: grid;
  gap: 10px;
  color: white;
  transition: transform 0.2s ease;
}

.compact-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.compact-card span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.92));
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 36px 0;
}

.footer-brand p {
  max-width: 580px;
  color: var(--dim);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  font-weight: 700;
}

.footer-links a:hover {
  color: white;
}

.empty-state {
  padding: 36px;
  border-radius: 18px;
  color: var(--dim);
  text-align: center;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
}

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

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

@media (max-width: 820px) {
  .main-nav {
    display: none;
  }

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

  .hero-slider,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content {
    align-items: flex-end;
    padding: 92px 0 78px;
  }

  .section-head,
  .footer-shell,
  .filter-row {
    display: grid;
  }

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

  .ranking-row {
    grid-template-columns: 42px 62px minmax(0, 1fr);
  }

  .ranking-link {
    grid-column: 3;
  }
}

@media (max-width: 520px) {
  .nav-shell,
  .footer-shell,
  .container,
  .hero-content {
    width: min(100% - 22px, 1240px);
  }

  .brand-name {
    font-size: 17px;
  }

  .search-toggle {
    padding: 9px 12px;
  }

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

  .hero-desc {
    font-size: 15px;
  }

  .hero-actions {
    display: grid;
  }

  .movie-grid,
  .movie-grid.large,
  .related-grid {
    gap: 14px;
  }

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

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

  .player-start span {
    width: 70px;
    height: 70px;
  }
}
