:root {
  --bg-top: #0f172a;
  --bg-bottom: #020617;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --panel-deep: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #3b82f6;
  --orange: #fb923c;
  --green: #4ade80;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.38);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg-bottom);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 82% 16%, rgba(59, 130, 246, 0.14), transparent 26rem),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.96), rgba(51, 65, 85, 0.94), rgba(30, 41, 59, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
}

.nav-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #00141a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.32);
}

.brand-text {
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #cbd5e1;
}

.nav-panel > a {
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-panel > a:hover {
  color: #ffffff;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 300px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.search-form input::placeholder {
  color: #94a3b8;
}

.search-form button,
.primary-button,
.ghost-button,
.section-more {
  border: 0;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.search-form button,
.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
  padding: 10px 18px;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.22);
}

.search-form button:hover,
.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-1px);
}

.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.28);
  background: rgba(15, 23, 42, 0.44);
  padding: 10px 18px;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.42);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 99px;
}

.hero {
  position: relative;
  overflow: hidden;
}

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

.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-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #0f172a, rgba(15, 23, 42, 0.24) 44%, transparent 75%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 78px;
  max-width: 800px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.9);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.2);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
  margin: 0 0 22px;
}

.hero-badges,
.detail-meta,
.tag-cloud,
.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-badges span,
.detail-meta span,
.tag-cloud span {
  padding: 6px 11px;
  border-radius: 10px;
  color: #bff6ff;
  background: rgba(8, 145, 178, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.18);
  font-size: 13px;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
  transform: translateY(-50%);
}

.hero-next {
  right: 24px;
  transform: translateY(-50%);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-stats,
.content-section {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -34px;
  position: relative;
  z-index: 5;
}

.quick-stats a {
  display: grid;
  gap: 6px;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.quick-stats strong {
  color: #ffffff;
  font-size: 24px;
}

.quick-stats span {
  color: var(--muted);
}

.content-section {
  padding: 58px 0 0;
}

.wide-section {
  max-width: 1280px;
}

.narrow-section {
  max-width: 920px;
}

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

.section-heading > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
}

.section-heading p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
}

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

.horizontal-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 320px);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scroll-snap-type: x proximity;
}

.movie-card {
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.12);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  scroll-snap-align: start;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 22px 60px rgba(8, 145, 178, 0.18);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.24), transparent 32%),
    linear-gradient(135deg, #1e293b, #020617);
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease, opacity 0.2s ease;
}

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

.poster-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  text-align: center;
  color: #e2e8f0;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.poster-frame.is-empty .poster-fallback,
.side-poster.is-empty .poster-fallback {
  display: grid;
}

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  opacity: 0;
  background: rgba(2, 6, 23, 0.42);
  transition: opacity 0.2s ease;
}

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

.duration-tag,
.rank-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.66);
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, var(--orange), #ef4444);
}

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

.movie-card-body h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta-line {
  color: #94a3b8;
  font-size: 13px;
}

.movie-meta-line span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
  vertical-align: middle;
}

.movie-card-list .movie-card-link {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 142px;
}

.movie-card-list .poster-frame {
  aspect-ratio: auto;
  height: 100%;
}

.list-stack {
  display: grid;
  gap: 16px;
}

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

.ranking-panel {
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid var(--line);
  padding: 22px;
}

.ranking-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.ranking-panel h2 {
  margin: 0;
  font-size: 22px;
}

.ranking-panel a {
  color: var(--cyan);
}

.ranking-panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.ranking-panel li a {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
}

.ranking-panel li span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(34, 211, 238, 0.14);
  font-weight: 800;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-pills a,
.category-card {
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-pills a {
  padding: 12px 20px;
  border-radius: 999px;
  color: #e2e8f0;
  font-weight: 700;
}

.category-pills a:hover,
.category-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.54);
  background: rgba(8, 145, 178, 0.16);
}

.page-hero {
  position: relative;
  padding: 84px 24px 54px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 26% 24%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.page-hero > div {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.compact-hero h1 {
  font-size: clamp(34px, 4vw, 52px);
}

.catalog-tools {
  padding-top: 32px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 190px));
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.78);
}

.single-filter {
  grid-template-columns: minmax(240px, 520px);
}

.filter-row label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.result-count {
  margin-top: 14px;
  color: var(--muted);
}

.result-count span {
  color: var(--cyan);
  font-weight: 800;
}

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

.category-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
}

.category-card span,
.category-card em {
  color: var(--muted);
  font-style: normal;
}

.category-card strong {
  color: #ffffff;
  font-size: 24px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 20px;
}

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

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

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.player-card,
.detail-info-card,
.text-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.78);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
  background: #000000;
}

.player-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.2));
  transition: opacity 0.2s ease;
}

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

.player-play-icon {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  color: #00141a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.32);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #fecaca;
  text-align: center;
  pointer-events: none;
}

.detail-info-card,
.text-card {
  padding: 24px;
}

.detail-info-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.one-line {
  margin: 18px 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.text-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-card p,
.rich-text p {
  color: #cbd5e1;
  line-height: 1.9;
  margin: 0 0 14px;
}

.side-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-deep);
}

.sticky-panel {
  position: sticky;
  top: 92px;
}

.empty-tip {
  grid-column: 1 / -1;
  color: var(--muted);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.72);
}

.site-footer {
  margin-top: 72px;
  padding: 46px 24px;
  color: #cbd5e1;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), #020617);
}

.footer-inner {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
}

.footer-inner h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.footer-inner p,
.footer-inner ul {
  margin: 0;
  padding: 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-inner ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

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

@media (max-width: 1100px) {
  .nav-panel {
    gap: 14px;
  }

  .search-form {
    min-width: 230px;
  }

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

  .two-column-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 18px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-panel {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0 4px;
  }

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

  .search-form {
    min-width: 0;
    width: 100%;
  }

  .hero-stage {
    height: 540px;
  }

  .hero-content {
    left: 20px;
    bottom: 70px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .movie-card-list .movie-card-link {
    grid-template-columns: 160px 1fr;
  }

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

@media (max-width: 560px) {
  .brand-text {
    font-size: 19px;
  }

  .hero-stage {
    height: 560px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 34px;
  }

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

  .quick-stats,
  .content-section,
  .detail-wrap {
    width: min(100% - 28px, 1280px);
  }

  .quick-stats,
  .movie-grid,
  .category-grid,
  .footer-inner,
  .filter-row {
    grid-template-columns: 1fr;
  }

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

  .horizontal-rail {
    grid-auto-columns: minmax(250px, 82vw);
  }

  .movie-card-list .movie-card-link {
    grid-template-columns: 1fr;
  }

  .movie-card-list .poster-frame {
    aspect-ratio: 16 / 9;
  }

  .detail-info-card,
  .text-card,
  .ranking-panel {
    padding: 18px;
  }
}
