:root {
  color-scheme: dark;
  --bg: #070b14;
  --panel: #101827;
  --panel-soft: #142033;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --red: #ef4444;
  --orange: #f97316;
  --gold: #facc15;
  --blue: #38bdf8;
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(239, 68, 68, 0.22), transparent 30rem),
    radial-gradient(circle at 88% 18%, rgba(249, 115, 22, 0.16), transparent 28rem),
    linear-gradient(180deg, #080d18 0%, #0f172a 48%, #050816 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.navbar {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.35);
}

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

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(239, 68, 68, 0.16);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.7s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 10, 20, 0.98) 0%, rgba(10, 15, 27, 0.82) 48%, rgba(10, 15, 27, 0.48) 100%),
    linear-gradient(0deg, #0f172a 0%, transparent 35%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1.1fr 0.64fr;
  gap: 48px;
  align-items: center;
  padding: 70px 0;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.35);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  max-width: 780px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.hero-desc {
  max-width: 760px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 40px rgba(239, 68, 68, 0.35);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(360px, 100%);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 52px;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.quick-search {
  position: relative;
  z-index: 5;
  margin-top: -34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  font-size: 16px;
}

.search-input:focus {
  border-color: rgba(239, 68, 68, 0.65);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.section {
  padding: 58px 0;
}

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

.section-title {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.poster-link {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 2.8;
  background: #111827;
}

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

.movie-card:hover img {
  transform: scale(1.06);
  opacity: 0.9;
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.9), transparent);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.32);
}

.card-body {
  padding: 17px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
  color: #cbd5e1;
  font-size: 12px;
}

.card-summary {
  color: #94a3b8;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 44px;
  line-height: 1.55;
  font-size: 14px;
}

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

.category-card {
  min-height: 162px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.22), transparent 7rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.42);
}

.category-card strong {
  font-size: 22px;
}

.category-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 88px 1fr;
  align-items: center;
  gap: 15px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.25s ease, background 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(30, 41, 59, 0.92);
}

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

.rank-item img {
  width: 88px;
  height: 116px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.page-hero {
  padding: 64px 0 38px;
}

.page-hero h1 {
  margin: 14px 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #fecaca;
}

.detail-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: start;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.detail-cover img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-lead {
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.85;
}

.content-card {
  margin-top: 26px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.7);
}

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

.content-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.95;
}

.player-card {
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.player {
  position: relative;
  min-height: 260px;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.28));
}

.player.started .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 24px 60px rgba(239, 68, 68, 0.45);
  cursor: pointer;
}

.play-button::before {
  content: "";
  display: block;
  margin-left: 5px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid #fff;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  padding: 7px 11px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.28);
  border: 1px solid rgba(239, 68, 68, 0.24);
  font-size: 13px;
  font-weight: 700;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.65), rgba(3, 7, 18, 0.96));
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  color: #cbd5e1;
}

.footer-inner h3 {
  margin: 0 0 12px;
  color: #fff;
}

.footer-inner p,
.footer-inner li {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-inner ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-inner a:hover {
  color: #fca5a5;
}

.pagination-note {
  color: var(--muted);
  margin-top: 18px;
  line-height: 1.7;
}

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

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

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

  .hero-poster {
    justify-self: start;
    width: 300px;
  }

  .detail-cover img {
    height: 460px;
  }
}

@media (max-width: 760px) {
  .navbar {
    height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 64px 12px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  }

  body.menu-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 13px 15px;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    padding: 48px 0 80px;
  }

  .hero-poster {
    width: 220px;
  }

  .hero-poster img {
    height: 310px;
  }

  .section-head {
    display: block;
  }

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

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

  .rank-item img {
    width: 76px;
    height: 102px;
  }

  .detail-layout {
    padding: 18px;
  }

  .detail-cover img {
    height: auto;
  }

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