:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --amber: #fbbf24;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.16), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(59, 130, 246, 0.12), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), #a7f3d0);
  box-shadow: 0 12px 40px rgba(34, 211, 238, 0.24);
}

.logo-text {
  display: grid;
  line-height: 1.05;
}

.logo-text strong {
  color: #ffffff;
  font-size: 20px;
}

.logo-text em {
  color: var(--cyan);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

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

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-width: 265px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 11px 16px;
  color: #ffffff;
  background: transparent;
}

.header-search button {
  border: 0;
  padding: 11px 18px;
  color: #00111a;
  cursor: pointer;
  background: var(--cyan);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  color: #ffffff;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.92);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

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

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 690px;
}

.hero-carousel {
  position: relative;
  min-height: 690px;
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  filter: saturate(1.16) contrast(1.05);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 46%, rgba(2, 6, 23, 0.36) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 118px;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) 380px;
  align-items: center;
  gap: 48px;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 12px 0 18px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-lead {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--cyan);
  background: rgba(8, 47, 73, 0.34);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.64);
  font-size: 12px;
}

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

.primary-button,
.ghost-button,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 16px 50px rgba(34, 211, 238, 0.25);
}

.ghost-button,
.panel-link {
  border: 1px solid var(--line);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.54);
}

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

.ghost-button:hover,
.panel-link:hover {
  border-color: rgba(34, 211, 238, 0.45);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.52);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  height: 520px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border-radius: 18px;
  padding: 14px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 42px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  padding: 0;
}

.hero-dot.active {
  width: 28px;
  border-radius: 999px;
  background: var(--cyan);
}

.section-shell,
.page-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section-shell {
  padding: 54px 0;
}

.section-head {
  max-width: 740px;
  margin: 0 auto 30px;
  text-align: center;
}

.inline-head {
  margin-left: 0;
  text-align: left;
}

.section-head span,
.panel-title span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2,
.panel-title h2,
.story-card h2 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
}

.section-head p,
.story-card p {
  margin: 0;
  color: var(--muted);
}

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

.category-card,
.category-overview-card,
.story-card,
.ranking-panel,
.filter-panel,
.player-card,
.detail-poster-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.category-card,
.category-overview-card {
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card span,
.category-title-link span {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.category-card p,
.category-overview-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.category-title-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-title-link strong {
  color: var(--cyan);
  font-size: 13px;
}

.preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.preview-links a {
  border-radius: 999px;
  padding: 5px 10px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.8);
  font-size: 12px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.42);
  transform: translateY(-5px);
  box-shadow: 0 22px 70px rgba(34, 211, 238, 0.12);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111827;
}

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

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

.quality-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  color: #00111a;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.poster-shade {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.16));
  transition: opacity 0.2s ease;
}

.poster-shade span {
  border-radius: 999px;
  padding: 9px 15px;
  background: rgba(34, 211, 238, 0.92);
  color: #00111a;
  font-weight: 900;
}

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

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

.movie-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
}

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

.movie-meta,
.movie-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
}

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.full-rank {
  position: static;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 34px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 8px;
  background: rgba(2, 6, 23, 0.44);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
  background: rgba(8, 47, 73, 0.46);
  transform: translateX(3px);
}

.ranking-index {
  color: var(--amber);
  font-weight: 900;
}

.ranking-item img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-info {
  display: grid;
  min-width: 0;
}

.ranking-info strong,
.ranking-info em {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-info strong {
  color: #ffffff;
}

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

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

.panel-link {
  width: 100%;
  margin-top: 18px;
}

.page-hero,
.detail-hero {
  padding: 64px 0 18px;
}

.page-hero {
  text-align: center;
}

.page-hero p {
  margin: 0 auto;
}

.filter-panel {
  width: min(760px, 100%);
  margin: 26px auto 0;
  padding: 14px;
}

.wide-filter {
  width: min(920px, 100%);
}

.movie-filter-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  padding: 13px 17px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.66);
}

.movie-filter-input:focus {
  border-color: rgba(34, 211, 238, 0.58);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  color: #cbd5e1;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.76);
}

.filter-chip.active,
.filter-chip:hover {
  border-color: rgba(34, 211, 238, 0.48);
  color: #00111a;
  background: var(--cyan);
}

.rank-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.detail-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

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

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

.detail-poster-card {
  overflow: hidden;
}

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

.detail-copy {
  padding-bottom: 22px;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.64);
}

.meta-list strong {
  color: var(--muted);
}

.meta-list span {
  color: #ffffff;
  text-align: right;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 26px;
  align-items: start;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.15), rgba(2, 6, 23, 0.74));
}

.play-veil.is-hidden {
  display: none;
}

.play-button {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #00111a;
  background: var(--cyan);
  box-shadow: 0 0 0 12px rgba(34, 211, 238, 0.12);
  font-size: 28px;
}

.play-veil strong {
  font-size: 20px;
}

.story-card {
  padding: 24px;
}

.story-card h2 + p {
  margin-top: 8px;
}

.story-card p + h2 {
  margin-top: 24px;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
  gap: 28px;
}

.footer-inner p {
  max-width: 520px;
  color: var(--muted);
}

.footer-links {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-links strong {
  color: #ffffff;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px;
  color: #64748b;
  text-align: center;
}

[data-movie-card].is-hidden {
  display: none;
}

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

  .menu-button {
    display: inline-flex;
  }

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

  .hero-poster {
    display: none;
  }

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    min-height: 64px;
  }

  .logo-text strong {
    font-size: 18px;
  }

  .hero-section,
  .hero-carousel {
    min-height: 620px;
  }

  .hero-inner {
    padding: 78px 0 108px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-lead {
    font-size: 16px;
  }

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

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

  .movie-desc {
    display: none;
  }

  .detail-grid,
  .meta-list,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-poster-card {
    max-width: 260px;
  }
}

@media (max-width: 480px) {
  .category-grid,
  .category-overview-grid,
  .compact-grid,
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}
