* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #22d3ee;
  --dark: #0f172a;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
  transition: transform 0.24s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  color: #111827;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

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

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 700;
  transition: all 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
  cursor: pointer;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: var(--blue);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 13px 16px;
  border-radius: 14px;
  background: #fff;
}

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  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-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.04);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(34, 211, 238, 0.25), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.74) 50%, rgba(15, 23, 42, 0.38)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.92));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 620px;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 46px;
  padding: 78px 0;
}

.hero-copy {
  max-width: 720px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 16px;
  color: #bfdbfe;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 650px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-tags {
  margin: 24px 0 0;
}

.hero-tags span,
.tag-row span,
.meta-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

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

.btn.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.btn.light {
  color: var(--blue-dark);
  background: #eff6ff;
}

.hero-poster {
  display: block;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  transform: rotate(2deg);
  transition: transform 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.02);
}

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

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

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

.hero-dot.active {
  width: 30px;
  background: #fff;
}

.section {
  padding: 70px 0;
}

.section.tight {
  padding: 48px 0;
}

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

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

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

.quick-panel {
  position: relative;
  z-index: 5;
  margin-top: -42px;
}

.quick-panel .inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 180px));
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  padding: 0 13px;
  color: #0f172a;
  background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.13);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.category-pills a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #1e40af;
  background: #eff6ff;
  font-weight: 900;
  transition: all 0.2s ease;
}

.category-pills a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  transform: translateY(-2px);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #bfdbfe;
  box-shadow: 0 24px 50px rgba(37, 99, 235, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.poster-type {
  right: 10px;
  bottom: 10px;
  min-height: 28px;
  padding: 4px 9px;
  background: rgba(37, 99, 235, 0.88);
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.24);
}

.card-body {
  padding: 14px;
}

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

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

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

.one-line {
  display: -webkit-box;
  min-height: 42px;
  margin-top: 9px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.movie-card.featured {
  grid-column: span 2;
}

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

.movie-card.featured .card-body h2 {
  font-size: 20px;
}

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

.category-tile {
  display: grid;
  min-height: 210px;
  padding: 22px;
  align-content: space-between;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.18), transparent 30%),
    linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(37, 99, 235, 0.16);
}

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

.category-tile p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.category-tile span {
  color: var(--blue);
  font-weight: 900;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 62px 120px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

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

.rank-row img {
  width: 120px;
  height: 78px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-row h2,
.rank-row h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

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

.sidebar-card {
  position: sticky;
  top: 92px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.sidebar-card h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

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

.compact-card {
  position: relative;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.compact-card img {
  width: 78px;
  height: 78px;
  border-radius: 15px;
  object-fit: cover;
}

.compact-card strong {
  display: block;
  padding-right: 42px;
  font-size: 14px;
  line-height: 1.35;
}

.compact-card em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.compact-card span {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--blue);
  font-weight: 900;
  font-size: 12px;
}

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

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

.detail-hero {
  padding: 34px 0 62px;
  background:
    radial-gradient(circle at 82% 8%, rgba(34, 211, 238, 0.18), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e293b 55%, #0f172a);
  color: #fff;
}

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

.player-card,
.detail-side,
.content-card {
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.player-card {
  overflow: hidden;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.42));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.08);
}

.play-button span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 26px solid #fff;
}

.player-info {
  padding: 24px;
}

.player-info h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.player-info p {
  margin: 0;
  color: #dbeafe;
  font-size: 17px;
}

.detail-side {
  overflow: hidden;
}

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

.detail-side .side-body {
  padding: 18px;
}

.detail-side p {
  margin: 0 0 10px;
  color: #dbeafe;
}

.detail-body {
  padding: 62px 0;
}

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

.content-card {
  padding: 28px;
  background: #fff;
  color: var(--text);
  border-color: var(--line);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.content-card + .content-card {
  margin-top: 20px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #334155;
}

.content-card p + p {
  margin-top: 14px;
}

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

.site-footer {
  padding: 46px 0 24px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b 56%, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
}

.footer-brand .brand-text strong {
  color: #fff;
}

.site-footer p {
  max-width: 560px;
  color: #94a3b8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
}

[data-card][hidden] {
  display: none;
}

.empty-note {
  display: none;
  padding: 28px;
  border-radius: 22px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

.empty-note.visible {
  display: block;
}

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

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

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

  .hero-poster,
  .detail-side,
  .sidebar-card {
    max-width: 380px;
    position: static;
  }
}

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

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

  .brand-text strong {
    font-size: 18px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 46px 0 72px;
  }

  .hero-poster {
    display: none;
  }

  .quick-panel .inner,
  .filter-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .movie-card.featured {
    grid-column: span 2;
  }

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

  .rank-row {
    grid-template-columns: 48px 88px 1fr;
  }

  .rank-row img {
    width: 88px;
    height: 68px;
  }

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

  .footer-bottom {
    align-items: start;
    flex-direction: column;
  }
}

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

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

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

  .movie-grid,
  .movie-grid.large,
  .related-grid {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

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

  .one-line {
    display: none;
  }

  .player-info {
    padding: 18px;
  }

  .content-card {
    padding: 20px;
  }
}
