:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --blue: #2563eb;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  color: var(--text);
  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;
}

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

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.logo-text {
  font-size: 24px;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.24);
}

.logo-mark.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

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

.nav-links a {
  padding: 10px 13px;
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 650;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.hero-carousel {
  position: relative;
  height: 650px;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

.hero-slide.is-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.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.12)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.05) 48%, rgba(2, 6, 23, 0.4));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 120px;
}

.hero-eyebrow,
.detail-kicker,
.page-hero span,
.section-heading span {
  display: inline-flex;
  width: max-content;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.22), rgba(37, 99, 235, 0.2));
  color: #a5f3fc;
  border: 1px solid rgba(34, 211, 238, 0.24);
  font-size: 13px;
  font-weight: 750;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 18px 0 0;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content h1 {
  font-size: clamp(48px, 7vw, 86px);
}

.hero-content h2 {
  font-size: clamp(30px, 4vw, 56px);
  color: #cffafe;
}

.hero-content p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1.8;
}

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

.btn-primary,
.btn-secondary,
.hero-search button,
.category-tile strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary,
.hero-search button {
  color: white;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  color: white;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-secondary:hover,
.hero-search button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 48px rgba(34, 211, 238, 0.32);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(12px);
  font-size: 38px;
  line-height: 1;
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dots button {
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.is-active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 7;
  width: min(720px, calc(100% - 48px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.86);
  color: white;
  outline: none;
  padding: 0 18px;
}

.hero-category-strip {
  position: absolute;
  right: 24px;
  bottom: 178px;
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 620px;
  gap: 10px;
}

.hero-category-strip a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.section-wrap,
.page-shell,
.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 68px 24px;
}

.section-wrap.no-top {
  padding-top: 28px;
}

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

.section-heading.compact {
  align-items: center;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 10px 0 0;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.section-heading a {
  color: #67e8f9;
  font-weight: 700;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(14, 116, 144, 0.18));
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.08);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

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

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
}

.movie-card-large .card-body h3 {
  font-size: 24px;
}

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

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

.category-tile {
  min-height: 210px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 16rem),
    rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.28s ease, border-color 0.28s ease;
}

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

.category-tile span {
  color: white;
  font-size: 26px;
  font-weight: 900;
}

.category-tile p {
  color: #cbd5e1;
  line-height: 1.7;
}

.category-tile strong {
  width: max-content;
  min-height: 40px;
  color: white;
  background: rgba(34, 211, 238, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.28);
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: auto 112px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 0.25s ease, background 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(30, 41, 59, 0.8);
}

.rank-item img {
  width: 112px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(15, 23, 42, 1);
}

.rank-num {
  min-width: 36px;
  color: #67e8f9;
  font-size: 22px;
  font-weight: 900;
}

.rank-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-copy strong {
  color: white;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), transparent 45%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
}

.compact-hero {
  margin-top: 28px;
}

.page-hero h1 {
  max-width: 760px;
  color: white;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.05;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  padding: 34px;
  border-radius: 22px;
  text-align: center;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
}

.detail-shell {
  padding-top: 28px;
}

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

.breadcrumb a:hover {
  color: #67e8f9;
}

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

.player-card,
.detail-info,
.poster-panel,
.related-panel {
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.13);
  box-shadow: var(--shadow);
}

.player-card {
  padding: 14px;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.52));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.4);
  font-size: 38px;
  padding-left: 6px;
}

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

.detail-info {
  margin-top: 18px;
  padding: 28px;
}

.detail-info h1 {
  margin-top: 14px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.12;
}

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

.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span,
.tag-list span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-info section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-info h2,
.related-panel h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 22px;
  font-weight: 850;
}

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

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.poster-panel,
.related-panel {
  padding: 18px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(15, 23, 42, 1);
}

.poster-panel strong {
  display: block;
  margin-top: 14px;
  color: white;
  font-size: 20px;
}

.poster-panel span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.compact-list .rank-item {
  grid-template-columns: 96px 1fr;
}

.compact-list .rank-item img {
  width: 96px;
  height: 60px;
}

.more-section {
  padding-left: 0;
  padding-right: 0;
}

.site-footer {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), #020617);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 34px;
  color: var(--muted);
}

.footer-container h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 18px;
}

.footer-container p {
  max-width: 520px;
  margin: 14px 0 0;
  line-height: 1.75;
}

.footer-container ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-container a:hover {
  color: #67e8f9;
}

.footer-bottom {
  padding: 20px 24px 28px;
  text-align: center;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

[hidden] {
  display: none !important;
}

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.18);
  }

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

  .hero-carousel {
    height: 720px;
  }

  .hero-content {
    padding-bottom: 210px;
  }

  .hero-category-strip {
    left: 24px;
    right: 24px;
    bottom: 146px;
    justify-content: flex-start;
  }

  .hero-dots {
    bottom: 104px;
  }

  .hero-control {
    display: none;
  }

  .featured-grid,
  .movie-grid,
  .mini-grid,
  .category-grid,
  .category-grid.wide,
  .ranking-page-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 560px) {
  .nav-container {
    padding: 0 16px;
  }

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

  .hero-content {
    width: calc(100% - 32px);
  }

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

  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .hero-search input,
  .hero-search button {
    border-radius: 16px;
  }

  .section-wrap,
  .page-shell,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-hero {
    padding: 36px 22px;
    border-radius: 24px;
  }

  .featured-grid,
  .movie-grid,
  .mini-grid,
  .category-grid,
  .category-grid.wide,
  .ranking-page-list {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: 92px 1fr;
  }

  .rank-num {
    display: none;
  }

  .rank-item img {
    width: 92px;
    height: 58px;
  }

  .detail-info,
  .poster-panel,
  .related-panel {
    padding: 18px;
  }

  .play-overlay span {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }
}
