:root {
  --bg: #07111f;
  --bg-2: #0b1629;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #111827;
  --panel-soft: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.10);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #f59e0b;
  --accent-2: #ea580c;
  --accent-3: #38bdf8;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.10), transparent 28%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.10), transparent 24%),
    linear-gradient(180deg, #050b16 0%, #07111f 38%, #091425 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

::selection {
  background: rgba(245, 158, 11, 0.28);
  color: #fff;
}

.site-shell {
  min-height: 100vh;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.62));
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 35%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 1.02rem;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 3px;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a,
.nav button.nav-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 15px;
  color: #dbe4f0;
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav a:hover,
.nav button.nav-btn:hover,
.nav a.is-active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.hero {
  padding: 28px 0 10px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(10, 17, 34, 0.92)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.15), transparent 28%);
  box-shadow: var(--shadow);
}

.hero-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 30%),
    radial-gradient(circle at 15% 18%, rgba(56, 189, 248, 0.18), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(245, 158, 11, 0.12), transparent 22%);
  pointer-events: none;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
  padding: 42px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

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

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.18);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 18px 0 0;
  color: #cbd5e1;
  max-width: 52ch;
  font-size: 1.05rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.stat {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: #dbe4f0;
}

.stat strong {
  color: #fff;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.chip,
.chip-soft,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 600;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: #e2e8f0;
}

.chip-soft {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #fde68a;
}

.tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: #d1d5db;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.2s ease;
  font-weight: 700;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.26);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: #eff6ff;
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.hero-poster-link {
  display: block;
  width: min(420px, 100%);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster {
  width: 100%;
  height: auto;
}

.hero-float {
  position: absolute;
  left: 22px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  font-size: 0.84rem;
  color: #f8fafc;
}

.hero-float-top {
  top: 18px;
}

.hero-float-bottom {
  right: 20px;
  left: auto;
  bottom: 18px;
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 42px 30px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.hero-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: 28px 0;
}

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

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.1;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: #f8d38a;
  font-weight: 700;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.panel-light {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

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

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

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

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.movie-card,
.category-card {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 14px 35px rgba(0,0,0,0.22);
  transition: 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.26);
  box-shadow: 0 18px 45px rgba(0,0,0,0.30);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.poster,
.category-poster,
.rank-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(0,0,0,0.55) 100%);
}

.poster-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255,255,255,0.10);
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 700;
}

.movie-card-body,
.category-card-body {
  padding: 14px 14px 16px;
}

.movie-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  color: #f8fafc;
}

.movie-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #9ca3af;
  font-size: 0.84rem;
}

.movie-one-line {
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.6;
}

.category-card {
  position: relative;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.55) 100%);
}

.category-card-body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
}

.category-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: end;
}

.category-name {
  font-size: 1.1rem;
  font-weight: 800;
}

.category-count {
  color: #f8d38a;
  font-size: 0.82rem;
  white-space: nowrap;
}

.category-top {
  margin-top: 6px;
  font-size: 0.88rem;
  color: #dbe4f0;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  transition: 0.2s ease;
}

.rank-num {
  font-size: 1.25rem;
  font-weight: 900;
  color: #f8d38a;
  text-align: center;
}

.rank-poster {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
}

.rank-body h3 {
  margin: 0;
  font-size: 1rem;
}

.rank-body p {
  margin: 6px 0 0;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.5;
}

.rank-meta {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  color: #9ca3af;
  font-size: 0.84rem;
}

.info-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
}

.soft-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,255,255,0.03);
  padding: 18px;
}

.foot {
  margin-top: 20px;
  padding: 28px 0 40px;
  color: #a8b3c2;
}

.footer-card {
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.88));
  border: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.footer-links a {
  color: #dbe4f0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #9ca3af;
  font-size: 0.92rem;
  margin: 18px 0;
}

.breadcrumb a {
  color: #f8d38a;
}

.page-title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
}

.page-subtitle {
  margin: 12px 0 0;
  color: #cbd5e1;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  padding: 22px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.detail-poster img {
  width: 100%;
  height: auto;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.detail-meta .chip {
  background: rgba(255,255,255,0.04);
}

.detail-block {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

.detail-block h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.detail-block p {
  margin: 0;
  color: #dbe4f0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  margin-top: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: #020617;
}

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

.player-overlay {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.player-btn {
  pointer-events: auto;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.88);
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.source-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: #e5e7eb;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.source-btn.is-active {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.28);
  color: #fde68a;
}

.sidebar-card {
  position: sticky;
  top: 100px;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

.sidebar-card h3 {
  margin: 0 0 14px;
}

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

.related-link {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid transparent;
}

.related-link:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--line);
}

.related-link img {
  border-radius: 14px;
}

.search-shell {
  padding: 20px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px 180px;
  gap: 12px;
}

.search-bar input,
.search-bar select,
.search-bar .search-btn {
  height: 48px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 0 14px;
}

.search-bar input::placeholder {
  color: #94a3b8;
}

.search-bar .search-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  font-weight: 800;
  cursor: pointer;
}

.search-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.result-head {
  margin-top: 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.result-count {
  color: #cbd5e1;
}

.hidden {
  display: none !important;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.pagination a,
.pagination span {
  border-radius: 14px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: #e5e7eb;
}

.pagination .active {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.28);
  color: #fde68a;
}

.muted {
  color: var(--muted);
}

.hr {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

@media (max-width: 1100px) {
  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 30px 22px 24px;
  }

  .hero-carousel {
    min-height: auto;
  }

  .hero-controls {
    padding: 0 22px 24px;
  }

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

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

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

  .sidebar-card {
    position: static;
  }

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

@media (max-width: 760px) {
  .container {
    width: min(var(--max), calc(100% - 22px));
  }

  .header-inner {
    min-height: 68px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    padding: 14px;
    background: rgba(2, 6, 23, 0.96);
    border-bottom: 1px solid var(--line);
  }

  .nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .nav a,
  .nav button.nav-btn {
    width: 100%;
    text-align: left;
  }

  .grid-3,
  .grid-4,
  .grid-5 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 18px;
  }

  .hero-title {
    font-size: 2.4rem;
  }

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

  .rank-item {
    grid-template-columns: 52px 74px 1fr;
  }
}
