:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f0f9ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0284c7;
  --brand-dark: #0369a1;
  --brand-soft: #e0f2fe;
  --accent: #f97316;
  --danger: #ef4444;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  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;
  background: linear-gradient(135deg, #0f172a, #0284c7);
}

button,
input {
  font: inherit;
}

.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.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #22d3ee);
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.28);
}

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

.nav-link,
.mobile-link {
  padding: 10px 16px;
  color: #334155;
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  color: #0f172a;
  background: var(--brand-soft);
  border-radius: 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

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

.hero-track,
.hero-slide,
.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(14, 165, 233, 0.42), transparent 28%),
    radial-gradient(circle at 80% 25%, rgba(249, 115, 22, 0.25), transparent 25%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.25), #020617 92%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
  padding: 84px 0 160px;
  display: grid;
  grid-template-columns: 1.08fr 0.58fr;
  align-items: center;
  gap: 52px;
  color: #fff;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 14px 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(226, 232, 240, 0.92);
  font-size: 18px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #06b6d4);
  box-shadow: 0 16px 32px rgba(2, 132, 199, 0.32);
}

.secondary-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4.15;
  max-width: 360px;
  justify-self: end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.25));
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 114px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}

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

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

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

.hero-search-panel {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 6;
  width: min(1180px, calc(100% - 32px));
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

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

.hero-search input,
.movie-filter-input {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
}

.hero-search input:focus,
.movie-filter-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.hero-search button {
  min-width: 128px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #06b6d4);
  border-radius: 16px;
  cursor: pointer;
  font-weight: 900;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.category-pills a {
  padding: 8px 14px;
  color: #075985;
  background: #e0f2fe;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
}

.content-section {
  padding: 72px 0;
}

.soft-bg {
  background: linear-gradient(135deg, #f0f9ff, #ecfeff);
}

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

.section-heading h2,
.rank-title h2,
.side-card h2,
.text-card h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
}

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

.section-more {
  color: var(--brand-dark);
  font-weight: 900;
}

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

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

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

.horizontal-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 300px;
  gap: 22px;
  overflow-x: auto;
  padding: 2px 2px 18px;
  scroll-snap-type: x mandatory;
}

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  scroll-snap-align: start;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.movie-card.compact .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--danger));
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

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

.card-meta,
.card-line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-line {
  min-height: 46px;
  margin-top: 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 9px;
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.rank-panel,
.side-card,
.text-card,
.player-card,
.about-card,
.filter-panel,
.category-card {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.rank-list,
.side-list {
  display: grid;
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border-radius: 16px;
}

.rank-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--danger));
  border-radius: 999px;
  font-weight: 900;
}

.rank-item img {
  width: 76px;
  height: 56px;
  border-radius: 12px;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  font-size: 15px;
  line-height: 1.35;
}

.rank-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.about-section {
  padding: 36px 0 78px;
}

.about-card {
  padding: 36px;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
}

.about-card h2 {
  margin: 0 0 12px;
  font-size: 32px;
}

.about-card p {
  color: var(--muted);
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.about-links a {
  padding: 10px 15px;
  color: #075985;
  background: #e0f2fe;
  border-radius: 999px;
  font-weight: 900;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  padding: 78px 0;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.35), transparent 28%),
    linear-gradient(135deg, #020617, #075985 65%, #0e7490);
}

.page-hero h1 {
  max-width: 800px;
  margin: 18px 0 14px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #64748b;
  font-weight: 700;
}

.breadcrumb.dark {
  color: rgba(226, 232, 240, 0.85);
}

.breadcrumb a:hover {
  color: #38bdf8;
}

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

.category-card {
  padding: 24px;
}

.category-card-main span {
  display: block;
  margin-bottom: 10px;
  color: var(--brand-dark);
  font-size: 24px;
  font-weight: 900;
}

.category-card-main strong {
  display: block;
  color: var(--muted);
  font-weight: 600;
}

.category-sample {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-sample a {
  padding: 7px 11px;
  color: #075985;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
}

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

.filter-button {
  padding: 9px 14px;
  color: #075985;
  background: #e0f2fe;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.filter-button.active,
.filter-button:hover {
  color: #fff;
  background: var(--brand);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), #020617 96%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 46px 0 72px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 5.5vw, 70px);
  line-height: 1.06;
}

.detail-one-line {
  max-width: 840px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: 18px;
}

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

.detail-meta-grid span {
  padding: 14px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
}

.detail-meta-grid strong {
  display: block;
  color: #7dd3fc;
  font-size: 12px;
}

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

.detail-primary {
  display: grid;
  gap: 24px;
}

.player-card {
  overflow: hidden;
  background: #020617;
}

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

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
  outline: none;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.22), rgba(2, 6, 23, 0.35));
  cursor: pointer;
  z-index: 4;
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #06b6d4);
  border-radius: 999px;
  box-shadow: 0 24px 50px rgba(14, 165, 233, 0.35);
  font-size: 32px;
}

.text-card {
  padding: 28px;
}

.text-card p {
  margin: 14px 0 0;
  color: #334155;
  font-size: 17px;
}

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

.side-card {
  padding: 22px;
}

.side-card .movie-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  border-radius: 18px;
}

.side-card .poster-link {
  aspect-ratio: auto;
  height: 100%;
  min-height: 128px;
}

.side-card .card-body {
  padding: 14px;
}

.side-card .tag-row,
.side-card .card-line {
  display: none;
}

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

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

.footer-logo {
  color: #fff;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: flex-start;
  justify-content: flex-end;
}

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

.is-filtered-out {
  display: none !important;
}

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

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

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

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

  .hero-poster {
    display: none;
  }

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

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

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

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

  .hero {
    min-height: 760px;
  }

  .hero-content {
    min-height: 600px;
    padding-top: 56px;
  }

  .hero-search-panel {
    bottom: 18px;
  }

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

  .hero-search button {
    min-height: 48px;
  }

  .hero-controls {
    bottom: 178px;
  }

  .movie-grid,
  .movie-grid.two-col,
  .dense-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .horizontal-list {
    grid-auto-columns: 250px;
  }

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

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

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

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

  .side-card .movie-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}

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

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

  .content-section {
    padding: 48px 0;
  }
}
