* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #60a5fa;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at 82% 0%, rgba(96, 165, 250, 0.13), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.97));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.36);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand strong {
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #cbd5e1;
  font-weight: 650;
  font-size: 0.95rem;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -9px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.subtle {
  color: #94a3b8;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
  color: var(--text);
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(2, 6, 23, 0.86);
}

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

.mobile-nav-link {
  padding: 11px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.72);
}

.mobile-nav-link:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.10);
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-slide.active img {
  animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }

  to {
    transform: scale(1.01);
  }
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero::before {
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.12) 0%, rgba(2, 6, 23, 0.78) 72%, #020617 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.56) 42%, rgba(2, 6, 23, 0.12) 100%);
}

.hero::after {
  background: radial-gradient(circle at 28% 74%, rgba(34, 211, 238, 0.18), transparent 36rem);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2));
  right: 24px;
  bottom: clamp(72px, 12vh, 132px);
  z-index: 2;
  width: min(760px, calc(100% - 48px));
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-category {
  display: inline-flex;
  margin-top: 14px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.72);
  backdrop-filter: blur(14px);
  color: #ecfeff;
  font-size: 0.88rem;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.4rem, 8vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(1.02rem, 2vw, 1.28rem);
  line-height: 1.8;
}

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

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

.button-primary {
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.28);
}

.button-primary:hover,
.button-soft:hover,
.button-ghost:hover {
  transform: translateY(-2px) scale(1.02);
}

.button-ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
}

.button-soft {
  border: 1px solid rgba(34, 211, 238, 0.20);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.10);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  backdrop-filter: blur(14px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(8, 145, 178, 0.85);
  transform: translateY(-2px);
}

.hero-arrow.prev {
  left: 28px;
}

.hero-arrow.next {
  right: 28px;
}

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

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

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

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 76px;
}

.page-shell.spacious {
  padding-top: 72px;
}

.section-block {
  margin-top: 76px;
}

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

.section-heading h2,
.filter-copy h1,
.detail-title h1,
.category-card h2 {
  margin: 8px 0 0;
  font-size: clamp(1.65rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-heading p,
.filter-copy p,
.category-card p,
.detail-title p,
.rich-text p {
  color: var(--muted-strong);
  line-height: 1.8;
}

.section-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.92));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 70px rgba(8, 145, 178, 0.14);
}

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.08);
  opacity: 0.86;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.84));
}

.quality-badge,
.rank-badge,
.play-chip,
.category-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.quality-badge {
  top: 12px;
  right: 12px;
  min-width: 42px;
  height: 25px;
  background: rgba(34, 211, 238, 0.92);
  color: #00111a;
  font-size: 0.78rem;
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  color: #fff;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.play-chip {
  left: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.26);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.movie-meta-line span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.10);
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 1rem;
  line-height: 1.4;
}

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

.movie-card p {
  min-height: 48px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-list span {
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.08);
  font-size: 0.74rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.20), transparent 18rem),
    linear-gradient(160deg, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.86));
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.16);
}

.category-count {
  display: inline-flex;
  margin-top: 22px;
  color: var(--cyan);
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: 28px;
  align-items: end;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 5% 0%, rgba(34, 211, 238, 0.16), transparent 24rem),
    rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.filter-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}

.filter-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: 0;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.10);
}

.filter-result {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 64px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.78);
}

.ranking-number {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.ranking-row img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
}

.ranking-row h3 {
  margin: 0 0 8px;
}

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

.ranking-score {
  color: var(--cyan);
  font-size: 1.25rem;
  font-weight: 900;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 30rem),
    linear-gradient(150deg, rgba(15, 23, 42, 0.90), rgba(2, 6, 23, 0.92));
  box-shadow: var(--shadow);
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: #0f172a;
}

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

.detail-title h1 {
  margin-top: 14px;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.detail-facts span {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(148, 163, 184, 0.10);
}

.player-card {
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.player-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.92);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.76));
}

.play-overlay span:first-child {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 60px rgba(34, 211, 238, 0.32);
  font-size: 1.8rem;
}

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

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

.content-panel,
.side-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.78);
}

.rich-text h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.rich-text p + h2 {
  margin-top: 28px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 64px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.side-item strong {
  display: block;
  line-height: 1.4;
}

.side-item span {
  color: var(--muted);
  font-size: 0.8rem;
}

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-inner strong {
  color: var(--text);
}

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

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

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

  .nav-link.subtle {
    display: none;
  }

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

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

@media (max-width: 860px) {
  .header-inner {
    height: 68px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 72vh;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 76px;
    width: auto;
  }

  .page-shell {
    padding-top: 36px;
  }

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

  .filter-panel,
  .detail-hero,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

  .ranking-score {
    grid-column: 3;
    font-size: 1rem;
  }
}

@media (max-width: 520px) {
  .page-shell,
  .header-inner,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 22px, 1280px);
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero p {
    font-size: 0.98rem;
  }

  .hero-actions,
  .inline-actions {
    gap: 10px;
  }

  .button-primary,
  .button-ghost,
  .button-soft {
    min-height: 42px;
    padding: 0 15px;
    font-size: 0.92rem;
  }

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

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