:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f59e0b;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --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;
  max-width: 100%;
}

button,
input,
select {
  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);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

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

.nav-links a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
}

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

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

.hero-slide {
  display: none;
  min-height: 620px;
  position: relative;
  isolation: isolate;
}

.hero-slide.is-active {
  display: block;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  z-index: -3;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.25) 100%),
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.4), transparent 36%),
    linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.92) 100%);
}

.hero-inner {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 390px;
  align-items: center;
  gap: 42px;
  padding: 80px 0 74px;
}

.hero-copy {
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero-copy h1 {
  max-width: 850px;
  margin: 22px 0 12px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: 18px;
}

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

.pill,
.tag,
.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta .pill {
  color: #e0f2fe;
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(147, 197, 253, 0.4);
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.36);
}

.btn.secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.btn.light {
  color: var(--primary);
  background: #eff6ff;
  box-shadow: none;
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 32px 60px rgba(0, 0, 0, 0.36);
  transform: rotate(1.2deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: inherit;
  pointer-events: none;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.slider-dots {
  display: flex;
  gap: 9px;
  pointer-events: auto;
}

.slider-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.slider-dot.is-active {
  width: 30px;
  border-radius: 999px;
  background: #ffffff;
}

.slider-arrows {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.slider-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.34);
  cursor: pointer;
}

.search-band {
  position: relative;
  z-index: 5;
  margin: -38px auto 42px;
  width: min(980px, calc(100% - 32px));
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 14px;
}

.search-form {
  display: flex;
  gap: 12px;
}

.search-form input,
.inline-search,
.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 46px;
  padding: 0 16px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
}

.search-form input:focus,
.inline-search:focus,
.filter-select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.section {
  padding: 54px 0;
}

.section.compact {
  padding: 34px 0;
}

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

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

.section-desc {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

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

.movie-card,
.category-card,
.rank-card,
.info-card {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.12);
}

.poster-link,
.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #f8fafc);
}

.movie-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.25s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.poster-duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.75);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

.card-title a:hover {
  color: var(--primary);
}

.card-summary {
  display: -webkit-box;
  min-height: 3.3em;
  margin: 11px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: #64748b;
  font-size: 13px;
}

.category-card {
  position: relative;
  padding: 24px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.category-card:nth-child(3n + 2) {
  background: linear-gradient(135deg, #111827, #4338ca);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #172554, #0284c7);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.category-card .btn {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.rank-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
}

.rank-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 900;
}

.rank-card img {
  width: 94px;
  height: 126px;
  border-radius: 16px;
  object-fit: cover;
}

.page-hero {
  padding: 58px 0 42px;
  color: #ffffff;
  background:
    radial-gradient(circle at 16% 8%, rgba(96, 165, 250, 0.38), transparent 28%),
    linear-gradient(135deg, #0f172a, #1e3a8a 52%, #0f172a);
}

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

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

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  margin-bottom: 24px;
}

.filter-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-chip {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
}

.filter-chip.is-active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #64748b;
  font-size: 14px;
  margin: 24px 0;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 700;
}

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

.detail-title {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.player-card {
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
}

.video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

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

.player-action {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.42);
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.player-action:hover {
  transform: translate(-50%, -50%) scale(1.06);
  background: var(--primary-dark);
}

.video-shell.is-playing .player-action {
  opacity: 0;
  pointer-events: none;
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 14px;
  color: #e5e7eb;
  font-size: 13px;
  pointer-events: none;
}

.detail-panel,
.sidebar-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.detail-panel h2,
.sidebar-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-panel p,
.sidebar-panel p {
  margin: 0 0 14px;
  color: #334155;
}

.detail-poster {
  width: 100%;
  border-radius: 22px;
  margin-bottom: 18px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.related-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.related-item:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

.related-item img {
  width: 74px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.related-item strong {
  display: block;
  line-height: 1.35;
  margin-bottom: 5px;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer p,
.site-footer a {
  color: #cbd5e1;
  font-size: 14px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
}

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

.search-results {
  min-height: 300px;
}

@media (max-width: 960px) {
  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 18px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
  }

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

  .nav-links a {
    padding: 12px 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 58px 0 92px;
  }

  .hero-poster {
    max-width: 320px;
    justify-self: center;
    transform: none;
  }

  .movie-grid,
  .category-grid,
  .rank-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-layout {
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .nav-wrap,
  .container,
  .footer-grid {
    width: min(100% - 24px, 1180px);
  }

  .logo {
    font-size: 19px;
  }

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

  .hero-inner {
    padding: 42px 0 96px;
    gap: 26px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .search-band {
    margin-top: -26px;
  }

  .search-form,
  .catalog-tools {
    grid-template-columns: 1fr;
    display: grid;
  }

  .search-form button {
    width: 100%;
  }

  .section-head {
    display: block;
  }

  .movie-grid,
  .category-grid,
  .rank-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .rank-card img {
    width: 82px;
    height: 108px;
  }

  .player-action {
    width: 64px;
    height: 64px;
  }
}
