:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eff6ff;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --green: #16a34a;
  --yellow: #f59e0b;
  --red: #ef4444;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb, #0891b2);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.24);
}

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

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #ffffff;
  box-shadow: inset 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.brand-text {
  font-size: 20px;
  white-space: nowrap;
}

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

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #111827;
  background: #fde68a;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
}

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

.mobile-nav .nav-link {
  display: block;
  background: rgba(255, 255, 255, 0.1);
}

.hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(120deg, #0f172a, #1d4ed8 52%, #0891b2);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  align-items: center;
  gap: 44px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  filter: saturate(1.2) contrast(1.05);
  transform: translateX(-50%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  background: radial-gradient(circle at 75% 30%, rgba(255, 255, 255, 0.18), transparent 30%), linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.76), rgba(8, 145, 178, 0.7));
  transform: translateX(-50%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 720px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #bae6fd;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow span {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero h1,
.hero h2 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2.2vw, 24px);
}

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

.primary-btn,
.ghost-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;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.32);
}

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

.primary-btn.small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

.primary-btn.wide {
  width: 100%;
  margin-top: 16px;
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-poster {
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

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

.hero-poster span {
  display: block;
  padding: 16px 18px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-prev {
  left: max(16px, calc((100% - 1180px) / 2 - 58px));
}

.hero-next {
  right: max(16px, calc((100% - 1180px) / 2 - 58px));
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dot.active {
  width: 30px;
  background: #ffffff;
}

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

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: -36px;
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.intro-strip h2,
.section-head h2,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.intro-strip p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.section-head h2 {
  margin-top: 5px;
  font-size: clamp(26px, 3vw, 36px);
}

.section-head a,
.text-link {
  color: var(--blue);
  font-weight: 800;
}

.section-head.tight {
  margin-bottom: 18px;
}

.section-band {
  background: linear-gradient(135deg, #fff7ed, #ecfeff);
}

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

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-box {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.large-card .poster-box {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.82));
}

.play-sign {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: auto;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  opacity: 0;
  backdrop-filter: blur(8px);
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-sign {
  opacity: 1;
}

.year-badge,
.rank-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  right: auto;
  left: 12px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}

.card-body strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
}

.card-body em,
.meta-line,
.mini-movie em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line {
  display: block;
  margin-top: auto;
  font-size: 13px;
}

.chip-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-row span,
.tag-cloud span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #2563eb;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.category-tile {
  min-height: 150px;
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span,
.category-card-head span {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile em,
.category-card-head em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

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

.category-card {
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card-head {
  display: block;
  margin-bottom: 16px;
}

.tone-blue,
.tone-cyan,
.tone-violet,
.tone-pink,
.tone-orange,
.tone-rose,
.tone-slate,
.tone-indigo,
.tone-green,
.tone-amber {
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.tone-blue { background: linear-gradient(135deg, #eff6ff, #ffffff); }
.tone-cyan { background: linear-gradient(135deg, #ecfeff, #ffffff); }
.tone-violet { background: linear-gradient(135deg, #f5f3ff, #ffffff); }
.tone-pink { background: linear-gradient(135deg, #fdf2f8, #ffffff); }
.tone-orange { background: linear-gradient(135deg, #fff7ed, #ffffff); }
.tone-rose { background: linear-gradient(135deg, #fff1f2, #ffffff); }
.tone-slate { background: linear-gradient(135deg, #f1f5f9, #ffffff); }
.tone-indigo { background: linear-gradient(135deg, #eef2ff, #ffffff); }
.tone-green { background: linear-gradient(135deg, #f0fdf4, #ffffff); }
.tone-amber { background: linear-gradient(135deg, #fffbeb, #ffffff); }

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
  align-items: start;
}

.ranking-box,
.side-card,
.poster-panel,
.detail-card,
.player-card,
.ranking-list-panel {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.ranking-box,
.side-card,
.poster-panel,
.ranking-list-panel {
  padding: 22px;
}

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

.mini-list.slim {
  gap: 10px;
}

.mini-movie {
  display: grid;
  grid-template-columns: auto 78px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.mini-list.slim .mini-movie {
  grid-template-columns: 64px minmax(0, 1fr);
}

.mini-list.slim .mini-rank {
  display: none;
}

.mini-movie:hover {
  background: #f8fafc;
}

.mini-movie img {
  width: 78px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

.mini-list.slim .mini-movie img {
  width: 64px;
  height: 46px;
}

.mini-movie strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mini-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  font-weight: 900;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 26px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.search-box {
  display: flex;
  flex: 1 1 320px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.search-box input,
.filter-select {
  height: 44px;
  border: 0;
  outline: none;
  background: transparent;
}

.search-box input {
  width: 100%;
}

.filter-select {
  min-width: 145px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.page-hero {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 64px 16px;
  color: #ffffff;
  text-align: center;
  background: linear-gradient(120deg, #2563eb, #0891b2);
}

.page-hero div {
  max-width: 830px;
}

.page-hero h1 {
  margin-top: 8px;
  font-size: clamp(38px, 6vw, 62px);
}

.page-hero p {
  margin: 16px auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.ranking-hero {
  background: linear-gradient(120deg, #0f172a, #7c3aed, #ef4444);
}

.split-ranking .ranking-list-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  align-items: start;
}

.watch-column {
  min-width: 0;
}

.player-card {
  padding: 16px;
  margin-bottom: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  font-size: 30px;
}

.play-overlay strong {
  font-size: 20px;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 16px 0 10px;
  font-size: clamp(30px, 4vw, 46px);
}

.detail-card h2,
.side-card h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-card p {
  color: #334155;
  font-size: 16px;
}

.lead-text {
  font-size: 19px;
  font-weight: 700;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
}

.review-box {
  margin-top: 28px;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.side-column {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 20px;
}

.poster-panel img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.related-section {
  padding-top: 32px;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(180px, 0.5fr));
  gap: 34px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
}

.footer-logo .brand-mark {
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

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

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

.footer-links strong {
  color: #ffffff;
  margin-bottom: 6px;
}

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  .movie-grid,
  .compact-grid,
  .archive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .side-column {
    position: static;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 680px;
  }

    .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 24px;
    padding: 36px 0 64px;
  }

  .hero-poster {
    display: none;
  }

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

  .featured-grid,
  .category-card-grid,
  .split-ranking .ranking-list-panel,
  .footer-inner,
  .side-column {
    grid-template-columns: 1fr;
  }
}

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

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

  .hero-arrow {
    display: none;
  }

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

  .section-wrap {
    padding: 42px 0;
  }

  .detail-card,
  .player-card,
  .ranking-box,
  .side-card,
  .poster-panel {
    padding: 16px;
  }

  .mini-movie,
  .mini-list.slim .mini-movie {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .mini-rank {
    display: none;
  }
}
