* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.18);
  --cyan-strong: #22d3ee;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(8, 145, 178, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 8%, rgba(14, 165, 233, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

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

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

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

.brand-icon {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 0.9rem;
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.28);
}

.brand-text,
.footer-logo {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex: 1;
}

.nav-link {
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.header-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input,
.mobile-search input,
.page-search-input {
  width: 16rem;
  color: white;
  border: 1px solid rgba(71, 85, 105, 0.85);
  border-radius: 999px;
  outline: none;
  background: rgba(15, 23, 42, 0.72);
  padding: 0.65rem 2.7rem 0.65rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.page-search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.header-search button {
  position: absolute;
  right: 0.45rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.8rem;
  color: white;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(30, 41, 59, 0.85);
  padding: 1rem 1.5rem 1.2rem;
  background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.is-open {
  display: grid;
  gap: 0.85rem;
}

.mobile-search {
  gap: 0.75rem;
}

.mobile-search input {
  width: 100%;
  padding-right: 1rem;
}

.mobile-search button,
.filter-chip {
  border: 1px solid rgba(71, 85, 105, 0.85);
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.75);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  cursor: pointer;
}

.mobile-link {
  color: #dbeafe;
  font-weight: 700;
  padding: 0.35rem 0;
}

.hero-carousel {
  position: relative;
  height: 85vh;
  min-height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-slide img.image-missing,
.poster-frame img.image-missing,
.mini-card img.image-missing,
.rank-item img.image-missing,
.category-posters img.image-missing,
.detail-backdrop img.image-missing {
  opacity: 0;
}

.hero-shade,
.hero-side-shade {
  position: absolute;
  inset: 0;
}

.hero-shade {
  background: linear-gradient(to top, #020617 0%, rgba(15, 23, 42, 0.62) 48%, transparent 100%);
}

.hero-side-shade {
  background: linear-gradient(to right, rgba(2, 6, 23, 0.86), transparent 54%, rgba(2, 6, 23, 0.42));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 5.8rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero-content h1,
.hero-content h2 {
  max-width: 820px;
  margin: 1rem 0 0;
  font-size: clamp(3rem, 7vw, 5.9rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 1.2rem 0 0;
  color: #cbd5e1;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.75;
}

.hero-tags,
.hero-meta,
.hero-actions,
.tag-row,
.movie-meta,
.filter-actions,
.pager-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #dbeafe;
  padding: 0.35rem 0.8rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-tags span:first-child,
.filter-chip.is-active {
  border-color: rgba(6, 182, 212, 0.58);
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: white;
}

.hero-meta {
  margin-top: 1.2rem;
  color: #cbd5e1;
  font-weight: 700;
}

.hero-meta span + span::before {
  content: "•";
  margin-right: 0.75rem;
  color: #64748b;
}

.hero-actions {
  margin-top: 1.8rem;
}

.btn-primary,
.btn-ghost,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  border-radius: 0.9rem;
  padding: 0.78rem 1.35rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: #06b6d4;
  color: white;
  box-shadow: 0 20px 45px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.btn-ghost,
.section-link {
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.58);
}

.hero-dots {
  position: absolute;
  right: max(1.5rem, calc((100vw - 1280px) / 2 + 1.5rem));
  bottom: 2.4rem;
  z-index: 5;
  display: flex;
  gap: 0.6rem;
}

.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 2.1rem;
  background: #06b6d4;
}

.page-shell {
  width: min(1280px, calc(100% - 3rem));
  margin: 0 auto;
}

.top-page {
  padding-top: 3rem;
}

.content-section {
  padding: 4rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  display: inline-flex;
  color: var(--cyan-strong);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.section-head h2,
.page-hero h1,
.ranking-title h2,
.spotlight-copy h2,
.detail-info h1,
.detail-section h2 {
  margin: 0.3rem 0 0;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head h2,
.spotlight-copy h2,
.ranking-title h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.section-head p,
.page-hero p,
.spotlight-copy p,
.detail-section p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.4rem;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.52);
  box-shadow: 0 22px 70px rgba(6, 182, 212, 0.13);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.26), transparent 38%),
    linear-gradient(135deg, #0f172a, #020617);
  overflow: hidden;
}

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

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

.poster-badge {
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  color: white;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.movie-card-body {
  padding: 1rem;
}

.movie-meta {
  justify-content: space-between;
  color: #67e8f9;
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0.65rem 0 0;
  font-size: 1.12rem;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 3.2rem;
  color: #94a3b8;
  line-height: 1.65;
  font-size: 0.92rem;
}

.tag-row {
  gap: 0.45rem;
}

.tag-row span {
  padding: 0.2rem 0.55rem;
  color: #a5f3fc;
  font-size: 0.74rem;
  background: rgba(6, 182, 212, 0.12);
}

.spotlight-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 2rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 15% 20%, rgba(6, 182, 212, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.88));
  box-shadow: var(--shadow);
}

.spotlight-copy {
  align-self: center;
}

.spotlight-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.mini-card {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  align-items: center;
  gap: 0.85rem;
  border-radius: 1rem;
  padding: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.72);
}

.mini-card:hover {
  border-color: rgba(6, 182, 212, 0.45);
}

.mini-card img,
.rank-item img {
  width: 4.6rem;
  height: 6.2rem;
  object-fit: cover;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.mini-card strong,
.rank-copy strong {
  display: block;
  line-height: 1.35;
}

.mini-card em,
.rank-copy em {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-style: normal;
  font-size: 0.86rem;
}

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

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

.category-card a {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1.2rem;
  height: 100%;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 1.5rem;
  background: var(--bg-card);
  padding: 1rem;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card a:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.48);
}

.category-posters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
}

