:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #dbeafe;
  --deep: #0f172a;
  --deep-blue: #172554;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 32rem),
    linear-gradient(180deg, #f8fafc 0%, #eef4ff 48%, #f8fafc 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.92), rgba(239, 246, 255, 0.92), rgba(248, 250, 252, 0.92));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #475569;
  font-size: 14px;
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.header-search {
  display: flex;
  align-items: center;
  width: 280px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 11px 14px;
  color: var(--text);
  background: transparent;
}

.header-search button {
  border: 0;
  padding: 11px 16px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--deep);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
}

.mobile-nav a:hover {
  background: #eff6ff;
  color: var(--brand-strong);
}

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

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

.hero {
  position: relative;
  min-height: 620px;
  color: #fff;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  filter: blur(9px) saturate(1.15);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(23, 37, 84, 0.84), rgba(15, 23, 42, 0.45)),
    radial-gradient(circle at 80% 28%, rgba(14, 165, 233, 0.24), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  gap: 56px;
  align-items: center;
  padding: 80px 0 96px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(147, 197, 253, 0.3);
  color: #bfdbfe;
  font-size: 14px;
  backdrop-filter: blur(12px);
}

.hero h1 {
  max-width: 780px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: clamp(17px, 2.6vw, 22px);
  line-height: 1.7;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.42);
}

.btn-ghost {
  color: #e0f2fe;
  border: 1px solid rgba(226, 232, 240, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(2, 6, 23, 0.42);
  transform: rotate(1.5deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #334155);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, 0.76));
}

.hero-poster-meta {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
}

.hero-poster-meta strong {
  display: block;
  font-size: 22px;
}

.hero-poster-meta span {
  display: block;
  margin-top: 6px;
  color: #bfdbfe;
}

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

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

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

.section {
  padding: 64px 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  flex: 0 0 auto;
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-weight: 700;
}

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

.movie-card {
  min-width: 0;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #334155);
}

.poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: 0.35s ease;
}

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

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eff6ff;
}

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

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

.card-body p {
  margin: 0;
  min-height: 44px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.58;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  min-height: 170px;
  padding: 22px;
  border-radius: 26px;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  transition: 0.22s ease;
}

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

.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p,
.category-card span {
  position: relative;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 15rem);
}

.cat-blue { background: linear-gradient(135deg, #2563eb, #0f172a); }
.cat-cyan { background: linear-gradient(135deg, #0891b2, #164e63); }
.cat-purple { background: linear-gradient(135deg, #7c3aed, #312e81); }
.cat-rose { background: linear-gradient(135deg, #e11d48, #831843); }
.cat-amber { background: linear-gradient(135deg, #f59e0b, #92400e); }
.cat-indigo { background: linear-gradient(135deg, #4f46e5, #1e1b4b); }
.cat-green { background: linear-gradient(135deg, #059669, #064e3b); }
.cat-slate { background: linear-gradient(135deg, #475569, #0f172a); }
.cat-teal { background: linear-gradient(135deg, #0d9488, #134e4a); }
.cat-orange { background: linear-gradient(135deg, #ea580c, #7c2d12); }

.rank-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 46px 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  font-weight: 900;
}

.rank-thumb {
  width: 64px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: #1e293b;
}

.rank-title {
  min-width: 0;
}

.rank-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.rank-heat {
  color: #f97316;
  font-weight: 900;
}

.page-hero {
  padding: 70px 0 34px;
}

.page-hero-card {
  padding: 36px;
  border-radius: 32px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.9)),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.35), transparent 24rem);
  box-shadow: var(--shadow);
}

.page-hero-card h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.05em;
}

.page-hero-card p {
  max-width: 820px;
  margin: 0;
  color: #dbeafe;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin: 0 0 24px;
}

.filter-bar input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 18px;
  outline: 0;
  color: var(--text);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.empty-state[hidden] {
  display: none;
}

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

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

.breadcrumb a {
  color: var(--brand-strong);
}

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

.detail-main,
.detail-side {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.3);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.7)),
    radial-gradient(circle at center, rgba(37, 99, 235, 0.32), transparent 24rem);
  transition: 0.2s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 16px 24px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.42);
  cursor: pointer;
}

.detail-title {
  margin: 28px 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-intro {
  color: #334155;
  font-size: 18px;
  line-height: 1.8;
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.info-pills span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #1e40af;
  background: #dbeafe;
  font-weight: 700;
  font-size: 13px;
}

.content-card {
  margin-top: 22px;
  padding: 26px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.content-card h2,
.content-card h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

.side-poster {
  overflow: hidden;
  border-radius: 28px;
  background: #1e293b;
  box-shadow: var(--shadow);
}

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

.side-card {
  margin-top: 20px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.side-card h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.side-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.side-list a {
  display: block;
  padding: 11px 12px;
  border-radius: 14px;
  color: #334155;
  background: #f8fafc;
}

.side-list a:hover {
  color: var(--brand-strong);
  background: #eff6ff;
}

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

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: linear-gradient(90deg, #0f172a, #172554, #0f172a);
}

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

.footer-brand strong {
  display: block;
  color: #fff;
  font-size: 22px;
  margin-bottom: 10px;
}

.footer-brand p {
  margin: 0;
  max-width: 460px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

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

  .hero-content {
    grid-template-columns: 1fr 280px;
    gap: 32px;
  }
}

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

  .menu-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 76px 0 110px;
  }

  .hero-poster {
    max-width: 270px;
    transform: none;
  }

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

  .rank-panel,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .header-inner {
    min-height: 64px;
  }

  .brand-text small {
    display: none;
  }

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

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

  .btn {
    width: 100%;
  }

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

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

  .rank-heat {
    display: none;
  }

  .page-hero-card,
  .content-card {
    padding: 22px;
  }
}
