:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #14b8a6;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.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(18px);
}

.nav-wrap {
  max-width: 1200px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35);
}

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

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-weight: 650;
  color: #334155;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--primary);
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  color: white;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 45%, #0f172a 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.hero-slides {
  position: relative;
  max-width: 1200px;
  min-height: 640px;
  margin: 0 auto;
  padding: 88px 24px 96px;
}

.hero-slide {
  position: absolute;
  inset: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  gap: 56px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: -120px -30vw;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(37, 99, 235, 0.78), rgba(20, 184, 166, 0.36)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
  z-index: -1;
}

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

.hero-copy {
  max-width: 680px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #dbeafe;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 18px 0 10px;
  font-size: clamp(24px, 3.5vw, 42px);
  line-height: 1.16;
}

.hero p {
  margin: 0;
  max-width: 700px;
  color: #dbeafe;
  font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3152b7;
  font-size: 13px;
  font-weight: 650;
}

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

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

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

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

.btn.primary {
  background: white;
  color: var(--primary);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.24);
}

.detail-info .btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}

.btn.ghost {
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(14px);
}

.hero-controls button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  cursor: pointer;
  font-size: 20px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
  width: 24px;
  background: white;
}

.content-section,
.toolbar-section,
.detail-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px;
}

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

.section-heading h2,
.detail-content h2,
.category-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-heading p,
.category-card p,
.compact-card p,
.movie-card p,
.rank-body p,
.detail-content p,
.page-hero p,
.detail-info p,
.site-footer p {
  color: var(--muted);
}

.section-heading p {
  margin: 6px 0 0;
}

.section-more {
  color: var(--primary);
  font-weight: 800;
}

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

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

.compact-card,
.movie-card,
.category-card,
.category-tile,
.rank-item,
.detail-content article {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.compact-card:hover,
.movie-card:hover,
.category-card:hover,
.category-tile:hover,
.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.compact-card,
.movie-card,
.category-card,
.category-tile,
.rank-item {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.compact-card a:first-child,
.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.compact-card a:first-child span,
.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 1;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.compact-card h3,
.movie-card h2 {
  margin: 16px 16px 8px;
  font-size: 18px;
  line-height: 1.32;
}

.compact-card p,
.movie-card p {
  margin: 0 16px 16px;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body {
  padding-bottom: 16px;
}

.movie-card .movie-meta {
  margin: 14px 16px 0;
}

.movie-card .movie-meta span {
  background: #f1f5f9;
  color: #475569;
}

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

.category-showcase {
  padding-top: 70px;
}

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

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

.category-tile,
.category-card {
  padding: 22px;
}

.category-tile a:first-child {
  display: grid;
  gap: 9px;
}

.category-tile span {
  color: var(--primary);
  font-weight: 900;
  font-size: 20px;
}

.category-tile strong {
  font-size: 14px;
  color: #475569;
}

.category-tile div,
.category-card ul {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: #334155;
}

.category-tile div a,
.category-card li a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  color: white;
  padding: 76px 24px;
}

.page-hero.compact {
  padding: 58px 24px;
}

.page-hero > div {
  max-width: 1200px;
  margin: 0 auto;
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
}

.toolbar-section {
  padding-bottom: 0;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px;
  gap: 14px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.toolbar.wide {
  grid-template-columns: minmax(260px, 1fr) 180px 180px 180px;
}

.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 96px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-no {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-weight: 900;
}

.rank-poster {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
}

.rank-body h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-body p {
  margin: 0 0 12px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 66px 24px 46px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.detail-info {
  align-self: center;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 12px;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.detail-info p {
  max-width: 820px;
  font-size: 18px;
}

.detail-meta,
.detail-tags {
  margin: 20px 0;
}

.player-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 34px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-button {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.48), rgba(2, 6, 23, 0.52));
  cursor: pointer;
}

.play-button span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary);
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.38);
}

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

.video-shell.is-playing .play-button {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-top: 24px;
}

.detail-content article {
  padding: 28px;
}

.detail-content p {
  margin-bottom: 0;
  font-size: 16px;
}

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

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

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

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

.site-footer a:hover {
  color: white;
}

.footer-brand {
  color: white;
  font-size: 20px;
}

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

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

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

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 13px 14px;
    border-radius: 12px;
  }

  .hero,
  .hero-slides {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    align-content: center;
  }

  .hero-poster {
    max-width: 260px;
    margin: 0 auto;
  }

  .card-grid,
  .catalog-grid,
  .category-grid,
  .category-grid.large,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

@media (max-width: 620px) {
  .nav-wrap {
    padding: 0 16px;
  }

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

  .hero-slides {
    padding: 64px 18px 96px;
  }

  .hero-slide {
    inset: 0 18px;
  }

  .content-section,
  .toolbar-section,
  .detail-content,
  .detail-hero,
  .player-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .card-grid,
  .catalog-grid,
  .category-grid,
  .category-grid.large,
  .footer-grid,
  .toolbar,
  .toolbar.wide {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

  .rank-item {
    grid-template-columns: 42px 78px 1fr;
    gap: 12px;
  }

  .rank-no {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .detail-info h1 {
    font-size: 34px;
  }
}
