
:root {
  --bg: #f3f7ff;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --line: rgba(148, 163, 184, 0.22);
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --accent: #38bdf8;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --radius-lg: 28px;
  --container: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.20), transparent 32%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.15), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

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

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

button,
input,
textarea,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.96));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(191,219,254,0.95));
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.18);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand-copy small {
  opacity: 0.85;
  margin-top: 3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255,255,255,0.92);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #0f172a;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 10px 20px rgba(15,23,42,0.12);
}

.nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
}

.pill-link,
.chip,
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.24);
  color: #fff;
  background: rgba(255,255,255,0.12);
  padding: 8px 12px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.pill-link {
  border-color: rgba(37,99,235,0.18);
  color: #0f172a;
  background: rgba(255,255,255,0.75);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 0;
  background: rgba(255,255,255,0.14);
  color: #fff;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.hero {
  padding: 28px 0 14px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.18), transparent 30%),
    linear-gradient(135deg, rgba(10, 26, 56, 0.98), rgba(29, 78, 216, 0.88), rgba(14, 165, 233, 0.85));
  color: #fff;
  box-shadow: var(--shadow);
  padding: 30px;
}

.hero-shell::before,
.hero-shell::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.45;
}

.hero-shell::before {
  width: 260px;
  height: 260px;
  right: -40px;
  top: -40px;
  background: rgba(56, 189, 248, 0.55);
}

.hero-shell::after {
  width: 200px;
  height: 200px;
  left: -50px;
  bottom: -50px;
  background: rgba(59, 130, 246, 0.55);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: stretch;
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 18px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.94);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-copy p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.84);
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 16px;
  border: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
  font-weight: 700;
}

.btn {
  color: #0f172a;
  background: linear-gradient(135deg, #ffffff, #dbeafe);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.18);
}

.btn:hover,
.btn-ghost:hover,
.card-link:hover,
.movie-card:hover,
.rank-item:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.20);
}

.search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(14px);
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 0;
  outline: 0;
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  color: #0f172a;
}

.search-form button {
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
}

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

.stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
}

.stat strong {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.stat span {
  color: rgba(255,255,255,0.78);
  font-size: 0.92rem;
}

.hero-stage {
  position: relative;
  min-height: 460px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15,23,42,0.20);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  padding: 18px;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateX(18px);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.hero-slide .poster-large {
  min-height: 100%;
  border-radius: 26px;
}

.hero-spotlight {
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 18px 4px 18px 0;
}

.hero-spotlight h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
}

.hero-spotlight p {
  margin: 0;
  line-height: 1.8;
  color: rgba(255,255,255,0.82);
}

.hero-spotlight .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-side-list {
  display: grid;
  gap: 12px;
  align-self: start;
}

.hero-side-list .mini {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
}

.hero-side-list .mini .poster {
  width: 76px;
  height: 92px;
  border-radius: 16px;
  box-shadow: none;
}

.hero-side-list .mini h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.hero-side-list .mini p {
  margin: 0;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.5;
}

.hero-controls {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 10px;
  z-index: 4;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 18px;
}

.pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

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

.pager button.active {
  width: 34px;
  background: #fff;
}

.section {
  padding: 28px 0;
}

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

.section-head h2,
.section-head h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.section-link {
  color: var(--primary);
  font-weight: 700;
}

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

.card-grid.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card,
.card-link,
.rank-item,
.category-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
}

.movie-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.movie-card-top h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.movie-card-top span,
.rank-meta {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.movie-card-body p {
  margin: 0 0 12px;
  color: #334155;
  line-height: 1.7;
  font-size: 0.95rem;
  min-height: 3.4em;
}

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

.chip {
  padding: 6px 10px;
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #f8fbff;
}

.poster {
  position: relative;
  display: grid;
  align-content: end;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
}

.poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.24), transparent 28%),
    radial-gradient(circle at 70% 10%, rgba(255,255,255,0.12), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.38));
}

.poster::after {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  filter: blur(10px);
}

.poster-card {
  height: 220px;
}

.poster-large {
  min-height: 360px;
}

