:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1e3a8a;
  --red: #dc2626;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.nav-shell {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue), #0f172a);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #334155;
  font-weight: 650;
  white-space: nowrap;
}

.nav-links a,
.mobile-menu a,
.footer-grid a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover,
.footer-grid a:hover {
  color: var(--blue);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 10px;
  background: #eef2ff;
  color: #1e3a8a;
  width: 42px;
  height: 42px;
  font-size: 24px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  padding: 12px 22px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-menu a {
  display: block;
  padding: 10px 0;
  color: #334155;
  font-weight: 650;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #172554, #0f172a);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.9s ease, transform 1.2s ease;
  background-size: cover;
  background-position: center;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.70) 44%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.10) 45%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 126px 22px 90px;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
}

.hero-copy {
  max-width: 760px;
  color: #fff;
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.kicker span,
.movie-meta-line span,
.tag-row span,
.detail-tags span,
.footer-tags a,
.hero-dots button,
.category-pill,
.inline-meta span {
  border-radius: 999px;
}

.kicker span {
  padding: 6px 12px;
  background: rgba(37, 99, 235, 0.92);
  font-size: 14px;
  font-weight: 700;
}

.kicker span:first-child {
  background: rgba(220, 38, 38, 0.92);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: #dbeafe;
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
}

.btn-light {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  width: min(1240px, calc(100% - 44px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-arrows {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.hero-arrows button,
.hero-dots button {
  border: 0;
  cursor: pointer;
}

.hero-arrows button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 24px;
  backdrop-filter: blur(14px);
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  background: rgba(255, 255, 255, 0.35);
  padding: 0;
}

.hero-dots button.is-active {
  background: #fff;
}

.content-section,
.category-section,
.detail-shell,
.search-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 22px;
}

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

.section-head p {
  margin: 0 0 6px;
  color: var(--blue);
  font-weight: 800;
}

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.04em;
}

.section-head h2,
.page-title h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-more {
  color: var(--blue);
  font-weight: 800;
}

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

.movie-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

.movie-card:hover img,
.mini-card:hover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), transparent 52%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-chip,
.rank-no {
  position: absolute;
  z-index: 2;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.rank-no {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.3);
}

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

.movie-meta-line,
.inline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.movie-meta-line span,
.inline-meta span {
  padding: 4px 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 750;
}

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

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

.movie-card p {
  min-height: 48px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
  padding: 4px 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

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

.category-card {
  padding: 22px;
  border-radius: 22px;
  min-height: 150px;
  background: linear-gradient(135deg, #ffffff, #eef2ff);
  border: 1px solid #dbeafe;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

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

.page-title {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 22px 0;
}

.page-title p {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 760px;
}

.search-panel {
  margin: 0 auto 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.search-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  color: var(--text);
  background: #f8fafc;
}

.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.search-empty {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
}

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

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

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

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.detail-title h1 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
}

.detail-title p {
  margin: 18px 0 20px;
  color: #475569;
  font-size: 18px;
}

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

.watch-panel {
  margin-top: 34px;
  border-radius: 26px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.site-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.24), rgba(2, 6, 23, 0.82));
  cursor: pointer;
  z-index: 4;
}

.player-box.is-playing .player-layer {
  opacity: 0;
  pointer-events: none;
}

.play-button {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  border: 0;
  color: #fff;
  background: var(--blue);
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.42);
}

.detail-text {
  display: grid;
  gap: 22px;
  margin-top: 34px;
}

.text-card {
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.text-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.text-card p {
  margin: 0;
  color: #475569;
}

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

.mini-card a {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.mini-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mini-card strong,
.mini-card small,
.mini-card span {
  display: block;
  padding: 0 12px;
}

.mini-card strong {
  padding-top: 12px;
  font-size: 15px;
  line-height: 1.35;
}

.mini-card small {
  margin-top: 4px;
  color: var(--muted);
}

.mini-card span {
  padding-bottom: 12px;
  color: var(--blue);
  font-size: 12px;
}

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

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 28px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 12px;
  color: #fff;
}

.footer-grid p {
  margin: 0;
  color: #94a3b8;
}

.footer-grid a {
  display: block;
  margin: 6px 0;
}

.footer-tags a {
  display: inline-flex;
  margin: 0;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(3, 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: 860px) {
  .nav-links {
    display: none;
  }

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

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

  .hero,
  .hero-inner {
    min-height: 560px;
  }

  .hero-inner {
    padding-top: 92px;
  }

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

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

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 18px;
  }

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

  .hero-controls {
    bottom: 18px;
  }

  .hero-arrows {
    display: none;
  }

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

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

  .search-panel {
    grid-template-columns: 1fr;
  }
}
