:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --green: #10b981;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --radius: 22px;
  --shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-logo {
  color: #ffffff;
  font-size: 22px;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.38);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 11px 16px;
  border-radius: 999px;
  color: #dbeafe;
  font-weight: 600;
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffffff;
  background: rgba(6, 182, 212, 0.2);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

.hero-slider {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(1.1) contrast(1.05);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 18%, rgba(6, 182, 212, 0.34), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.76) 43%, rgba(15, 23, 42, 0.24) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.12) 52%, rgba(2, 6, 23, 0.64) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 660px;
  display: grid;
  align-content: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 118px;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(103, 232, 249, 0.45);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(15, 23, 42, 0.5);
}

.hero-content h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

.hero-meta,
.hero-actions,
.hero-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-meta {
  margin-top: 24px;
}

.hero-meta span,
.tag-row span,
.detail-tags span,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: #cffafe;
  background: rgba(8, 145, 178, 0.28);
  border: 1px solid rgba(103, 232, 249, 0.26);
}

.hero-actions {
  margin-top: 32px;
}

.btn,
button.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: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-light {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
}

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

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

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 42px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-dot {
  width: 54px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dot.active {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.section {
  padding: 72px 0;
}

.section-sm {
  padding: 46px 0;
}

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

.section-head h1,
.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.04em;
}

.section-head h1,
.page-hero h1,
.detail-title h1 {
  font-size: clamp(34px, 5vw, 54px);
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-head p,
.page-hero p,
.detail-title p,
.category-tile p,
.card-body p,
.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.page-hero {
  padding: 84px 0 38px;
  background:
    radial-gradient(circle at 18% 12%, rgba(6, 182, 212, 0.18), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(37, 99, 235, 0.16), transparent 26%);
}

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

.search-band {
  position: relative;
  z-index: 5;
  margin-top: -54px;
}

.search-card,
.filter-panel,
.detail-main,
.panel,
.category-tile,
.movie-card,
.ranking-row {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
}

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

.search-card input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, 170px);
  gap: 12px;
  padding: 14px;
  margin-bottom: 28px;
  border-radius: var(--radius);
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 55px rgba(15, 23, 42, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(6, 182, 212, 0.16)),
    #e2e8f0;
}

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

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.34);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 11px;
  color: #0891b2;
  font-size: 13px;
  font-weight: 800;
}

.card-body h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--blue);
}

.card-body p {
  min-height: 62px;
  margin: 0 0 14px;
  font-size: 14px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.detail-tags span {
  color: #0369a1;
  background: #e0f2fe;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 128px;
  height: 128px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(6, 182, 212, 0.24));
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.18);
}

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

.tile-label {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 13px;
  font-weight: 800;
}

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

.compact-card,
.ranking-row {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
}

.compact-card {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(226, 232, 240, 0.78);
}

.compact-card img,
.ranking-row img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 13px;
  background: #e2e8f0;
}

.compact-card strong,
.ranking-row strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.compact-card em,
.ranking-row em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
}

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

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

.ranking-row {
  grid-template-columns: 54px 88px 1fr auto;
}

.ranking-row img {
  width: 88px;
  height: 116px;
}

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

.detail-hero {
  padding: 38px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0;
}

.breadcrumb a,
.breadcrumb span {
  color: #0369a1;
  background: #e0f2fe;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 370px;
  gap: 26px;
  align-items: start;
}

.detail-main,
.panel {
  border-radius: var(--radius);
  overflow: hidden;
}

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

.player-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(6, 182, 212, 0.24), transparent 22%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.72));
}

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

.play-icon {
  display: inline-grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 42px rgba(6, 182, 212, 0.34);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #ffffff;
}

.play-overlay strong {
  font-size: 20px;
}

.detail-info {
  padding: 26px;
}

.detail-title h1 {
  margin-bottom: 18px;
}

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

.detail-meta span {
  padding: 9px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 800;
}

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

.detail-text p {
  margin: 0 0 18px;
  color: #334155;
  line-height: 1.95;
  font-size: 16px;
}

.panel {
  padding: 20px;
}

.side-poster {
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 18px;
  background: #e2e8f0;
}

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

.site-footer {
  margin-top: 40px;
  color: #dbeafe;
  background: linear-gradient(135deg, #0f172a, #111827 58%, #164e63);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
  padding: 52px 0;
}

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

.footer-grid h2 {
  margin: 0 0 16px;
  color: #a5f3fc;
  font-size: 18px;
}

.footer-grid p {
  color: #cbd5e1;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.08);
}

.copyright {
  padding: 18px 0 26px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hide-card {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

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

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

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

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

  .rank-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
  }

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

  .nav-toggle {
    display: block;
  }

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

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

  .hero-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card-body {
    padding: 14px;
  }

  .card-body h2 {
    font-size: 17px;
  }

  .ranking-row {
    grid-template-columns: 42px 72px 1fr;
  }

  .ranking-row .btn {
    grid-column: 1 / -1;
  }
}

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

  .movie-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-dot {
    width: 36px;
  }
}
