:root {
  color-scheme: dark;
  --bg-deep: #020617;
  --bg-main: #0f172a;
  --bg-soft: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --blue: #2563eb;
  --blue-light: #38bdf8;
  --cyan: #22d3ee;
  --yellow: #facc15;
  --red: #ef4444;
  --card: rgba(15, 23, 42, 0.76);
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(16px);
}

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.42);
}

.logo-text {
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.drop-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: 0.2s ease;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.nav-link:hover,
.drop-button:hover,
.nav-link.active {
  background: rgba(37, 99, 235, 0.95);
  color: #fff;
}

.nav-drop {
  position: relative;
}

.drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-drop:hover .drop-menu,
.nav-drop:focus-within .drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.drop-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
}

.drop-menu a:hover {
  background: rgba(51, 65, 85, 0.88);
  color: #fff;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.72);
  color: #fff;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 11px 14px;
  margin-top: 6px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.35);
}

.hero {
  position: relative;
  height: min(720px, 72vh);
  min-height: 520px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.4s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(37, 99, 235, 0.26), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.20) 42%, rgba(2, 6, 23, 0.10) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 72px;
}

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yellow);
  font-weight: 800;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
  font-weight: 900;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
}

.hero p {
  margin: 0 0 22px;
  max-width: 620px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.meta-row,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.88);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.pill.soft {
  background: rgba(148, 163, 184, 0.16);
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 13px;
  color: #fff;
  font-weight: 800;
  background: var(--blue);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 42px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.38);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.58);
  box-shadow: none;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  right: max(22px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.66);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--blue);
}

main {
  overflow: hidden;
}

.section {
  padding: 56px 0;
}

.section.tight {
  padding-top: 34px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
  font-weight: 900;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--dim);
  max-width: 720px;
}

.more-link {
  color: #60a5fa;
  white-space: nowrap;
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 14px 44px rgba(2, 6, 23, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.62);
  box-shadow: 0 22px 68px rgba(2, 6, 23, 0.45);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  overflow: hidden;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s ease, filter 0.42s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
  filter: saturate(1.15);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.badge.right {
  left: auto;
  right: 10px;
  background: rgba(250, 204, 21, 0.92);
  color: #172554;
}

.card-body {
  padding: 14px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.36;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-text {
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: #cbd5e1;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 168px;
  padding: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.92));
  border: 1px solid var(--line);
  box-shadow: 0 14px 44px rgba(2, 6, 23, 0.26);
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.62);
}

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

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

.count-pill {
  display: inline-flex;
  margin-top: 18px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
  border: 1px solid rgba(37, 99, 235, 0.30);
  font-size: 13px;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 76px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  transition: 0.2s ease;
}

.rank-item:hover {
  background: rgba(30, 41, 59, 0.82);
  border-color: rgba(96, 165, 250, 0.52);
}

.rank-no {
  font-size: 24px;
  font-weight: 950;
  color: #60a5fa;
  text-align: center;
}

.rank-poster {
  width: 76px;
  height: 104px;
  object-fit: cover;
  border-radius: 13px;
}

.rank-title {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 850;
}

.rank-desc {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
}

.page-hero {
  padding: 64px 0 36px;
  background:
    radial-gradient(circle at 76% 10%, rgba(37, 99, 235, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #93c5fd;
  font-size: 14px;
}

.page-title {
  margin: 0;
  max-width: 980px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  font-weight: 950;
}

.page-copy {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  padding: 18px;
  margin-bottom: 26px;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.62);
  color: #fff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(96, 165, 250, 0.76);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  border: 1px solid rgba(96, 165, 250, 0.24);
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.30));
}

.player-shell.playing .player-poster {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.96);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 20px 56px rgba(37, 99, 235, 0.42);
}

.content-card {
  padding: 24px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  box-shadow: 0 14px 42px rgba(2, 6, 23, 0.28);
}

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

.content-card h2,
.content-card h3 {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.24;
}

.content-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.side-poster {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  box-shadow: 0 14px 42px rgba(2, 6, 23, 0.28);
}

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

.side-body {
  padding: 18px;
}

.side-body dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px 12px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.side-body dt {
  color: #e2e8f0;
  font-weight: 800;
}

.side-body dd {
  margin: 0;
}

.footer {
  margin-top: 64px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(2, 6, 23, 0.98));
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  color: var(--dim);
}

.footer h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 16px;
}

.footer p,
.footer ul {
  margin: 0;
  padding: 0;
}

.footer li {
  list-style: none;
  margin-top: 8px;
}

.footer a:hover {
  color: #60a5fa;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

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

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

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

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

  .side-poster {
    max-width: 420px;
  }
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero {
    height: 620px;
    min-height: 620px;
  }

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

  .hero-dots {
    left: 16px;
    right: auto;
  }

  .section-head {
    display: block;
  }

  .more-link {
    display: inline-flex;
    margin-top: 10px;
  }

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

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

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

  .rank-item {
    grid-template-columns: 42px 62px 1fr;
  }

  .rank-item .btn {
    grid-column: 2 / 4;
    width: 100%;
  }

  .rank-poster {
    width: 62px;
    height: 88px;
  }

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

@media (max-width: 430px) {
  .nav-inner,
  .container,
  .mobile-menu,
  .footer-inner,
  .copyright {
    width: min(100% - 24px, 1180px);
  }

  .logo {
    font-size: 18px;
  }

  .card-body {
    padding: 11px;
  }
}