.category-posters img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.category-copy h2 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.5rem;
}

.category-copy p,
.category-copy span {
  color: var(--muted);
  line-height: 1.7;
}

.category-copy span {
  display: block;
  margin-top: 0.8rem;
  color: #a5f3fc;
  font-size: 0.9rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24rem;
  gap: 2rem;
  align-items: start;
}

.ranking-panel,
.filter-panel,
.page-hero,
.detail-section {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.5rem;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 70px rgba(2, 6, 23, 0.25);
}

.ranking-panel {
  position: sticky;
  top: 5.7rem;
  padding: 1.2rem;
}

.ranking-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ranking-title a {
  color: #67e8f9;
  font-weight: 800;
  font-size: 0.92rem;
}

.ranking-panel ol,
.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rank-item + .rank-item {
  margin-top: 0.7rem;
}

.rank-item a {
  display: grid;
  grid-template-columns: 2.4rem 3.7rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  border-radius: 1rem;
  padding: 0.65rem;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid transparent;
}

.rank-item a:hover {
  border-color: rgba(6, 182, 212, 0.4);
}

.rank-no {
  color: #67e8f9;
  font-weight: 900;
  font-size: 1.05rem;
}

.rank-item img {
  width: 3.7rem;
  height: 5rem;
}

.rank-heat {
  color: #fde68a;
  font-weight: 900;
}

.large-ranking {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.large-ranking .rank-item {
  margin-top: 0;
}

.page-hero {
  padding: clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(circle at 20% 10%, rgba(6, 182, 212, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0.88));
}

.page-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.filter-panel {
  margin: 2rem 0 0;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-search-input {
  width: min(30rem, 100%);
  padding-right: 1rem;
}

.filter-chip {
  transition: background 0.2s ease, border-color 0.2s ease;
}

.movie-card.is-hidden,
.rank-item.is-hidden {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 1.25rem;
  color: #94a3b8;
  font-size: 0.92rem;
}

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

.pager-links {
  justify-content: space-between;
  padding-bottom: 4rem;
}

.pager-links a {
  color: #67e8f9;
  font-weight: 800;
}

.detail-page {
  overflow: hidden;
}

.detail-hero {
  position: relative;
  min-height: 760px;
  padding: 3rem 0 4rem;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #020617;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.82) 44%, rgba(2, 6, 23, 0.62) 100%),
    linear-gradient(to right, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.52));
}

.detail-shell {
  padding-top: 2rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 2rem;
  align-items: center;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.7rem;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.video-el {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.85rem;
  color: white;
  border: 0;
  background:
    linear-gradient(to top, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.25)),
    transparent;
  cursor: pointer;
  z-index: 3;
}

.player-shell.is-playing .player-mask {
  display: none;
}

.play-circle {
  width: 5rem;
  height: 5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 24px 60px rgba(6, 182, 212, 0.32);
  font-size: 1.8rem;
}

.player-mask strong {
  font-size: 1.15rem;
}

.detail-info {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.7rem;
  background: rgba(15, 23, 42, 0.72);
  padding: clamp(1.4rem, 4vw, 2rem);
  backdrop-filter: blur(14px);
}

.detail-info h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.05;
}

.detail-one-line {
  color: #cbd5e1;
  line-height: 1.85;
  font-size: 1.05rem;
}

.detail-meta-list {
  display: grid;
  gap: 0.55rem;
  margin: 1.2rem 0;
  color: #cbd5e1;
}

.detail-meta-list a {
  color: #67e8f9;
}

.detail-content {
  padding: 1rem 0 5rem;
}

.detail-section {
  padding: clamp(1.3rem, 4vw, 2rem);
  margin: 1.5rem 0;
}

.detail-section h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.site-footer {
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  background: rgba(2, 6, 23, 0.92);
}

.footer-grid {
  width: min(1280px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 3rem 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 2rem;
}

.footer-logo {
  font-size: 1.25rem;
}

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

.site-footer h3 {
  margin-top: 0;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  color: #94a3b8;
}

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

.footer-bottom {
  width: min(1280px, calc(100% - 3rem));
  margin: 0 auto;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  color: #64748b;
  padding: 1rem 0 1.4rem;
}

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

  .nav-shell {
    justify-content: space-between;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .spotlight-panel,
  .split-section,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

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

@media (max-width: 720px) {
  .page-shell,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 2rem, 1280px);
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    padding: 0 1rem 5rem;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: clamp(2.4rem, 14vw, 4rem);
  }

  .hero-dots {
    left: 1rem;
    right: auto;
  }

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

  .spotlight-list {
    grid-template-columns: 1fr;
  }

  .category-card a {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-actions {
    gap: 0.5rem;
  }

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

  .play-circle {
    width: 4rem;
    height: 4rem;
  }
}

@media (max-width: 460px) {
  .brand-text {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .rank-item a {
    grid-template-columns: 2rem 3.2rem 1fr;
  }

  .rank-heat {
    grid-column: 3;
  }
}
