:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #0f172a;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.18), transparent 30rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.36);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  white-space: nowrap;
}

.main-nav a,
.mobile-nav a {
  color: var(--muted-strong);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: var(--cyan);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  font-size: 22px;
}

.mobile-nav {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 18px;
}

.mobile-nav a {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.hero-carousel {
  position: relative;
  height: 78vh;
  min-height: 560px;
  margin-top: 64px;
  overflow: hidden;
  background: #020617;
}

.hero-stage,
.hero-slide,
.hero-slide img,
.hero-vignette {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-vignette {
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.1) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.52) 46%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  max-width: 1200px;
  flex-direction: column;
  justify-content: center;
  padding-top: 40px;
}

.hero-tags,
.hero-meta,
.hero-actions,
.meta-row,
.movie-tags,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.movie-tags span,
.year-badge,
.rank-badge {
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.18);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
}

.hero-copy h1 {
  width: min(780px, 100%);
  margin: 18px 0 14px;
  color: #fff;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  width: min(680px, 100%);
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
  margin-bottom: 30px;
  color: var(--muted);
}

.primary-button,
.ghost-button,
.section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  padding: 12px 24px;
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 44px rgba(34, 211, 238, 0.24);
}

.ghost-button,
.section-action {
  padding: 11px 20px;
  border: 1px solid var(--line);
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.ghost-button:hover,
.section-action:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 16px 44px rgba(34, 211, 238, 0.18);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  font-size: 34px;
  transform: translateY(-50%);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.page-main {
  padding: 112px 0 64px;
}

.home-main {
  padding: 58px 0 64px;
}

.section-block {
  margin: 0 0 66px;
}

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

.section-head h1,
.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-head h2::after,
.page-title h1::after {
  display: block;
  width: 70px;
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  content: "";
}

.section-head p,
.page-title p {
  margin: 10px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #fff;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(8, 145, 178, 0.78);
}

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  margin: 0 0 8px;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

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

.meta-row {
  justify-content: space-between;
  color: #64748b;
  font-size: 12px;
}

.meta-row a,
.meta-row span {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(51, 65, 85, 0.6);
}

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

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

.category-tile,
.stat-card,
.info-panel,
.detail-panel,
.related-panel,
.filter-panel,
.ranking-row {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
}

.category-tile {
  display: grid;
  gap: 8px;
  min-height: 166px;
  padding: 20px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-tile span {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.category-tile strong {
  color: var(--cyan);
  font-size: 26px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.stat-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  color: #fff;
  font-size: 34px;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
}

.filter-panel {
  margin-bottom: 28px;
  padding: 20px;
}

.filter-row {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
}

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

.filter-row input,
.filter-row select {
  width: 100%;
  height: 46px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(2, 6, 23, 0.58);
  padding: 0 14px;
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: rgba(34, 211, 238, 0.7);
}

.filter-status {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.filter-status strong {
  color: var(--cyan);
}

.page-title {
  margin-bottom: 28px;
}

.breadcrumbs {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.8fr);
  gap: 28px;
}

.player-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #000;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.16));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-layer span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 60px rgba(34, 211, 238, 0.34);
  font-size: 36px;
}

.detail-panel,
.related-panel {
  margin-top: 22px;
  padding: 24px;
}

.detail-title h1 {
  margin-bottom: 14px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted-strong);
}

.detail-meta span,
.movie-tags span {
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(51, 65, 85, 0.58);
  font-size: 13px;
}

.detail-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.detail-section h2,
.related-panel h2,
.info-panel h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 22px;
}

.detail-section p,
.info-panel p {
  margin: 0;
  color: var(--muted-strong);
}

.sidebar-card {
  position: sticky;
  top: 86px;
}

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

.related-item,
.ranking-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: center;
}

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

.related-item strong,
.ranking-row strong {
  color: #fff;
}

.related-item p,
.ranking-row p {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 13px;
}

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

.ranking-row {
  grid-template-columns: 56px 86px 1fr auto;
  padding: 12px;
}

.ranking-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(59, 130, 246, 0.95));
  font-weight: 900;
}

.ranking-row img {
  width: 86px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-row .hot-score {
  color: var(--cyan);
  font-weight: 800;
}

.no-result {
  display: none;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.4fr;
  gap: 26px;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p,
.site-footer h2 {
  margin: 10px 0 0;
}

.site-footer p {
  color: var(--muted);
}

.site-footer h2 {
  color: #fff;
  font-size: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.footer-links a {
  padding: 7px 10px;
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.4);
}

@media (max-width: 1120px) {
  .main-nav {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  body.nav-open .mobile-nav {
    display: grid;
  }

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

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

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

  .sidebar-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1200px);
  }

  .brand-copy small {
    display: none;
  }

  .hero-carousel {
    height: 74vh;
    min-height: 520px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: min(100%, 320px);
  }

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

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

  .filter-row label:first-child,
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }

  .ranking-row {
    grid-template-columns: 46px 72px 1fr;
  }

  .ranking-row .hot-score {
    grid-column: 3;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid.wide-grid,
  .category-grid,
  .stats-grid,
  .filter-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .page-main {
    padding-top: 96px;
  }

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

  .mobile-nav {
    grid-template-columns: 1fr;
  }
}
