:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --gold: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 36rem),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.12), transparent 32rem),
    linear-gradient(135deg, #020617 0%, #0f172a 44%, #020617 100%);
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(20px);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.35);
  font-size: 15px;
}

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

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

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

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(14, 165, 233, 0.16);
}

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

.nav-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  margin: 4px auto;
  border-radius: 999px;
  background: white;
}

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

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(2, 6, 23, 0.86) 78%, var(--bg) 100%);
  pointer-events: none;
}

.hero-slider {
  position: relative;
  z-index: 1;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: 34px;
  align-items: center;
  padding: clamp(28px, 4vw, 54px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.8) 40%, rgba(2, 6, 23, 0.22) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.04);
}

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

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

.hero h1,
.hero h2 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 690px;
  margin: 0 0 22px;
  color: var(--soft);
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.36);
  background: rgba(30, 41, 59, 0.92);
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 16px 35px rgba(14, 165, 233, 0.32);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7dd3fc, #0ea5e9);
}

.hero-tags,
.compact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.compact-tags span,
.meta-pill {
  padding: 6px 9px;
  border-radius: 9px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.78);
  font-size: 12px;
}

.hero-poster {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-poster img {
  width: min(330px, 100%);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.58);
  transform: rotate(2deg);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: white;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

.hero-arrow {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-size: 22px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.45;
}

.hero-dot.active {
  width: 26px;
  opacity: 1;
  background: var(--accent);
}

.section {
  padding: 56px 0;
}

.section-dark {
  background: rgba(15, 23, 42, 0.34);
}

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

.section-title h1,
.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

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

.section-more {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.scroll-strip {
  display: flex;
  gap: 18px;
  padding: 6px 2px 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.scroll-strip::-webkit-scrollbar {
  display: none;
}

.scroll-strip .poster-card {
  width: 220px;
  flex: 0 0 auto;
}

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

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

.poster-card,
.movie-row,
.category-card,
.info-panel,
.rank-list,
.filter-panel {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.poster-card {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.poster-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(56, 189, 248, 0.36);
  background: var(--panel-strong);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

.poster-card:hover .poster-wrap img,
.movie-row:hover img,
.feature-card:hover img {
  transform: scale(1.08);
}

.poster-chip,
.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 10px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-chip {
  left: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  padding: 6px 8px;
  background: rgba(14, 165, 233, 0.82);
}

.poster-year {
  right: 10px;
  top: 10px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.72);
}

.poster-body {
  padding: 15px;
}

.poster-body h3,
.row-body h3,
.feature-card h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  transition: color 0.2s ease;
}

.poster-card:hover h3,
.movie-row:hover h3,
.feature-card:hover h3 {
  color: var(--accent);
}

.poster-body p,
.row-body p,
.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta,
.meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
}

.meta-line {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 0 0 8px;
  color: #7dd3fc;
}

.feature-card {
  position: relative;
  display: block;
  min-height: 420px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.feature-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.34), transparent);
}

.feature-body {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
}

.feature-body h3 {
  font-size: clamp(24px, 4vw, 38px);
  -webkit-line-clamp: 2;
}

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

.category-card {
  display: flex;
  min-height: 168px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.32);
  background: rgba(30, 41, 59, 0.9);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 21px;
}

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

.category-card span {
  margin-top: 16px;
  color: var(--accent);
  font-weight: 800;
}

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

.rank-list {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
}

.movie-row {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-row:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.28);
  background: var(--panel-strong);
}

.row-poster {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

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

.rank-badge {
  left: 10px;
  top: 10px;
  width: 38px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.9);
}

.row-body {
  min-width: 0;
  padding: 16px 16px 16px 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 22px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.52);
}

.search-field input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
}

.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.52);
}

.detail-hero {
  padding: 38px 0 54px;
}

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

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.2fr);
  gap: 34px;
  align-items: start;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.detail-copy .lead {
  margin: 0 0 22px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-text {
  color: var(--soft);
  line-height: 1.95;
}

.detail-text h2 {
  margin: 28px 0 10px;
  color: white;
  font-size: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.24));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.4);
  font-size: 30px;
}

.info-panel {
  padding: 24px;
  border-radius: 24px;
}

.info-panel h2,
.info-panel h3 {
  margin: 0 0 14px;
}

.info-panel p {
  margin: 0;
  color: var(--soft);
  line-height: 1.9;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 38px 0;
  background: rgba(2, 6, 23, 0.76);
}

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

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.footer-links a:hover {
  color: var(--accent);
}

.empty-state {
  display: none;
  margin: 18px 0 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.6);
}

.empty-state.show {
  display: block;
}

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

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

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 72px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero-slider,
  .hero-slide {
    min-height: 680px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: end;
  }

  .hero-poster {
    justify-content: flex-start;
  }

  .hero-poster img {
    width: 176px;
    border-radius: 18px;
  }

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

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

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

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

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

  .brand-text {
    font-size: 18px;
  }

  .hero {
    padding-top: 22px;
  }

  .hero-slider,
  .hero-slide {
    min-height: 640px;
    border-radius: 24px;
  }

  .hero-controls {
    left: 18px;
    right: auto;
  }

  .section {
    padding: 40px 0;
  }

  .section-title {
    display: block;
  }

  .section-more {
    display: inline-block;
    margin-top: 12px;
  }

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

  .poster-body {
    padding: 12px;
  }

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

  .movie-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
  }

  .row-body {
    padding: 12px 12px 12px 0;
  }

  .compact-tags {
    display: none;
  }

  .play-icon {
    width: 58px;
    height: 58px;
    font-size: 24px;
  }
}
