:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-card: #1e293b;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #2563eb;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

button,
input,
select {
  font: inherit;
}

img {
  max-width: 100%;
}

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

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--soft);
  font-size: 15px;
}

.desktop-nav a,
.nav-dropdown > button {
  border: 0;
  color: inherit;
  background: transparent;
  padding: 8px 0;
  cursor: pointer;
}

.desktop-nav a:hover,
.nav-dropdown > button:hover {
  color: var(--cyan);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: 42px;
  left: -18px;
  width: 150px;
  padding: 12px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .nav-dropdown-panel {
  display: grid;
  gap: 8px;
}

.nav-search {
  margin-left: auto;
  display: flex;
  width: min(330px, 35vw);
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
}

.nav-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 14px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search button {
  border: 0;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  cursor: pointer;
}

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

.mobile-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  margin: 5px auto;
  background: #ffffff;
}

.mobile-panel {
  display: none;
  padding: 0 20px 18px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.mobile-panel a {
  padding: 10px 0;
  color: var(--soft);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.2), transparent 32%), linear-gradient(135deg, #020617 0%, #0f172a 48%, #164e63 100%);
}

.hero-glow,
.hero-glow-two {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(64px);
  opacity: 0.24;
  pointer-events: none;
  animation: floatGlow 7s ease-in-out infinite alternate;
}

.hero-glow {
  top: 10%;
  left: 8%;
  background: var(--cyan);
}

.hero-glow-two {
  right: 8%;
  bottom: 8%;
  background: var(--blue);
  animation-delay: 1.2s;
}

.hero-slider {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  min-height: calc(78vh - 72px);
  margin: 0 auto;
  display: grid;
  align-items: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.7fr);
  gap: 42px;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 680ms ease, transform 680ms ease;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-content {
  padding: 56px 0;
}

.hero-content h1 {
  margin: 18px 0;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #ffffff, #cffafe, #bfdbfe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 24px;
  font-size: clamp(17px, 2vw, 22px);
  color: #cffafe;
}

.hero-eyebrow,
.section-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(8, 47, 73, 0.55);
}

.hero-actions,
.filter-row,
.pager-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.button-primary,
.button-secondary,
.section-more,
.pager-link,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button-primary {
  border: 0;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  box-shadow: 0 18px 40px rgba(8, 145, 178, 0.22);
}

.button-primary:hover,
.button-secondary:hover,
.section-more:hover,
.pager-link:hover,
.filter-button:hover,
.filter-button.is-active {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(8, 145, 178, 0.28);
}

.hero-poster {
  min-height: 520px;
  border-radius: 32px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.86)), var(--poster-image), radial-gradient(circle at center, rgba(34, 211, 238, 0.22), rgba(15, 23, 42, 0.95));
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-poster-inner {
  height: 100%;
  min-height: 520px;
  padding: 24px;
  display: flex;
  align-items: flex-end;
}

.hero-mini-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.hero-mini-card strong {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}

.hero-mini-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
}

.slider-dots {
  position: absolute;
  left: 0;
  bottom: 32px;
  display: flex;
  gap: 10px;
}

.slider-dots button {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.36);
  cursor: pointer;
}

.slider-dots button.is-active {
  background: var(--cyan);
}

.main-section {
  padding: 72px 0;
  background: var(--bg);
}

.main-section.alt {
  background: linear-gradient(180deg, var(--bg), #0f172a, var(--bg));
}

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

.section-head,
.page-head,
.detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.page-head,
.detail-head {
  display: block;
  padding-top: 42px;
}

.section-head h2,
.page-head h1,
.detail-head h1 {
  margin: 8px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 900;
}

.section-head p,
.page-head p,
.detail-head p {
  margin: 0;
  max-width: 780px;
  color: var(--muted);
}

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

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

.movie-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.18);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: var(--shadow);
}

