:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --blue: #2563eb;
  --blue-soft: #38bdf8;
  --cyan: #22d3ee;
  --yellow: #facc15;
  --red: #ef4444;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.25), transparent 34rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.nav-inner {
  max-width: 1280px;
  height: 66px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

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

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

.nav-links a,
.mobile-panel a {
  color: var(--muted-2);
  padding: 10px 16px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-panel a:hover {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  color: #ffffff;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #e2e8f0;
}

.mobile-panel {
  display: none;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-cats {
  display: grid;
  gap: 4px;
  padding-top: 8px;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 3s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.8) 42%, rgba(15, 23, 42, 0.35) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 44%, rgba(2, 6, 23, 0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 72vh;
  margin: 0 auto;
  padding: 12vh 24px 110px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

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

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.card-meta,
.page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted-2);
}

.hero-meta span,
.detail-meta span,
.page-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

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

.primary-btn,
.ghost-btn,
.player-start,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.player-start {
  color: #ffffff;
  border: 0;
  background: linear-gradient(135deg, var(--blue), #0284c7);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.32);
}

.ghost-btn,
.more-link {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.primary-btn:hover,
.ghost-btn:hover,
.player-start:hover,
.more-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.36);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.65);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-side-panel {
  position: absolute;
  z-index: 6;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 100px;
  width: min(330px, 32vw);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-side-panel > strong {
  display: block;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 18px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.horizontal-card:hover {
  background: rgba(30, 41, 59, 0.85);
  transform: translateX(2px);
}

.horizontal-card img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.horizontal-card strong,
.horizontal-card em {
  display: block;
}

.horizontal-card strong {
  color: #ffffff;
  line-height: 1.35;
}

.horizontal-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  margin-top: 4px;
}

.main-wrap,
.page-hero,
.detail-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
}

.page-hero {
  padding-top: 66px;
  padding-bottom: 32px;
}

.page-hero h1,
.section-title h2,
.detail-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 50px);
  letter-spacing: -0.03em;
}

.page-hero p,
.section-title p,
.detail-intro {
  max-width: 780px;
  color: var(--muted-2);
  font-size: 18px;
}

.section-block {
  margin: 0 0 64px;
}

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

.section-title p {
  margin: 8px 0 0;
}

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

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

.movie-card {
  min-width: 0;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #1e293b, #020617);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

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

.poster-wrap:hover img {
  transform: scale(1.08);
  filter: saturate(1.12) brightness(1.08);
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, transparent 52%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-wrap:hover .poster-glow {
  opacity: 1;
}

.play-chip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  background: var(--blue);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-wrap:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #020617;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #f97316);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.32);
}

.card-body {
  padding: 13px 2px 0;
}

.card-title {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  color: #ffffff;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: #60a5fa;
}

.card-meta {
  gap: 8px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgba(148, 163, 184, 0.58);
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  margin: 0;
  color: var(--muted-2);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-list span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.22);
  font-size: 12px;
}

.feature-panel,
.filter-panel,
.info-panel,
.player-shell,
.detail-content,
.category-tile,
.rank-strip {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.22), rgba(8, 145, 178, 0.12));
}

.feature-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 44px);
}

.feature-panel p {
  color: var(--muted-2);
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.8);
}

.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.18));
}

.tile-content {
  position: absolute;
  inset: auto 0 0;
  padding: 20px;
}

.tile-content strong,
.tile-content em {
  display: block;
}

.tile-content strong {
  font-size: 22px;
  margin-bottom: 8px;
}

.tile-content em {
  color: var(--muted-2);
  font-style: normal;
  font-size: 14px;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted-2);
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.82);
  padding: 0 14px;
  outline: none;
}

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

.filter-selects {
  display: flex;
  gap: 12px;
}

.empty-state {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--muted-2);
}

.rank-strip {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.22), rgba(30, 64, 175, 0.14));
}

.rank-strip a {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
}

.rank-strip b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #020617;
  background: linear-gradient(135deg, #fef3c7, #fb923c);
}

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

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

.detail-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
}

.breadcrumb {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #93c5fd;
}

.detail-main {
  min-width: 0;
}

.detail-title {
  margin-top: 8px;
  margin-bottom: 16px;
}

.detail-intro {
  margin: 18px 0 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  background: #000000;
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, rgba(37, 99, 235, 0.22), transparent 34%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.42));
}

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

.player-start {
  position: relative;
  z-index: 2;
  min-width: 150px;
  min-height: 54px;
  border-radius: 999px;
  cursor: pointer;
}

.detail-content {
  padding: 30px;
}

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

.detail-content p {
  margin: 0 0 22px;
  color: var(--muted-2);
  font-size: 17px;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

.info-panel {
  padding: 22px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  color: var(--muted-2);
}

.info-list dt {
  color: var(--muted);
}

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

.compact-card .card-body p {
  display: none;
}

.compact-card .tag-list {
  display: none;
}

.compact-card .card-title {
  min-height: 38px;
  font-size: 15px;
}

.site-footer {
  margin-top: 40px;
  color: var(--muted-2);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(2, 6, 23, 0.95));
  border-top: 1px solid var(--line);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 28px;
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 24px;
  text-align: center;
  color: var(--muted);
}

.hidden-by-filter {
  display: none !important;
}

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

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

  .hero-side-panel {
    display: none;
  }

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

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

  .mobile-toggle {
    display: block;
  }

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

  .feature-panel,
  .detail-wrap,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .filter-selects {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .nav-inner {
    padding: 0 16px;
  }

  .logo-text {
    font-size: 18px;
  }

  .main-wrap,
  .page-hero,
  .detail-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 78vh;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-actions {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    flex: 1 1 150px;
  }

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

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

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

  .feature-panel,
  .detail-content,
  .info-panel,
  .filter-panel {
    padding: 20px;
  }
}
