:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --white: #ffffff;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --orange: #fb923c;
  --pink: #f472b6;
  --border: rgba(148, 163, 184, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.22), transparent 28%),
    radial-gradient(circle at 86% 14%, rgba(244, 114, 182, 0.16), transparent 30%),
    linear-gradient(135deg, #020617 0%, #0f172a 52%, #111827 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

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

img {
  max-width: 100%;
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--white);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), #38bdf8 42%, var(--pink));
  color: #020617;
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.22);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 650;
}

.main-nav a {
  position: relative;
  transition: color 0.2s ease;
}

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

.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: currentColor;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: relative;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 5px;
}

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

.hero-shell {
  padding: 34px 0 56px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: end;
  gap: 38px;
  padding: 68px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

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

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(34, 211, 238, 0.26), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 46%, rgba(15, 23, 42, 0.36) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 62%);
}

.hero-content,
.hero-feature-card {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 13px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 47, 73, 0.46);
  font-size: 13px;
  font-weight: 700;
}

.hero-title {
  margin: 0;
  max-width: 760px;
  color: var(--white);
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-description {
  max-width: 680px;
  margin: 20px 0 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.78;
}

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

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

.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 12px;
  font-weight: 650;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #020617;
  background: linear-gradient(135deg, var(--cyan), #38bdf8 48%, var(--orange));
  border-color: transparent;
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.22);
}

.btn-ghost {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.7);
}

.hero-feature-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(16px);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
}

.hero-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(244, 114, 182, 0.12));
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-mini {
  padding: 16px 4px 2px;
}

.hero-mini strong {
  display: block;
  color: var(--white);
  font-size: 18px;
  margin-bottom: 8px;
}

.hero-mini span {
  color: var(--muted);
  font-size: 13px;
}

.hero-controls {
  position: absolute;
  right: 26px;
  bottom: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-control {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

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

.hero-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 24px;
  background: var(--cyan);
}

.section {
  padding: 26px 0 56px;
}

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

.section-title {
  margin: 0;
  color: var(--white);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-lead {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
}

.search-input {
  flex: 1 1 280px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  outline: none;
  color: var(--white);
  background: rgba(2, 6, 23, 0.72);
}

.search-input:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.72);
  cursor: pointer;
  font-weight: 700;
}

.filter-button.is-active,
.filter-button:hover {
  color: #020617;
  background: var(--cyan);
  border-color: var(--cyan);
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link,
.poster-wrap {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(244, 114, 182, 0.16));
}

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

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

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  color: #020617;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92), transparent);
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 8px;
  color: var(--white);
  font-size: 16px;
  line-height: 1.35;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 43px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: #93c5fd;
  font-size: 12px;
}

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

.category-card {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 86% 6%, rgba(34, 211, 238, 0.18), transparent 34%),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: var(--white);
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.category-card span {
  margin-top: 20px;
  color: var(--cyan);
  font-weight: 800;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item {
  display: grid;
  grid-template-columns: 48px 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #020617;
  background: linear-gradient(135deg, var(--orange), var(--cyan));
  font-weight: 900;
}

.rank-thumb {
  width: 76px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.12);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rank-title {
  margin: 0 0 6px;
  color: var(--white);
  font-size: 17px;
}

.rank-summary {
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.rank-score {
  min-width: 72px;
  text-align: right;
  color: var(--orange);
  font-size: 18px;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #a5f3fc;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  padding: 34px;
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: 34px;
  background:
    radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.18), transparent 34%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  background: rgba(34, 211, 238, 0.12);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-title {
  margin: 0;
  color: var(--white);
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-summary {
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.82;
}

.player-section {
  padding-top: 36px;
}

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

.player-widget video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  filter: blur(1px) saturate(1.08);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.12), transparent 30%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.3));
}

.play-trigger {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #020617;
  background: linear-gradient(135deg, var(--cyan), #38bdf8 50%, var(--orange));
  box-shadow: 0 18px 55px rgba(34, 211, 238, 0.28);
  cursor: pointer;
}

.play-trigger::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 25px solid currentColor;
}

.content-panel {
  padding: 28px;
  color: #cbd5e1;
  line-height: 1.86;
}

.content-panel h2 {
  margin: 0 0 16px;
  color: var(--white);
}

.content-panel p {
  margin: 0 0 16px;
}

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

.link-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
}

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

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

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

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

@media (max-width: 1080px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

@media (max-width: 840px) {
  .header-inner {
    min-height: 66px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .main-nav a {
    padding: 10px 0;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 36px 24px 78px;
  }

  .hero-feature-card {
    max-width: 280px;
  }

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

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

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .detail-poster {
    max-width: 320px;
  }

  .ranking-item {
    grid-template-columns: 40px 62px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .page-shell,
  .header-inner,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero-shell {
    padding-top: 18px;
  }

  .hero-carousel {
    min-height: 700px;
    border-radius: 24px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-description,
  .detail-summary {
    font-size: 15px;
  }

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

  .category-grid,
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar {
    padding: 12px;
  }

  .content-panel {
    padding: 20px;
  }

  .play-trigger {
    width: 70px;
    height: 70px;
  }
}