.movie-poster,
.compact-cover,
.detail-cover,
.player-backdrop {
  position: relative;
  display: block;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(2, 6, 23, 0.82)), var(--poster-image), radial-gradient(circle at 50% 20%, rgba(34, 211, 238, 0.22), rgba(15, 23, 42, 0.92));
  background-size: cover;
  background-position: center;
}

.movie-poster {
  aspect-ratio: 16 / 22;
  overflow: hidden;
}

.movie-card-large .movie-poster {
  aspect-ratio: 16 / 12;
}

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

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(8, 145, 178, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 200ms ease, transform 200ms ease;
}

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

.rank-badge,
.compact-rank {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 36px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-info strong {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info em {
  min-height: 46px;
  color: var(--muted);
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 13px;
}

.movie-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.86);
}

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

.category-tile {
  min-height: 170px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 24px;
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 42%), rgba(15, 23, 42, 0.9);
  transition: transform 200ms ease, border-color 200ms ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.5);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile span {
  color: var(--muted);
}

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

.compact-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
  transition: transform 180ms ease, border-color 180ms ease;
}

.compact-card:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.45);
}

.compact-cover {
  width: 86px;
  height: 112px;
  border-radius: 14px;
  overflow: hidden;
}

.compact-info strong,
.compact-info em {
  display: block;
}

.compact-info strong {
  color: #ffffff;
  font-size: 17px;
  margin-bottom: 6px;
}

.compact-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.search-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  margin-bottom: 28px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
}

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

.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(34, 211, 238, 0.65);
}

.search-fields {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 14px;
}

.empty-result {
  display: none;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.7);
}

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

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

.player-card,
.detail-side,
.story-card,
.review-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.22);
  overflow: hidden;
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.88)), var(--poster-image), radial-gradient(circle at center, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.92));
  background-size: cover;
  background-position: center;
  cursor: pointer;
  z-index: 2;
}

.player-layer.is-hidden {
  display: none;
}

.player-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 32px;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  box-shadow: 0 0 0 16px rgba(34, 211, 238, 0.12), 0 20px 70px rgba(37, 99, 235, 0.42);
  cursor: pointer;
}

.player-body,
.story-card,
.review-card,
.detail-side {
  padding: 24px;
}

.player-title {
  margin: 0 0 8px;
  font-size: 24px;
}

.detail-cover {
  height: 460px;
  border-radius: 22px;
  margin-bottom: 18px;
}

.detail-facts {
  display: grid;
  gap: 10px;
  color: var(--soft);
}

.detail-facts div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.story-stack {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.story-card h2,
.review-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.story-card p,
.review-card p {
  margin: 0;
  color: var(--soft);
}

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

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

.site-footer {
  border-top: 1px solid var(--line);
  background: #020617;
}

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

.footer-brand {
  color: #ffffff;
  margin-bottom: 8px;
}

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

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

@keyframes floatGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(20px, -18px, 0) scale(1.08);
  }
}

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

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

  .detail-cover {
    height: 360px;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .nav-search {
    display: none;
  }

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 34px 0 70px;
  }

  .hero-poster,
  .hero-poster-inner {
    min-height: 380px;
  }

  .slider-dots {
    bottom: 18px;
  }

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

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

@media (max-width: 560px) {
  .nav-shell {
    width: min(100% - 20px, 1200px);
    height: 64px;
  }

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

  .hero {
    min-height: auto;
  }

  .hero-slider {
    min-height: auto;
  }

  .hero-content {
    padding: 28px 0 0;
  }

  .hero-poster,
  .hero-poster-inner {
    min-height: 300px;
  }

  .main-section {
    padding: 48px 0;
  }

  .movie-grid,
  .movie-grid.large-grid,
  .category-grid,
  .compact-list,
  .search-fields {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 76px 1fr;
  }

  .compact-cover {
    width: 76px;
    height: 100px;
  }

  .player-button {
    width: 70px;
    height: 70px;
  }
}
