:root {
  --bg: #f8fbff;
  --surface: #ffffff;
  --surface-soft: #eef6ff;
  --ink: #111827;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #dbeafe;
  --brand: #2563eb;
  --brand-2: #4f46e5;
  --brand-3: #7c3aed;
  --accent: #06b6d4;
  --danger: #ef4444;
  --shadow: 0 20px 50px rgba(30, 64, 175, 0.12);
  --shadow-soft: 0 12px 28px rgba(30, 64, 175, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(219, 234, 254, 0.9);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand span:last-child {
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.26);
  font-size: 15px;
  padding-left: 2px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.desktop-nav a {
  color: #334155;
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease;
}

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

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
  padding: 4px;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 999px;
}

.nav-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
}

.nav-search button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 800;
}

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

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.mobile-panel a {
  color: #334155;
  font-weight: 800;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  flex: 1;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 10px 14px;
  outline: 0;
}

.mobile-panel button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.16), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(124, 58, 237, 0.13), transparent 26%),
    linear-gradient(135deg, #eff6ff 0%, #eef2ff 48%, #faf5ff 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
}

.hero-shell {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 56px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.76fr);
  gap: 46px;
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 900;
}

.hero h1 {
  margin: 22px 0 18px;
  color: var(--ink);
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.gradient-text {
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #475569;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 28px 0 24px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}

.secondary-btn {
  color: var(--brand);
  background: #ffffff;
  border: 1px solid #bfdbfe;
  box-shadow: var(--shadow-soft);
}

.ghost-btn {
  color: #334155;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid #dbeafe;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.hero-search {
  display: flex;
  width: min(600px, 100%);
  gap: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 16px;
  color: var(--ink);
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  padding: 10px 18px;
  font-weight: 900;
  cursor: pointer;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags a,
.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 800;
}

.hero-media {
  position: relative;
  min-height: 470px;
}

.hero-poster-stack {
  position: relative;
  height: 520px;
}

.hero-poster {
  position: absolute;
  inset: 0 0 auto auto;
  width: min(370px, 82%);
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  border: 10px solid rgba(255, 255, 255, 0.88);
  border-radius: 34px;
  box-shadow: 0 36px 80px rgba(30, 64, 175, 0.24);
}

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

.hero-mini {
  position: absolute;
  left: 0;
  bottom: 18px;
  width: min(300px, 78%);
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dbeafe;
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

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

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

.hero-dot {
  width: 44px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #bfdbfe;
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

main {
  width: 100%;
}

.content-section,
.page-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 760px;
  color: var(--muted);
  margin: 10px 0 0;
}

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid #e0ecff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 20%, rgba(37, 99, 235, 0.22), transparent 30%),
    linear-gradient(135deg, #dbeafe, #ede9fe);
}

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

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

.poster-year,
.poster-type {
  position: absolute;
  top: 12px;
  color: #ffffff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.poster-year {
  left: 12px;
  background: rgba(37, 99, 235, 0.82);
}

.poster-type {
  right: 12px;
  background: rgba(15, 23, 42, 0.72);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 20px;
  line-height: 1.28;
}

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

.movie-card p {
  min-height: 3.4em;
  margin: 0 0 14px;
  color: #475569;
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.category-card {
  min-height: 190px;
  padding: 22px;
  background:
    radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.18), transparent 30%),
    linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid #dbeafe;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

.category-card span {
  color: var(--brand);
  font-weight: 900;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

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

.rank-thumb {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  border-radius: 14px;
}

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

.rank-main h3 {
  margin: 0 0 5px;
  font-size: 19px;
}

.rank-main h3 a:hover {
  color: var(--brand);
}

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

.rank-action {
  color: var(--brand);
  font-weight: 900;
  white-space: nowrap;
}

.page-hero {
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.17), transparent 28%),
    linear-gradient(135deg, #eff6ff, #eef2ff, #faf5ff);
  border-bottom: 1px solid #dbeafe;
}

.page-hero-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
}

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

.breadcrumb a {
  color: var(--brand);
  font-weight: 800;
}

.detail-page {
  background:
    linear-gradient(180deg, #eff6ff 0, #f8fbff 480px),
    #f8fbff;
}

.detail-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 34px;
  align-items: start;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.24);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.54));
  border: 0;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-core {
  display: grid;
  place-items: center;
  gap: 14px;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.4);
  font-size: 34px;
}

.play-text {
  font-size: 20px;
  font-weight: 900;
}

.detail-info {
  padding: 8px 0;
}

.detail-info p {
  color: #475569;
  font-size: 17px;
}

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

.detail-cover-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  border-radius: 18px;
}

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

.text-panel {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 54px;
}

.text-card {
  margin-bottom: 22px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.text-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.text-card p {
  margin: 0;
  color: #475569;
  font-size: 17px;
}

.related-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid #bfdbfe;
  outline: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: #f8fafc;
  color: var(--ink);
}

.search-panel button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
}

.search-results-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 800;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.compact-thumb {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  border-radius: 12px;
}

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

.compact-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
}

.compact-card em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.footer-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
}

.footer-logo span:last-child {
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: #ffffff;
}

.footer-brand p {
  max-width: 560px;
  color: #94a3b8;
}

.footer-links strong {
  display: block;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 14px;
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 14px;
  }

  .nav-search {
    width: 230px;
  }

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

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

@media (max-width: 880px) {
  .nav-shell {
    height: 64px;
  }

  .desktop-nav,
  .nav-search {
    display: none;
  }

  .mobile-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .hero {
    min-height: auto;
  }

  .hero-shell {
    padding: 44px 0;
  }

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

  .hero-media {
    min-height: 360px;
  }

  .hero-poster-stack {
    height: 400px;
  }

  .hero-poster {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(320px, 86%);
  }

  .hero-mini {
    left: 50%;
    transform: translateX(-50%);
  }

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

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

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

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

  .rank-item {
    grid-template-columns: 44px 70px minmax(0, 1fr);
  }

  .rank-action {
    display: none;
  }

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

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

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 12px;
  }

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

  .hero p {
    font-size: 16px;
  }

  .hero-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .hero-search button {
    width: 100%;
  }

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

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

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