:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --blue: #2563eb;
  --cyan: #0891b2;
  --teal: #0d9488;
  --orange: #f97316;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 36rem),
    radial-gradient(circle at top right, rgba(8, 145, 178, 0.12), transparent 30rem),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.header-inner {
  max-width: 1220px;
  margin: 0 auto;
  min-height: 68px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.24);
}

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

.main-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 22px;
}

.search-panel {
  position: sticky;
  top: 68px;
  z-index: 50;
  background: rgba(248, 250, 252, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.search-inner {
  position: relative;
  max-width: 1220px;
  margin: 0 auto;
  padding: 12px 22px;
}

#siteSearch {
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  outline: none;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#siteSearch:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-results {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 64px;
  z-index: 100;
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-results a {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.search-results a:last-child {
  border-bottom: 0;
}

.search-results img {
  width: 46px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.search-results strong {
  display: block;
  color: #0f172a;
  line-height: 1.3;
}

.search-results span {
  color: #64748b;
  font-size: 13px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  max-width: 1220px;
  min-height: 560px;
  margin: 28px auto 0;
  border-radius: 34px;
  color: #ffffff;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  padding: 54px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.88) 42%, rgba(8, 145, 178, 0.55) 100%),
    radial-gradient(circle at 18% 22%, rgba(37, 99, 235, 0.42), transparent 22rem);
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 670px;
}

.kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(165, 243, 252, 0.35);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.16);
  font-weight: 700;
  font-size: 14px;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 20px 0 14px;
  max-width: 740px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0 0 26px;
  max-width: 660px;
  color: rgba(226, 232, 240, 0.94);
  font-size: 17px;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-primary,
.btn-light,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.btn-light {
  color: #0f172a;
  background: #ffffff;
}

.btn-ghost {
  color: var(--blue);
  border: 1px solid #bfdbfe;
  background: #eff6ff;
}

.btn-primary:hover,
.btn-light:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-poster {
  width: min(360px, 100%);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(191, 219, 254, 0.45), rgba(207, 250, 254, 0.3));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  left: 54px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

.page-section,
.page-hero,
.detail-layout,
.category-wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 46px 22px 0;
}

.page-hero {
  padding-top: 40px;
}

.page-hero-card {
  overflow: hidden;
  border-radius: 30px;
  padding: 42px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(8, 145, 178, 0.92)),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.18), transparent 18rem);
  box-shadow: var(--shadow);
}

.page-hero-card h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero-card p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-lead {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #bfdbfe;
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  min-width: 36px;
  height: 36px;
  place-items: center;
  padding: 0 9px;
  color: #111827;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef08a, #fb923c);
  font-weight: 900;
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #0f172a;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin: 7px 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

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

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

.tag-row span {
  padding: 3px 8px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
}

.category-card p {
  color: var(--muted);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 80px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
}

.rank-num {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.rank-thumb {
  width: 80px;
  height: 106px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.3;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
}

.score-chip {
  padding: 8px 12px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-weight: 900;
}

.breadcrumb {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 22px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 700;
}

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

.detail-main,
.detail-side,
.content-panel {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.detail-main {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  background: #020617;
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.78)),
    var(--poster-image);
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

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

.play-cover span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 40px rgba(8, 145, 178, 0.35);
  font-size: 30px;
}

.detail-body {
  padding: 26px;
}

.detail-body h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.detail-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #1e40af;
  background: #eff6ff;
  font-weight: 750;
  font-size: 13px;
}

.detail-body h2,
.detail-side h2,
.content-panel h2 {
  margin: 26px 0 10px;
  font-size: 24px;
  line-height: 1.25;
}

.detail-body p,
.content-panel p {
  color: #334155;
}

.detail-side {
  align-self: start;
  padding: 20px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

.side-info {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.side-info div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e2e8f0;
}

.side-info span:first-child {
  color: var(--muted);
}

.side-info span:last-child {
  font-weight: 800;
  text-align: right;
}

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

.content-panel {
  max-width: 1220px;
  margin: 34px auto 0;
  padding: 26px;
}

.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.alpha-nav a {
  padding: 8px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 750;
}

.site-footer {
  margin-top: 60px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 36px 22px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 28px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  color: #e2e8f0;
}

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

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

  .hero-slide,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    padding: 36px;
  }

  .hero-visual {
    display: none;
  }

  .rank-item {
    grid-template-columns: 48px 72px 1fr;
  }

  .score-chip {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .header-inner {
    min-height: 62px;
    padding: 0 16px;
  }

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

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

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .search-panel {
    top: 62px;
  }

  .search-inner,
  .page-section,
  .page-hero,
  .detail-layout,
  .category-wrap,
  .breadcrumb {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-slider {
    min-height: 540px;
    margin: 18px 16px 0;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 30px 24px;
  }

  .hero-dots {
    left: 24px;
    bottom: 24px;
  }

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

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

  .page-hero-card {
    padding: 28px;
    border-radius: 24px;
  }

  .section-head,
  .footer-inner {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 20px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 1fr;
  }

  .rank-thumb {
    display: none;
  }

  .score-chip {
    grid-column: 2;
  }
}