.poster-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.22);
  font-size: 0.84rem;
  backdrop-filter: blur(10px);
}

.poster-copy {
  position: relative;
  z-index: 2;
  padding: 16px;
}

.poster-copy h3,
.poster-copy p,
.poster-copy span {
  margin: 0;
}

.poster-copy h3 {
  font-size: 1.15rem;
  line-height: 1.4;
}

.poster-copy p {
  margin-top: 6px;
  font-size: 0.92rem;
  opacity: 0.88;
}

.poster-copy span {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.82rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
}

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

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

.category-card {
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.category-card h3 {
  margin: 12px 0 8px;
  font-size: 1.05rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-card .count {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37,99,235,0.08);
  color: var(--primary);
  font-weight: 700;
}

.search-panel,
.filter-panel,
.detail-panel,
.info-panel {
  background: rgba(255,255,255,0.86);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.search-panel {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.search-toolbar,
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.search-toolbar input,
.search-toolbar select,
.filter-toolbar input,
.filter-toolbar select {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.25);
  background: #fff;
  min-width: 180px;
}

.muted {
  color: var(--muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  gap: 22px;
  align-items: start;
}

.detail-panel {
  padding: 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 14px;
}

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

.detail-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.1;
}

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

.detail-meta .chip {
  background: #eef4ff;
}

.synopsis,
.review {
  margin-top: 18px;
  line-height: 1.9;
  color: #334155;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.player-shell {
  margin-top: 18px;
}

.video-frame {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(148,163,184,0.2);
  box-shadow: var(--shadow);
}

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

.video-frame .frame-hint {
  padding: 14px 18px;
  color: #cbd5e1;
  font-size: 0.94rem;
  border-top: 1px solid rgba(148,163,184,0.16);
}

.aside-stack {
  display: grid;
  gap: 18px;
}

.section-card {
  background: rgba(255,255,255,0.86);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.section-card h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

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

.rank-item {
  display: grid;
  gap: 0;
  overflow: hidden;
  position: relative;
}

.rank-item .rank-no {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.88);
  color: var(--primary);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.rank-copy {
  padding: 14px;
}

.rank-copy h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.rank-copy p {
  margin: 0 0 12px;
  color: #334155;
  line-height: 1.7;
}

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

.overview-box {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255,255,255,0.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.overview-box h3 {
  margin: 0 0 10px;
}

.overview-box p {
  margin: 0;
  line-height: 1.8;
  color: #334155;
}

.site-footer {
  margin-top: 30px;
  padding: 30px 0 20px;
  background: linear-gradient(180deg, #0f172a, #111827);
  color: rgba(255,255,255,0.86);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 20px;
}

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

.footer-grid p,
.footer-grid a {
  margin: 0 0 8px;
  color: rgba(255,255,255,0.74);
  line-height: 1.75;
  display: block;
}

.footer-bottom {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.62);
  font-size: 0.95rem;
}

.empty-state {
  padding: 32px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255,255,255,0.85);
  border: 1px dashed rgba(148,163,184,0.35);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

.pagination button {
  min-width: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.25);
  background: #fff;
}

.pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

@media (max-width: 1100px) {
  .hero-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-stage {
    min-height: 520px;
  }
}

@media (max-width: 780px) {
  .container {
    width: min(var(--container), calc(100% - 20px));
  }

  .header-inner {
    min-height: 68px;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 10px;
    right: 10px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(15,23,42,0.96);
    border-radius: 22px;
    padding: 12px;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 12px;
  }

  .hero-shell {
    padding: 18px;
    border-radius: 26px;
  }

  .hero-stage,
  .hero-slide {
    min-height: auto;
  }

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

  .hero-stage {
    min-height: 0;
  }

  .hero-copy h1 {
    font-size: 2rem;
  }

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

  .card-grid,
  .movie-grid,
  .rank-grid,
  .related-grid,
  .category-grid,
  .overview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .search-form {
    flex-direction: column;
  }

  .search-form input,
  .search-form button,
  .search-toolbar input,
  .search-toolbar select,
  .filter-toolbar input,
  .filter-toolbar select {
    width: 100%;
    min-width: 0;
  }
}
