:root {
  --bg: #030712;
  --panel: #111827;
  --panel-soft: rgba(17, 24, 39, 0.76);
  --panel-line: rgba(148, 163, 184, 0.15);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --blue: #3b82f6;
  --blue-2: #06b6d4;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(3, 7, 18, 0.92);
  border-bottom-color: rgba(148, 163, 184, 0.14);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
}

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

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

.brand-text,
.footer-brand span:last-child {
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
  font-size: 13px;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: #60a5fa;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.is-active {
  background: rgba(59, 130, 246, 0.1);
}

.hero-slider {
  position: relative;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.hero-slide.is-active img {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 38%, rgba(37, 99, 235, 0.34), transparent 34%),
    linear-gradient(to top, #030712 3%, rgba(3, 7, 18, 0.68) 52%, rgba(3, 7, 18, 0.16) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding-top: 70px;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.16);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 21px);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-tags span,
.detail-tags span {
  padding: 8px 13px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.24);
}

.hero-actions,
.section-title-row,
.hero-controls,
.form-row,
.breadcrumb,
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.hero-actions {
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 14px 42px rgba(37, 99, 235, 0.3);
}

.btn-ghost {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
  border-color: rgba(148, 163, 184, 0.24);
  backdrop-filter: blur(12px);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #3b82f6;
}

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

.main-section {
  padding: 72px 0;
}

.main-section.soft {
  width: 100%;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.54), rgba(3, 7, 18, 0));
}

.main-section.soft > .section-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section-title-row {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h2,
.section-heading h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.category-copy p,
.detail-intro,
.card-body p,
.footer-grid p {
  color: var(--muted);
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
}

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

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

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

.movie-scroller {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x mandatory;
}

.movie-scroller .movie-card {
  width: 310px;
  min-width: 310px;
  scroll-snap-align: start;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.38);
  background: #162033;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent 58%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-dot {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(0.82);
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(37, 99, 235, 0.9);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-chip,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.year-chip {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  color: #e5e7eb;
  background: rgba(0, 0, 0, 0.65);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.32;
}

.card-body h3 a {
  transition: color 0.2s ease;
}

.movie-card:hover h3 a {
  color: #60a5fa;
}

.card-body p {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 13px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.tag-row span {
  padding: 4px 8px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.72);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(8, 145, 178, 0.1));
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.38);
}

.category-thumb-stack {
  display: flex;
  height: 92px;
  margin-bottom: 22px;
}

.category-thumb-stack img {
  width: 38%;
  height: 92px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.35);
}

.category-thumb-stack img + img {
  margin-left: -28px;
}

.category-copy h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-copy p {
  margin: 0 0 12px;
  font-size: 14px;
}

.category-copy span {
  color: #bfdbfe;
  font-size: 13px;
  font-weight: 800;
}

.accent-rose { background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(37, 99, 235, 0.08)); }
.accent-violet { background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(37, 99, 235, 0.08)); }
.accent-orange { background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(37, 99, 235, 0.08)); }
.accent-cyan { background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(37, 99, 235, 0.08)); }
.accent-yellow { background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(37, 99, 235, 0.08)); }
.accent-red { background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(37, 99, 235, 0.08)); }
.accent-amber { background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(37, 99, 235, 0.08)); }
.accent-green { background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(37, 99, 235, 0.08)); }
.accent-teal { background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(37, 99, 235, 0.08)); }
.accent-sky { background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(37, 99, 235, 0.08)); }
.accent-slate { background: linear-gradient(135deg, rgba(100, 116, 139, 0.28), rgba(37, 99, 235, 0.08)); }

.page-shell {
  padding: 122px 0 78px;
}

.page-hero {
  margin-bottom: 38px;
  padding: 34px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 18%, rgba(59, 130, 246, 0.28), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.72));
  border: 1px solid var(--panel-line);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  font-size: 17px;
}

.form-row {
  gap: 12px;
  margin: 0 0 28px;
}

.search-box,
.select-box {
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.92);
  outline: 0;
}

.search-box {
  flex: 1 1 320px;
  padding: 0 16px;
}

.select-box {
  flex: 0 0 190px;
  padding: 0 14px;
}

.empty-state {
  display: none;
  margin: 40px 0 0;
  padding: 36px;
  border-radius: 22px;
  color: var(--muted);
  background: var(--panel);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

.breadcrumb a:hover {
  color: #60a5fa;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 30px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66), transparent 60%);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(37, 99, 235, 0.94);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  font-size: 30px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
  background: #2563eb;
}

.detail-title {
  margin: 26px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.meta-row {
  gap: 12px;
  margin-bottom: 20px;
  color: #cbd5e1;
}

.meta-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.6);
  font-size: 13px;
}

.content-panel,
.side-panel {
  padding: 22px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
}

.content-panel + .content-panel {
  margin-top: 18px;
}

.content-panel h2,
.side-panel h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.content-panel p {
  margin: 0;
  color: #d1d5db;
}

.detail-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
  align-self: start;
}

.related-link {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.related-link:last-child {
  border-bottom: 0;
}

.related-link img {
  width: 116px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.related-link strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  font-size: 14px;
}

.related-link span {
  display: block;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 12px;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: #060b17;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 28px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr 0.75fr;
  gap: 34px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.footer-grid p {
  margin: 14px 0 0;
  max-width: 450px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-grid a {
  color: var(--muted);
  font-size: 14px;
}

.footer-grid a:hover {
  color: #60a5fa;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted-2);
  font-size: 13px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid.featured,
  .movie-grid.ranking-list,
  .category-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-sidebar {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-slider {
    min-height: 620px;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-arrow {
    display: none;
  }

  .main-section {
    padding: 50px 0;
  }

  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.featured,
  .movie-grid.ranking-list,
  .category-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    padding-top: 104px;
  }

  .page-hero {
    padding: 24px;
  }

  .select-box {
    flex: 1 1 100%;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
