:root {
  --sky: #0284c7;
  --sky-dark: #075985;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
}

body {
  background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 42%, #f8fafc 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
}

.nav-link {
  color: #334155;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--sky);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #0f172a;
}

.mobile-nav {
  display: none;
  padding: 12px 20px 20px;
  border-top: 1px solid #e2e8f0;
  background: white;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

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

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: white;
  background: #020617;
}

.hero-stage {
  position: relative;
  min-height: 650px;
}

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

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

.hero-backdrop,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-shade,
.detail-bg-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 52px;
  align-items: center;
  padding: 72px 0 110px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 13px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(125, 211, 252, 0.35);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-intro h1 {
  margin-top: 18px;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  margin-top: 20px;
  max-width: 690px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.detail-meta,
.tag-row,
.genre-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.genre-links a {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
}

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

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

.btn-primary,
.search-panel button,
.panel-link {
  color: white;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  box-shadow: 0 16px 28px rgba(2, 132, 199, 0.32);
}

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

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

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 3 / 4.15;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.category-cover-row img,
.mini-card img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span,
.play-float {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(2, 132, 199, 0.92);
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.35);
}

.hero-poster span {
  left: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.hero-dot {
  width: 74px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  opacity: 0.62;
  border: 2px solid transparent;
  flex: 0 0 auto;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

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

.hero-dot.is-active,
.hero-dot:hover {
  opacity: 1;
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.quick-search {
  margin-top: -46px;
  position: relative;
  z-index: 10;
}

.search-panel {
  border-radius: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.search-panel label {
  font-weight: 850;
  color: #0f172a;
}

.search-panel div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-panel input,
.filter-bar input {
  min-height: 48px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0 16px;
  background: white;
  outline: none;
}

.search-panel input:focus,
.filter-bar input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

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

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

.section-head h2,
.side-panel h2,
.detail-section h2,
.detail-side h2 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.035em;
}

.section-head p {
  margin-top: 8px;
  color: var(--muted);
}

.section-more,
.text-link {
  color: var(--sky);
  font-weight: 800;
}

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

.category-card,
.category-overview-card,
.side-panel,
.glass-panel,
.detail-main,
.detail-side {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.category-card {
  min-height: 140px;
  padding: 22px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
}

.category-card strong {
  font-size: 21px;
  font-weight: 900;
}

.category-card span,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.65;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e2e8f0;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.score-pill,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.score-pill {
  right: 12px;
  background: rgba(2, 132, 199, 0.92);
}

.rank-badge {
  left: 12px;
  background: rgba(15, 23, 42, 0.82);
}

.play-float {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
  color: #0f172a;
}

.card-body h3 a:hover {
  color: var(--sky);
}

.card-meta,
.card-line {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body .tag-row {
  margin-top: 12px;
}

.card-body .tag-row span {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.side-panel,
.glass-panel,
.detail-side,
.detail-main {
  border-radius: 24px;
  padding: 22px;
}

.side-panel {
  position: sticky;
  top: 96px;
}

.mini-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.mini-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  background: #eef6ff;
  transform: translateX(3px);
}

.mini-card img {
  width: 70px;
  height: 88px;
  border-radius: 12px;
}

.mini-card strong {
  display: block;
  color: #0f172a;
  font-weight: 900;
  line-height: 1.35;
}

.mini-card em {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.mini-rank {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 8px;
  color: white;
  background: var(--sky);
  font-size: 12px;
  font-weight: 900;
}

.panel-link {
  width: 100%;
  margin-top: 18px;
}

.page-hero,
.detail-hero {
  position: relative;
  color: white;
  overflow: hidden;
  background: linear-gradient(135deg, #020617, #075985);
}

.small-hero {
  padding: 82px 0;
}

.category-hero {
  padding: 72px 0;
}

.page-hero-grid,
.detail-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 42px;
  align-items: center;
}

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

.category-overview-card {
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  height: 132px;
  overflow: hidden;
  border-radius: 18px;
  background: #e2e8f0;
}

.category-overview-card h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  margin-bottom: 24px;
  border-radius: 22px;
  background: white;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.search-page-bar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-buttons button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-weight: 800;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
  color: white;
  background: var(--sky);
  border-color: var(--sky);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 58px minmax(160px, 1fr) minmax(240px, 1.4fr) 60px;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 18px;
  background: white;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.rank-row:hover {
  background: #f8fbff;
}

.rank-row img {
  width: 58px;
  height: 76px;
  border-radius: 12px;
}

.rank-no {
  color: var(--sky);
  font-weight: 950;
  font-size: 22px;
}

.rank-row strong {
  font-weight: 900;
}

.rank-row em {
  color: #64748b;
  font-style: normal;
}

.rank-row b {
  color: #0369a1;
  font-size: 18px;
}

.detail-hero {
  min-height: 520px;
  padding: 64px 0;
}

.detail-hero-grid {
  grid-template-columns: 280px minmax(0, 1fr);
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 3 / 4.1;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #7dd3fc;
}

.detail-intro h1 {
  max-width: 850px;
}

.detail-meta span,
.detail-tags span,
.genre-links a {
  color: white;
  background: rgba(255, 255, 255, 0.16);
}

.player-wrap {
  margin-top: -70px;
  position: relative;
  z-index: 4;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.38));
  pointer-events: auto;
}

.video-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(2, 132, 199, 0.94);
  box-shadow: 0 22px 48px rgba(2, 132, 199, 0.42);
  font-size: 30px;
}

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

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

.detail-section + .detail-section {
  margin-top: 34px;
}

.detail-section p {
  margin-top: 16px;
  color: #334155;
  line-height: 1.95;
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 96px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 1fr 1fr;
  gap: 46px;
  padding: 58px 0;
}

.footer-brand {
  color: white;
}

.site-footer p {
  margin-top: 16px;
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h3 {
  color: white;
  font-weight: 900;
  margin-bottom: 14px;
}

.site-footer li + li {
  margin-top: 10px;
}

.site-footer a:hover {
  color: #38bdf8;
}

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

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

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

  .hero-content,
  .page-hero-grid,
  .two-col-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

  .side-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-content {
    padding-top: 54px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-intro h1 {
    font-size: 36px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-controls {
    width: calc(100% - 24px);
  }

  .search-panel div,
  .filter-bar,
  .search-page-bar,
  .footer-grid,
  .category-overview-card,
  .detail-hero-grid {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

  .rank-row {
    grid-template-columns: 42px 52px minmax(0, 1fr) 44px;
  }

  .rank-row em {
    display: none;
  }
}

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

  .category-cover-row {
    height: 170px;
  }

  .hero-dot {
    width: 60px;
    height: 44px;
  }

  .detail-layout {
    padding-top: 36px;
  }
}
