:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(96, 165, 250, 0.22);
  --line-soft: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --blue: #2563eb;
  --blue-2: #38bdf8;
  --cyan: #67e8f9;
  --gold: #facc15;
  --danger: #f87171;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 12%, rgba(37, 99, 235, 0.28), transparent 26rem),
    radial-gradient(circle at 86% 16%, rgba(14, 165, 233, 0.2), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f1e45 45%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(96, 165, 250, 0.24);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.86), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 36px rgba(2, 8, 23, 0.35);
}

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #020617;
  font-weight: 900;
  letter-spacing: -0.08em;
  background: linear-gradient(135deg, #60a5fa, #67e8f9);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.38);
}

.logo-text strong {
  display: block;
  font-size: 21px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #dbeafe, #a5f3fc, #dbeafe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-text span {
  display: block;
  margin-top: 3px;
  color: rgba(191, 219, 254, 0.72);
  font-size: 12px;
}

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

.site-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #dbeafe;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #ffffff;
  background: rgba(30, 64, 175, 0.46);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #dbeafe;
  background: rgba(30, 64, 175, 0.32);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  padding: 48px 0 56px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(96, 165, 250, 0.28) 2px, transparent 2px),
    linear-gradient(135deg, rgba(15, 23, 42, 0.2), rgba(14, 165, 233, 0.06));
  background-size: 56px 56px, 100% 100%;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 36px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.4);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  gap: 34px;
  align-items: center;
  padding: 56px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.42);
  transform: scale(1.06);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 45%, rgba(59, 130, 246, 0.18), transparent 20rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 48%, rgba(2, 6, 23, 0.36) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 42%);
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.16);
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  max-width: 820px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #eff6ff, #a5f3fc, #bfdbfe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 10px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.22);
  font-size: 13px;
  font-weight: 650;
}

.hero-actions,
.section-actions,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.6);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(30, 64, 175, 0.7);
}

.btn-primary {
  border-color: rgba(103, 232, 249, 0.42);
  color: #020617;
  background: linear-gradient(135deg, #60a5fa, #67e8f9);
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.32);
}

.btn-primary:hover {
  color: #020617;
  background: linear-gradient(135deg, #93c5fd, #a5f3fc);
}

.hero-poster-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 32px 80px rgba(2, 8, 23, 0.55);
}

.hero-poster-card img {
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.hero-poster-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(16px);
}

.hero-poster-caption strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

.hero-poster-caption span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 22px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 34px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.44);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: rgba(15, 23, 42, 0.32);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

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

.section-heading h2,
.block-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.category-card p {
  color: var(--muted);
  line-height: 1.8;
}

.heading-line {
  height: 4px;
  flex: 1;
  max-width: 420px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, transparent);
}

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

.grid.large {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.66), rgba(15, 23, 42, 0.8));
  box-shadow: 0 18px 60px rgba(2, 8, 23, 0.25);
  transition: border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  z-index: 2;
  border-color: rgba(96, 165, 250, 0.52);
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 24px 80px rgba(37, 99, 235, 0.18);
}

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

.grid.large .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 56%);
}

.card-year {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.card-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.82);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.grid.large .card-body h3 {
  font-size: 23px;
}

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

.clamp-1,
.clamp-2,
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-1 {
  -webkit-line-clamp: 1;
}

.clamp-2 {
  -webkit-line-clamp: 2;
}

.clamp-3 {
  -webkit-line-clamp: 3;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.card-tags span {
  padding: 5px 8px;
  border-radius: 8px;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.16);
  font-size: 12px;
  font-weight: 650;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-2);
  font-size: 12px;
}

.rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.rail .movie-card {
  flex: 0 0 290px;
  scroll-snap-align: start;
}

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

.category-card,
.info-panel,
.filter-bar,
.detail-card,
.related-panel,
.page-hero {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.62), rgba(15, 23, 42, 0.78));
  box-shadow: 0 18px 60px rgba(2, 8, 23, 0.22);
}

.category-card {
  padding: 24px;
  min-height: 190px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.5);
}

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

.category-card p {
  margin: 0 0 18px;
}

.page-main {
  padding: 42px 0 78px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  padding: 42px;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -140px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.18);
  filter: blur(4px);
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
  font-size: clamp(38px, 6vw, 62px);
}

.page-hero p,
.breadcrumbs {
  position: relative;
  z-index: 1;
}

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

.breadcrumbs a {
  color: #93c5fd;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 0.6fr 0.6fr;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 14px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.42);
  padding: 0 14px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(103, 232, 249, 0.62);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

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

.result-empty.is-visible {
  display: block;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 98px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(96, 165, 250, 0.48);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #020617;
  background: linear-gradient(135deg, #60a5fa, #67e8f9);
  font-weight: 900;
}

.rank-cover {
  width: 98px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
}

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

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.22));
  cursor: pointer;
  transition: opacity 0.22s ease;
}

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

.play-ring {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #020617;
  background: linear-gradient(135deg, #60a5fa, #67e8f9);
  box-shadow: 0 24px 62px rgba(37, 99, 235, 0.36);
  font-size: 30px;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  color: #dbeafe;
  font-size: 14px;
  pointer-events: none;
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-card h2,
.related-panel h2 {
  margin: 28px 0 12px;
  font-size: 22px;
}

.detail-card p {
  color: #cbd5e1;
  line-height: 1.9;
}

.review-box {
  padding: 18px;
  border-left: 4px solid #38bdf8;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
}

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

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

.related-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.26);
}

.related-item img {
  width: 82px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.related-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

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

.info-panel {
  padding: 28px;
}

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

.site-footer {
  border-top: 1px solid rgba(96, 165, 250, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.74), #020617);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(120px, 0.55fr));
  gap: 30px;
  padding: 48px 0;
}

.footer-inner h3,
.footer-inner h4 {
  margin: 0 0 12px;
}

.footer-inner p,
.footer-inner a,
.copyright {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: #93c5fd;
}

.copyright {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px 0 28px;
  text-align: center;
}

@media (max-width: 1060px) {
  .grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .related-panel {
    position: static;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 42px;
  }

  .hero-poster {
    display: none;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 62px;
  }

  .logo-text strong {
    font-size: 18px;
  }

  .logo-text span {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.94);
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    padding: 12px 14px;
  }

  .hero {
    min-height: auto;
    padding: 24px 0 38px;
  }

  .hero-slider {
    min-height: 560px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 28px;
  }

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

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

  .section {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
  }

  .heading-line {
    margin-top: 16px;
  }

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

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

  .rank-item {
    grid-template-columns: 40px 80px minmax(0, 1fr);
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .container,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

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

  .rail .movie-card {
    flex-basis: 260px;
  }

  .page-hero,
  .detail-card,
  .info-panel {
    padding: 22px;
  }

  .rank-cover {
    width: 80px;
  }
}
