:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --cyan-soft: #cffafe;
  --amber: #f59e0b;
  --green: #16a34a;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.16);
  --radius-lg: 18px;
  --radius-xl: 26px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 999;
  width: auto;
  height: auto;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
}

.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.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  white-space: nowrap;
  color: #0f172a;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
}

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

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

.nav a:hover,
.nav a.active {
  color: var(--blue);
  background: #eff6ff;
}

.site-search {
  position: relative;
  width: min(260px, 30vw);
}

.site-search input {
  width: 100%;
  height: 40px;
  padding: 0 15px 0 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.site-search::before {
  content: "⌕";
  position: absolute;
  left: 15px;
  top: 50%;
  color: #94a3b8;
  transform: translateY(-52%);
  font-size: 18px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  background: #eff6ff;
  color: var(--blue);
  cursor: pointer;
}

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

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 200px;
  background: linear-gradient(0deg, var(--bg), rgba(248, 250, 252, 0));
  pointer-events: none;
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(6, 182, 212, 0.45), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.52) 48%, rgba(15, 23, 42, 0.22));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 80px 0 120px;
}

.hero-copy {
  width: min(690px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #cffafe;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero h1 span {
  color: #a5f3fc;
}

.hero p {
  width: min(620px, 100%);
  margin: 0 0 30px;
  font-size: clamp(18px, 2vw, 22px);
  color: rgba(255, 255, 255, 0.88);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: #ffffff;
  color: var(--blue);
}

.btn-blue {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #ffffff;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  gap: 9px;
  margin-top: 34px;
}

.hero-dot {
  width: 34px;
  height: 7px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #ffffff;
}

.section {
  padding: 56px 0;
}

.section-tight {
  padding: 34px 0;
}

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

.section-kicker {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.feature-strip {
  position: relative;
  z-index: 3;
  margin-top: -82px;
}

.feature-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.stat-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0;
}

.stat-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 28px;
  color: var(--blue);
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: var(--shadow-md);
}

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

.poster-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 15px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 800;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  margin: 0;
  color: #475569;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 142px;
}

.horizontal-card .poster {
  aspect-ratio: auto;
  height: 100%;
}

.category-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #ffffff;
  font-size: 25px;
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.category-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.category-card strong {
  color: var(--blue);
}

.page-hero {
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.25), transparent 35%),
    linear-gradient(135deg, #1d4ed8, #0891b2);
  color: #ffffff;
  padding: 72px 0;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.toolbar {
  position: sticky;
  top: 70px;
  z-index: 20;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(12px);
}

.toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-input,
.filter-select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 0 14px;
  outline: none;
}

.filter-input {
  width: min(360px, 100%);
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.result-count {
  margin-left: auto;
  color: var(--muted);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.player-card,
.content-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.player-card {
  overflow: hidden;
}

.video-player {
  position: relative;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

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

.play-overlay[hidden] {
  display: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue);
  font-size: 32px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.player-status {
  min-height: 24px;
  padding: 11px 16px;
  color: #475569;
  background: #f8fafc;
  font-size: 14px;
}

.content-card {
  padding: 26px;
}

.detail-title {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.meta-pill.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.meta-pill.green {
  background: #dcfce7;
  color: #15803d;
}

.detail-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 28px 0 12px;
  font-size: 22px;
  font-weight: 900;
}

.prose p {
  margin: 0 0 15px;
  color: #334155;
  white-space: pre-line;
}

.side-card {
  position: sticky;
  top: 100px;
  padding: 20px;
}

.side-card h2,
.side-card h3 {
  margin: 0 0 14px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background-color 0.2s ease;
}

.side-link:hover {
  background: #f1f5f9;
}

.side-link img {
  width: 72px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
}

.side-link strong {
  display: block;
  line-height: 1.25;
}

.side-link span {
  color: var(--muted);
  font-size: 13px;
}

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

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

.pagination-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 24px;
}

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

.rank-item {
  counter-increment: rank;
  display: grid;
  grid-template-columns: 46px 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

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

.rank-item img {
  width: 92px;
  height: 122px;
  border-radius: 14px;
  object-fit: cover;
}

.footer {
  margin-top: 60px;
  padding: 44px 0;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 28px;
}

.footer h2,
.footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.footer p {
  margin: 0;
}

.footer a {
  display: block;
  margin: 7px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
}

.empty-state {
  display: none;
  padding: 40px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

.catalog-grid .movie-card[hidden] {
  display: none;
}

@media (max-width: 1040px) {
  .site-search {
    display: none;
  }

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

  .category-grid,
  .feature-panel,
  .ranking-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

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

  .nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
  }

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

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 70px 0 100px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .feature-panel,
  .movie-grid,
  .category-grid,
  .ranking-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-grid {
    gap: 18px;
  }

  .horizontal-card,
  .rank-item {
    grid-template-columns: 118px 1fr;
  }

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

  .toolbar {
    top: 64px;
  }

  .toolbar-inner {
    align-items: stretch;
  }

  .filter-input,
  .filter-select,
  .result-count {
    width: 100%;
    margin-left: 0;
  }

  .section-header {
    display: block;
  }
}
