
:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --muted: #94a3b8;
  --text: #f8fafc;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --slate: #0f172a;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 8%, rgba(245, 158, 11, 0.14), transparent 30%),
    radial-gradient(circle at 85% 4%, rgba(239, 68, 68, 0.12), transparent 26%),
    linear-gradient(135deg, #020617 0%, #0f172a 46%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.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), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
  transition: transform .25s ease, box-shadow .25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.5);
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  color: white;
  background: rgba(15, 23, 42, .72);
  border-radius: 12px;
  padding: 9px 12px;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
}

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

.nav-link {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  transition: color .22s ease, background .22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.76);
}

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  min-width: 260px;
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.nav-search input {
  width: 100%;
  min-width: 0;
  color: white;
  border: 0;
  outline: none;
  padding: 11px 14px;
  background: transparent;
}

.nav-search button {
  border: 0;
  color: white;
  cursor: pointer;
  padding: 11px 18px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 800;
}

.nav-cats {
  display: none;
}

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

.hero-stage {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.5);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  min-height: 620px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity .6s ease, transform 1.4s ease;
  background-size: cover;
  background-position: center right;
}

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

.hero-content {
  width: min(760px, calc(100% - 48px));
  margin-left: clamp(24px, 6vw, 80px);
  padding: 64px 0;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(2.3rem, 5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content h2 {
  margin: 18px 0 0;
  font-size: clamp(1.8rem, 3.4vw, 3.6rem);
  line-height: 1.05;
  color: #fff7ed;
}

.hero-desc {
  margin: 20px 0 0;
  max-width: 760px;
  color: #dbeafe;
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.9;
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.26);
  font-size: .85rem;
  font-weight: 700;
}

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

.btn-primary,
.btn-ghost,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 20px;
  font-weight: 900;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.36);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-more:hover {
  transform: translateY(-2px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  color: white;
  background: rgba(15, 23, 42, .7);
  cursor: pointer;
  font-size: 2rem;
  transform: translateY(-50%);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: clamp(24px, 6vw, 80px);
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  width: 34px;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
}

.hero-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.54);
}

.hero-quick span {
  color: var(--muted);
  font-weight: 800;
}

.hero-quick a {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.62);
  color: #e2e8f0;
  font-weight: 800;
}

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

.content-section {
  margin-bottom: 70px;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-title {
  width: min(1320px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.66));
  box-shadow: var(--shadow);
}

.page-title p,
.detail-title p {
  max-width: 880px;
  color: var(--soft);
  line-height: 1.9;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.92));
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 20px 60px rgba(245, 158, 11, .12);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 24%, rgba(245, 158, 11, 0.34), transparent 32%),
    linear-gradient(135deg, #111827, #334155);
}

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

.poster-link img.image-missing {
  opacity: 0;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.88));
}

.badge-top,
.badge-score,
.play-dot {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.badge-top {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: #111827;
  background: #fbbf24;
  font-size: .78rem;
}

.badge-score {
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  color: #fff7ed;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255,255,255,.16);
}

.play-dot {
  left: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 30px rgba(249, 115, 22, .36);
}

.card-body {
  padding: 18px;
}

.card-title {
  display: block;
  color: white;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 9px;
}

.card-title:hover {
  color: #fbbf24;
}

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

.card-tags {
  margin-bottom: 14px;
  gap: 6px;
}

.card-tags span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: .76rem;
}

.card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: #94a3b8;
  font-size: .88rem;
}

.card-meta a {
  color: #fde68a;
  font-weight: 800;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 42% 1fr;
}

.horizontal-card .poster-link {
  height: 100%;
  aspect-ratio: auto;
}

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

.category-tile {
  min-height: 160px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, .22), transparent 42%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.88));
  transition: transform .22s ease, border-color .22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, .44);
}

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

.category-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.ranking-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
}

.rank-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 62px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  transition: background .2s ease;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: rgba(51, 65, 85, .58);
}

.rank-num {
  color: #fbbf24;
  font-size: 1.25rem;
  font-weight: 950;
}

.rank-title {
  color: white;
  font-weight: 900;
}

.rank-meta {
  color: var(--muted);
  font-size: .92rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, .68);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  color: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, .55);
  outline: none;
  padding: 12px 14px;
}

.detail-hero {
  width: min(1320px, calc(100% - 32px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 28px;
  align-items: stretch;
}

.player-card,
.detail-title,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, .82);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, .16), rgba(2, 6, 23, .82));
  display: grid;
  place-items: center;
}

.player-shell.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
}

.player-cover span {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  font-size: 2.3rem;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 60px rgba(249, 115, 22, .42);
}

.player-caption {
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--soft);
}

.detail-title {
  padding: 34px;
}

.breadcrumb {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb a {
  color: #fbbf24;
}

.detail-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.detail-info span {
  border-radius: 14px;
  padding: 12px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, .7);
}

.detail-layout {
  width: min(1320px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.detail-panel {
  padding: 30px;
}

.detail-panel h2 {
  margin: 0 0 16px;
  font-size: 1.75rem;
}

.detail-panel p {
  color: #d1d5db;
  line-height: 2;
}

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

.side-link {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  background: rgba(15, 23, 42, .72);
}

.side-link img {
  width: 86px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #111827, #334155);
}

.side-link img.image-missing {
  opacity: 0;
}

.side-link strong {
  display: block;
  margin-bottom: 4px;
}

.side-link span {
  color: var(--muted);
  font-size: .86rem;
}

.index-links {
  columns: 4 220px;
  column-gap: 24px;
}

.index-links a {
  display: block;
  break-inside: avoid;
  padding: 10px 0;
  color: #dbeafe;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.no-result {
  display: none;
  margin: 24px 0;
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, .26);
  border-radius: 18px;
  padding: 18px;
  background: rgba(245, 158, 11, .1);
}

.no-result.show {
  display: block;
}

.site-footer {
  margin-top: 60px;
  padding: 54px 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(15, 23, 42, .95), rgba(2, 6, 23, .94));
}

.footer-inner {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 36px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 950;
  color: #fbbf24;
}

.footer-inner p {
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-links a {
  padding: 9px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, .44);
}

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

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

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
    min-height: 68px;
    padding: 12px 0;
  }

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

  .nav-panel {
    display: none;
    width: 100%;
    padding: 14px 0;
    border-top: 1px solid var(--line);
  }

  .nav-panel.open {
    display: grid;
    gap: 14px;
  }

  .nav-links,
  .nav-cats {
    display: grid;
    gap: 8px;
  }

  .nav-link,
  .nav-cats a {
    display: block;
    padding: 12px;
    border-radius: 12px;
    background: rgba(51, 65, 85, .42);
  }

  .nav-search {
    min-width: 0;
    width: 100%;
  }

  .hero-stage,
  .hero-slide {
    min-height: 560px;
  }

  .hero-content {
    width: calc(100% - 34px);
    margin-left: 17px;
  }

  .hero-arrow {
    display: none;
  }

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

  .section-head,
  .footer-inner {
    display: block;
  }

  .section-more {
    margin-top: 16px;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 20px;
  }

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

  .rank-meta {
    grid-column: 2;
  }

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

@media (max-width: 560px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-card {
    grid-template-columns: 1fr;
  }

  .page-title,
  .detail-title,
  .detail-panel {
    padding: 24px;
  }

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

  .player-cover span {
    width: 70px;
    height: 70px;
  }
}
