:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue-900: #1e3a8a;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --amber: #f59e0b;
  --green: #059669;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  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,
video {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(14px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-900);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  color: white;
  font-size: 14px;
  box-shadow: 0 12px 28px rgba(30, 64, 175, 0.28);
}

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

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: #334155;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: #dbeafe;
  color: var(--blue-900);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  border: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
}

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

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

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

.hero-backdrop,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
}

.hero-backdrop::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(96, 165, 250, 0.28), transparent 28%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent 52%);
}

.hero-grid {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 58px;
  color: white;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: #bfdbfe;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 690px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(17px, 2.5vw, 22px);
}

.hero-tags,
.detail-tags,
.tag-line,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.detail-tags span,
.tag-line span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--amber), #d97706);
  color: #111827;
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.24);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

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

.hero-poster {
  display: block;
  filter: drop-shadow(0 28px 38px rgba(0, 0, 0, 0.42));
}

.cover-shell {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(145deg, #dbeafe, #bfdbfe 48%, #93c5fd),
    linear-gradient(135deg, var(--blue-900), var(--blue-700));
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.cover-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

.cover-shell.is-missing img {
  opacity: 0;
}

.cover-shell.is-missing::after {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: white;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(145deg, rgba(30, 58, 138, 0.92), rgba(29, 78, 216, 0.9));
}

.hero-cover {
  border: 4px solid rgba(255, 255, 255, 0.8);
  border-radius: 26px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dots button {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  font-size: 30px;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.active {
  width: 28px;
  border-radius: 999px;
  background: white;
}

.quick-search-section {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.search-panel {
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.site-search {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  color: var(--text);
  background: #f8fafc;
  font-size: 16px;
}

.site-search:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.filter-row {
  margin-top: 14px;
}

.filter-chip {
  border: 0;
  padding: 8px 13px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  background: #dbeafe;
  color: var(--blue-900);
}

.section-block {
  padding: 54px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.section-heading a {
  color: var(--blue-900);
  font-weight: 800;
}

.section-kicker {
  color: var(--blue-700);
}

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

.movie-card {
  min-width: 0;
}

.card-link,
.compact-card,
.category-tile,
.rank-link,
.story-card {
  display: block;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card-link:hover,
.compact-card:hover,
.category-tile:hover,
.rank-link:hover {
  transform: translateY(-4px);
  border-color: #bfdbfe;
  box-shadow: var(--shadow);
}

.card-link:hover .cover-shell img,
.compact-card:hover .cover-shell img,
.category-tile:hover .cover-shell img {
  transform: scale(1.05);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  min-height: 48px;
  font-size: 16px;
  line-height: 1.35;
}

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

.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.tag-line span {
  background: #eff6ff;
  color: var(--blue-900);
}

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

.category-grid-large {
  margin-top: 28px;
}

.category-tile {
  position: relative;
  min-height: 228px;
}

.tile-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.tile-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(30, 58, 138, 0.22));
}

.category-tile-copy {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 20px;
  color: white;
}

.category-tile-copy h2 {
  margin: 0 0 6px;
  font-size: 23px;
}

.category-tile-copy p {
  margin: 0;
  color: #dbeafe;
  font-size: 14px;
}

.rank-section {
  background: linear-gradient(135deg, #0f172a, #1e3a8a 58%, #1d4ed8);
  color: white;
}

.light-heading h2,
.light-heading .section-kicker,
.light-heading a {
  color: white;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
}

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

.rank-link {
  display: grid;
  grid-template-columns: 54px 58px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
}

.rank-cover {
  width: 58px;
  height: 76px;
  aspect-ratio: auto;
  border-radius: 12px;
}

.rank-no {
  color: var(--blue-900);
  font-size: 24px;
  font-weight: 900;
}

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

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

.rank-copy em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-score {
  justify-self: end;
  color: #d97706;
  font-size: 18px;
  font-weight: 900;
}

.rank-side {
  position: sticky;
  top: 94px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.rank-side h3 {
  margin: 0 0 10px;
  font-size: 26px;
}

.rank-side p {
  color: #dbeafe;
}

.page-hero {
  position: relative;
  padding: 86px 0 62px;
  background:
    radial-gradient(circle at 80% 0%, rgba(96, 165, 250, 0.28), transparent 30%),
    linear-gradient(135deg, #eff6ff, #f8fafc 58%, #e0f2fe);
}

.page-hero p {
  max-width: 780px;
  margin: 16px 0 0;
  color: #475569;
  font-size: 19px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #cbd5e1;
  font-size: 14px;
}

.page-hero .breadcrumb {
  color: #64748b;
}

.breadcrumb a:hover {
  color: #93c5fd;
}

.channel-hero,
.rankings-hero {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  color: white;
}

.channel-hero h1,
.channel-hero p,
.channel-hero .section-kicker,
.rankings-hero h1,
.rankings-hero p,
.rankings-hero .section-kicker {
  color: white;
}

.category-preview {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

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

.compact-card {
  padding: 10px;
}

.compact-cover {
  border-radius: 14px;
}

.compact-card span,
.compact-card small {
  display: block;
}

.compact-card span {
  margin-top: 10px;
  font-weight: 800;
}

.compact-card small {
  color: var(--muted);
}

.full-rank-list .rank-link {
  grid-template-columns: 70px 68px minmax(0, 1fr) 90px;
}

.full-rank-list .rank-cover {
  width: 68px;
  height: 92px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.detail-grid {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 46px;
  min-height: 560px;
  align-items: center;
  color: white;
  padding: 64px 0;
}

.detail-poster {
  filter: drop-shadow(0 24px 36px rgba(0, 0, 0, 0.42));
}

.detail-cover {
  border: 4px solid rgba(255, 255, 255, 0.76);
  border-radius: 26px;
}

.detail-copy h1 {
  color: white;
  font-size: clamp(38px, 5vw, 68px);
}

.detail-one-line {
  max-width: 780px;
  color: #dbeafe;
  font-size: 21px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #eff6ff;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.video-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), rgba(30, 58, 138, 0.28));
  color: white;
  cursor: pointer;
}

.video-frame.is-playing .video-start {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue-900);
  font-size: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

.story-card {
  padding: 28px;
  margin-bottom: 20px;
}

.story-card h2 {
  margin: 0 0 12px;
  color: var(--blue-900);
  font-size: 26px;
}

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

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

.prev-next a {
  padding: 16px 18px;
  border-radius: 18px;
  background: #eff6ff;
  color: var(--blue-900);
  font-weight: 800;
}

.site-footer {
  margin-top: 50px;
  padding: 42px 0;
  background: #0f172a;
  color: white;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 680px;
  margin: 8px 0 0;
  color: #cbd5e1;
}

.footer-links {
  display: flex;
  gap: 16px;
  color: #bfdbfe;
  font-weight: 700;
}

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

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

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

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

  .hero-poster,
  .detail-poster {
    max-width: 320px;
  }

  .rank-side {
    position: static;
  }
}

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

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

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

  .mobile-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0 18px;
    align-items: stretch;
    flex-direction: column;
  }

  .hero-section,
  .hero-grid {
    min-height: 720px;
  }

  .hero-grid {
    align-content: center;
    gap: 28px;
  }

  .hero-poster,
  .detail-poster {
    max-width: 240px;
  }

  .movie-grid,
  .compact-grid,
  .compact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

  .section-heading,
  .footer-inner,
  .prev-next {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .rank-link,
  .full-rank-list .rank-link {
    grid-template-columns: 44px 54px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

  .detail-grid {
    min-height: auto;
    padding: 42px 0;
  }
}
