:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.88);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --primary: #0ea5e9;
  --primary-strong: #0284c7;
  --accent: #f97316;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

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

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

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

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #38bdf8 45%, var(--accent));
  box-shadow: 0 12px 34px rgba(14, 165, 233, 0.34);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 650;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.16);
}

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

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #ffffff;
  border-radius: 10px;
}

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

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero-shell {
  width: min(1320px, calc(100% - 24px));
  min-height: 78vh;
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
}

.hero-stage {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s 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-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 46%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, transparent 50%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: clamp(24px, 7vw, 86px);
  width: min(650px, calc(100% - 48px));
  transform: translateY(-50%);
}

.hero-kicker,
.detail-meta,
.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: #cbd5e1;
}

.hero-kicker span,
.detail-meta span,
.meta-line span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
}

.hero-content h1 {
  margin: 20px 0 14px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 600px;
  margin: 0;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.7;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-btn,
.search-box button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.25);
}

.primary-btn:hover,
.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(14, 165, 233, 0.35);
}

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

.ghost-btn:hover {
  color: #ffffff;
  border-color: rgba(14, 165, 233, 0.5);
  background: rgba(14, 165, 233, 0.18);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 46px;
  height: 46px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.56);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: 0.2s ease;
}

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

.hero-side {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.side-title {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
}

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

.side-list a,
.mini-poster-list a {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
}

.side-list img,
.mini-poster-list img {
  width: 100%;
  height: 138px;
  object-fit: cover;
  opacity: 0.82;
  transition: 0.25s ease;
}

.side-list span,
.mini-poster-list span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

.side-list a:hover img,
.mini-poster-list a:hover img {
  opacity: 1;
  transform: scale(1.06);
}

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

.home-search {
  margin: 30px 0 46px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.search-box {
  flex: 1;
  display: flex;
  gap: 10px;
}

.search-box input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  color: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(2, 6, 23, 0.64);
  padding: 0 16px;
}

.search-box input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(14, 165, 233, 0.72);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a {
  color: #bae6fd;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
}

.content-section {
  margin: 64px 0;
}

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

.section-heading span,
.page-hero span,
.spotlight-body span {
  color: #38bdf8;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-text h2,
.player-section h2 {
  margin: 8px 0;
  line-height: 1.12;
}

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

.section-heading p,
.page-hero p,
.spotlight-body p,
.detail-text p,
.one-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.78;
}

.section-heading a {
  color: #38bdf8;
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.22);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.5);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(2, 6, 23, 0.72) 100%);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #ef4444);
  font-weight: 900;
}

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

.meta-line {
  gap: 6px;
  font-size: 12px;
}

.meta-line span {
  padding: 4px 8px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #38bdf8;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  color: #bae6fd;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
}

.spotlight-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.8));
  box-shadow: var(--shadow);
}

.spotlight-poster {
  min-height: 390px;
}

.spotlight-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight-body {
  padding: clamp(28px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.spotlight-body h2 {
  margin: 12px 0 16px;
  font-size: clamp(30px, 5vw, 58px);
}

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

.category-tile {
  min-height: 145px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(249, 115, 22, 0.08)),
    rgba(15, 23, 42, 0.76);
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.5);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile span {
  color: var(--muted);
  line-height: 1.6;
}

.category-tile em {
  color: #38bdf8;
  font-style: normal;
  font-weight: 800;
}

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

.page-hero {
  margin: 0 0 34px;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.22), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.82));
  box-shadow: var(--shadow);
}

.small-hero h1,
.category-hero h1 {
  font-size: clamp(38px, 6vw, 70px);
}

.category-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 24px;
  align-items: center;
}

.mini-poster-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-panel label span {
  display: block;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-weight: 800;
}

.filter-panel select {
  margin-top: 27px;
}

.breadcrumb {
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
}

.breadcrumb a {
  color: #38bdf8;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 30px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.82));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  background: #0f172a;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.detail-info {
  padding: 18px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-info h1 {
  font-size: clamp(38px, 5vw, 68px);
  letter-spacing: -0.04em;
}

.detail-tags {
  margin-top: 20px;
}

.player-section,
.detail-text {
  margin: 36px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.76);
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 50px rgba(14, 165, 233, 0.35);
  font-size: 28px;
}

.play-cover strong {
  font-size: clamp(20px, 4vw, 34px);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7);
}

.detail-text h2 {
  color: #ffffff;
  font-size: 28px;
}

.detail-text p {
  margin-bottom: 20px;
  color: #cbd5e1;
  font-size: 17px;
}

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

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #cbd5e1;
}

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

.is-hidden-card {
  display: none !important;
}

@media (max-width: 1120px) {
  .hero-shell,
  .category-hero,
  .detail-hero,
  .spotlight-card {
    grid-template-columns: 1fr;
  }

  .hero-side {
    display: none;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.is-open {
    display: block;
  }

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

  .hero-stage {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-content {
    left: 22px;
    width: calc(100% - 44px);
  }

  .hero-arrow {
    display: none;
  }

  .home-search,
  .section-heading,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box,
  .filter-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .filter-panel select {
    margin-top: 0;
  }

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

  .detail-poster img {
    min-height: 300px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  main,
  .page-main,
  .footer-inner {
    width: min(100% - 22px, 1220px);
  }

  .site-logo {
    font-size: 17px;
  }

  .hero-shell {
    width: min(100% - 12px, 1320px);
  }

  .hero-stage {
    min-height: 500px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .mini-poster-list {
    grid-template-columns: 1fr;
  }

  .detail-hero,
  .page-hero,
  .player-section,
  .detail-text {
    border-radius: 24px;
    padding: 18px;
  }
}
