:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --indigo: #4f46e5;
  --purple: #7c3aed;
  --soft-blue: #eff6ff;
  --soft-indigo: #eef2ff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.header-inner {
  max-width: 1240px;
  height: 76px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.brand-mark span {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #fff;
  margin-left: 3px;
}

.brand-text {
  font-size: 22px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #334155;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--blue);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.header-search input,
.mobile-search input {
  width: 220px;
  border: 0;
  outline: 0;
  padding: 10px 12px 10px 18px;
  color: var(--ink);
}

.header-search button,
.mobile-search button,
.search-large button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--soft-blue);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

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

.mobile-links,
.mobile-cats {
  display: grid;
  gap: 10px;
  padding-top: 14px;
}

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

.mobile-cats a,
.mobile-links a {
  padding: 11px 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
  font-weight: 650;
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 48%, #faf5ff 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.14), transparent 28%), radial-gradient(circle at 85% 15%, rgba(124, 58, 237, 0.16), transparent 32%), radial-gradient(circle at 60% 85%, rgba(79, 70, 229, 0.12), transparent 30%);
}

.hero-inner {
  position: relative;
  max-width: 1240px;
  min-height: 650px;
  margin: 0 auto;
  padding: 76px 22px 70px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 46px;
}

.hero-copy h1 {
  margin: 14px 0 18px;
  max-width: 720px;
  font-size: clamp(36px, 5.4vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-desc {
  max-width: 620px;
  margin: 0;
  color: #475569;
  font-size: 19px;
}

.hero-pills,
.hero-actions,
.detail-actions,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-pills {
  margin-top: 26px;
}

.hero-pills a,
.tag-row span,
.card-meta span,
.detail-meta span,
.filter-chips button {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.09);
  color: #1d4ed8;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 750;
}

.hero-actions {
  margin-top: 34px;
}

.btn-primary,
.btn-ghost,
.section-link,
.text-link,
.detail-actions a,
.rank-play {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary,
.rank-play {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.25);
}

.btn-ghost,
.section-link,
.text-link,
.detail-actions a {
  color: var(--blue);
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-link:hover,
.text-link:hover,
.detail-actions a:hover,
.rank-play:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.hero-stage {
  position: relative;
  min-height: 500px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 22px;
  align-items: stretch;
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-art {
  min-height: 470px;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

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

.hero-info {
  align-self: end;
  margin-bottom: 58px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.hero-info span {
  color: var(--blue);
  font-weight: 850;
}

.hero-info h2 {
  margin: 8px 0 10px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.12;
}

.hero-info p {
  color: #475569;
  margin: 0 0 18px;
}

.hero-info a {
  color: var(--blue);
  font-weight: 850;
}

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
  font-size: 26px;
  box-shadow: var(--shadow-soft);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: #bfdbfe;
}

.hero-dot.is-active {
  width: 28px;
  border-radius: 999px;
  background: var(--blue);
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 22px;
}

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

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

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

.section-heading span {
  display: inline-block;
  margin-top: 9px;
  color: var(--muted);
}

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

.category-tile,
.category-overview-card,
.movie-card,
.detail-card,
.side-panel,
.ranking-row {
  background: var(--paper);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.category-tile {
  padding: 22px;
  min-height: 148px;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span {
  font-size: 19px;
  font-weight: 850;
}

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

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

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

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 220px;
  background: linear-gradient(135deg, #dbeafe, #eef2ff 48%, #f5d0fe);
}

.movie-card .poster {
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover .poster img,
.hero-art:hover img,
.ranking-poster:hover img {
  transform: scale(1.045);
}

.poster-empty::after {
  content: attr(data-title);
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #1e3a8a;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

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

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

.movie-card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card-body h3 a:hover,
.ranking-info h2 a:hover,
.side-link-list a:hover {
  color: var(--blue);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-meta span {
  background: #f1f5f9;
  color: #475569;
  padding: 5px 9px;
  font-size: 12px;
}

.movie-card.compact .movie-card-body h3 {
  font-size: 16px;
}

.movie-card.compact .movie-card-body p {
  min-height: 42px;
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
}

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

.rank-list li a {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.rank-no {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  font-weight: 900;
}

.rank-title {
  font-weight: 850;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

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

.toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.wrap-toolbar {
  flex-wrap: wrap;
}

.toolbar input,
.search-large input {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: #fff;
  padding: 13px 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.filter-chips button {
  border: 0;
  cursor: pointer;
}

.filter-chips button.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #eff6ff, #eef2ff 50%, #faf5ff);
}

.page-hero > div {
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 22px;
}

.page-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p:last-child {
  max-width: 760px;
  margin: 0;
  color: #475569;
  font-size: 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.category-cover-row img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: #e0e7ff;
}

.category-overview-card h2 {
  margin: 4px 0 10px;
  font-size: 24px;
}

.category-overview-card p {
  color: var(--muted);
}

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

.ranking-list-page {
  display: grid;
  gap: 16px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 92px 70px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-poster {
  min-height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  font-size: 22px;
  font-weight: 900;
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-info p {
  margin: 0 0 12px;
  color: var(--muted);
}

.detail-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 22px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

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

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

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.42));
  transition: opacity 0.2s ease;
}

.player-box.is-playing .player-overlay {
  opacity: 0;
}

.play-button {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.28);
}

.play-button span {
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 24px solid var(--blue);
  margin-left: 5px;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 16px;
  right: 18px;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.detail-card,
.side-panel {
  padding: 26px;
  margin-top: 24px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-meta {
  margin-bottom: 14px;
}

.tag-row {
  margin: 16px 0;
}

.lead-text {
  color: #334155;
  font-size: 18px;
  font-weight: 650;
}

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

.detail-card p {
  color: #475569;
}

.detail-actions {
  margin-top: 26px;
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.poster-panel {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.side-panel dl {
  margin: 0;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px 12px;
}

.side-panel dt {
  color: var(--muted);
}

.side-panel dd {
  margin: 0;
  font-weight: 750;
}

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

.side-link-list a {
  display: grid;
  gap: 2px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

.side-link-list span {
  font-weight: 800;
}

.side-link-list small {
  color: var(--muted);
}

.search-page {
  min-height: 520px;
}

.search-large {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.search-large input {
  width: min(100%, 620px);
  border-radius: 18px;
}

.search-large button {
  border-radius: 18px;
  padding: 13px 22px;
}

.search-summary {
  margin-bottom: 20px;
  color: var(--muted);
  font-weight: 750;
}

.site-footer {
  margin-top: 40px;
  background: linear-gradient(135deg, #0f172a, #1e293b 48%, #111827);
  color: #cbd5e1;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 22px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

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

.copyright {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 22px 28px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

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

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

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

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

  .detail-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
    align-items: start;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 68px;
    padding: 0 16px;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding: 48px 16px 60px;
  }

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

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

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

  .hero-info {
    margin-bottom: 72px;
    padding: 20px;
  }

  .content-section,
  .page-hero > div,
  .detail-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-heading,
  .search-large {
    align-items: stretch;
    flex-direction: column;
  }

  .category-grid,
  .movie-grid,
  .compact-grid,
  .side-card-grid,
  .category-movie-grid,
  .category-overview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 76px 1fr;
  }

  .ranking-number {
    position: absolute;
    margin-left: 8px;
    margin-top: 8px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .rank-play {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 480px) {
  .category-grid,
  .movie-grid,
  .compact-grid,
  .side-card-grid,
  .category-movie-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-art {
    min-height: 300px;
  }

  .rank-list li a {
    grid-template-columns: 38px 1fr;
  }

  .rank-meta {
    display: none;
  }
}
