:root {
  --blue: #2563eb;
  --cyan: #22d3ee;
  --dark: #0f172a;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.menu-open {
  overflow: hidden;
}

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

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

.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);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #111827;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.brand-text {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 700;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

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

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: #eff6ff;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--blue);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(34, 211, 238, 0.28), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(37, 99, 235, 0.26), transparent 32%),
    linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #0e7490 100%);
}

.hero-slide {
  display: none;
  min-height: 600px;
  color: #ffffff;
}

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

.hero-slide-inner {
  width: min(1200px, calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 48px;
  padding: 52px 0;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

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

.hero-actions,
.category-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.32);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn-light {
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

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

.hero-media {
  position: relative;
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.35), rgba(34, 211, 238, 0.24));
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.32);
}

.hero-poster img,
.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster::after,
.poster-frame.is-empty::after,
.player-poster.is-empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.22), transparent 24%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(34, 211, 238, 0.82));
}

.hero-info-card {
  position: absolute;
  right: -26px;
  bottom: 36px;
  max-width: 270px;
  padding: 18px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(14px);
}

.hero-info-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
}

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.page-main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 72px;
}

.section {
  margin-top: 64px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-heading h2,
.page-title h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-heading p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 7px 11px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.9);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

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

.movie-meta-line {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 67px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span,
.detail-tag,
.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: #1e40af;
  background: #eff6ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  min-height: 172px;
  padding: 24px;
  color: #ffffff;
  border-radius: 26px;
  box-shadow: var(--shadow);
  transition: 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
}

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

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

.gradient-red { background: linear-gradient(135deg, #ef4444, #f97316); }
.gradient-orange { background: linear-gradient(135deg, #f97316, #f59e0b); }
.gradient-purple { background: linear-gradient(135deg, #7c3aed, #d946ef); }
.gradient-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.gradient-cyan { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.gradient-pink { background: linear-gradient(135deg, #db2777, #fb7185); }
.gradient-slate { background: linear-gradient(135deg, #334155, #64748b); }
.gradient-green { background: linear-gradient(135deg, #16a34a, #10b981); }
.gradient-teal { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.gradient-indigo { background: linear-gradient(135deg, #4f46e5, #2563eb); }

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 190px;
  gap: 14px;
  margin: 24px 0 28px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: #111827;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  outline: none;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 16px;
  font-weight: 900;
}

.rank-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #dbeafe;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-item h3 {
  margin: 0 0 6px;
  color: #111827;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-title {
  padding: 36px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  margin-top: 32px;
}

.detail-poster {
  position: sticky;
  top: 100px;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.detail-poster .poster-frame {
  border-radius: 30px;
}

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

.detail-panel h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

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

.detail-tag {
  min-height: 32px;
  font-size: 13px;
}

.detail-text {
  margin-top: 18px;
  color: #374151;
  font-size: 17px;
}

.detail-text h2 {
  margin: 28px 0 10px;
  color: #111827;
  font-size: 24px;
}

.player-section {
  margin-top: 40px;
  overflow: hidden;
  background: #0f172a;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.player-wrap video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.25), rgba(2, 6, 23, 0.82));
}

.player-overlay.is-hidden {
  display: none;
}

.player-play {
  width: 88px;
  height: 88px;
  color: #ffffff;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.45);
  font-size: 32px;
}

.player-title {
  padding: 22px 26px;
  color: #ffffff;
}

.player-title h2 {
  margin: 0;
  font-size: 24px;
}

.player-title p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.74);
}

.catalog-list {
  columns: 4 220px;
  column-gap: 28px;
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
}

.catalog-list a {
  display: block;
  break-inside: avoid;
  padding: 8px 0;
  color: #1f2937;
  border-bottom: 1px solid #f1f5f9;
}

.catalog-list a:hover {
  color: var(--blue);
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 640px;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

.footer-links a:hover {
  color: #ffffff;
}

.empty-state {
  display: none;
  padding: 28px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
}

.empty-state.show {
  display: block;
}

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

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

  .detail-poster {
    position: relative;
    top: auto;
    max-width: 420px;
  }
}

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

  .menu-button {
    display: block;
  }

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

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

  .hero-slide-inner {
    padding: 42px 0 70px;
  }

  .hero-media {
    order: -1;
  }

  .hero-info-card {
    position: static;
    max-width: none;
    margin-top: 14px;
  }

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 44px 1fr;
  }

  .rank-cover {
    display: none;
  }

  .section-heading,
  .footer-inner {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 22px;
  }
}

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

  .page-title,
  .detail-panel {
    padding: 22px;
  }

  .hero h1 {
    font-size: 38px;
  }
}
