:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --orange: #f97316;
  --red: #ef4444;
  --pink: #ec4899;
  --green: #22c55e;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 30%),
    radial-gradient(circle at 90% 12%, rgba(236, 72, 153, 0.11), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.header-inner {
  width: min(1240px, calc(100% - 28px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.26);
}

.brand-text {
  font-size: 20px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.10);
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  flex: 0 1 300px;
}

.site-search-input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  border-radius: 999px;
  padding: 11px 16px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.site-search-input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.58);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

.site-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  display: none;
  max-height: 420px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.96);
  box-shadow: var(--shadow);
}

.site-search-results.open {
  display: block;
}

.search-result-item {
  display: flex;
  gap: 12px;
  padding: 9px;
  border-radius: 14px;
  color: var(--soft);
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: rgba(148, 163, 184, 0.10);
}

.search-result-item img {
  width: 48px;
  height: 66px;
  object-fit: cover;
  border-radius: 10px;
  background: #111827;
}

.search-result-item strong {
  display: block;
  color: var(--text);
  line-height: 1.35;
}

.search-result-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 1.2s ease;
}

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

.hero-content {
  width: min(760px, calc(100% - 48px));
  margin-left: max(24px, calc((100vw - 1180px) / 2));
  padding-top: 70px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p,
.detail-info .hero-summary {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: clamp(16px, 1.9vw, 21px);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.hero-tags span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(251, 191, 36, 0.20);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.10);
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.68);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

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

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.50);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 32px;
  background: var(--amber-light);
}

.hero-search-card {
  position: absolute;
  right: max(22px, calc((100vw - 1180px) / 2));
  bottom: 88px;
  z-index: 6;
  width: min(360px, calc(100% - 44px));
  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-search-card strong {
  display: block;
  margin-bottom: 12px;
}

.page-stack {
  display: grid;
  gap: 68px;
  padding: 64px 0;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stats-strip div,
.taxonomy-panel,
.content-card,
.category-overview-card,
.player-shell,
.next-prev-bar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
}

.stats-strip div {
  padding: 20px;
}

.stats-strip strong {
  display: block;
  color: var(--amber-light);
  font-size: 32px;
  line-height: 1;
}

.stats-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.section-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

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

.movie-grid {
  display: grid;
  gap: 18px;
}

.movie-grid.six-col {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.70);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.38);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
}

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

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

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

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  padding: 5px 10px;
  color: #111827;
  background: var(--amber-light);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--pink));
}

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

.movie-card h3 {
  margin: 0;
  min-height: 44px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.movie-card h3 a:hover {
  color: var(--amber-light);
}

.movie-meta,
.movie-tags {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.movie-tags {
  color: #fcd34d;
}

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

.category-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(236, 72, 153, 0.06)),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border 0.2s ease;
}

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

.category-name {
  display: block;
  font-size: 24px;
  font-weight: 900;
}

.category-count {
  display: inline-flex;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-size: 13px;
}

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

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

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

.rank-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.68);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.rank-num {
  color: var(--amber-light);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info {
  color: var(--muted);
  font-size: 13px;
}

.section-more {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.page-hero,
.detail-hero {
  position: relative;
  padding: 96px 0 70px;
  border-bottom: 1px solid var(--line);
  background-position: center;
  background-size: cover;
}

.small-hero {
  background:
    radial-gradient(circle at 16% 20%, rgba(245, 158, 11, 0.18), transparent 30%),
    linear-gradient(135deg, #020617, #111827 48%, #020617);
}

.page-hero h1 {
  max-width: 860px;
  font-size: clamp(34px, 5vw, 58px);
}

.hero-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-mini-list a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.64);
}

.taxonomy-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 26px;
}

.taxonomy-panel h2 {
  margin: 0 0 14px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.62);
}

.tag-cloud strong {
  color: var(--amber-light);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.category-overview-body h2 {
  margin: 0;
  font-size: 26px;
}

.category-overview-body p {
  color: var(--soft);
}

.text-link {
  min-height: auto;
  padding: 0;
  color: var(--amber-light);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px 140px 160px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.filter-panel select {
  border-radius: 14px;
  color: var(--soft);
}

.filter-count {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.detail-hero {
  padding: 90px 0;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 24px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber-light);
}

.detail-page-stack {
  padding-top: 52px;
}

.player-section .section-heading {
  margin-bottom: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.66));
}

.player-overlay.hidden {
  display: none;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: var(--amber-light);
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.30);
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  color: #fecaca;
  font-size: 14px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.content-card {
  padding: 24px;
}

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

.content-card p {
  margin: 0;
  color: var(--soft);
  font-size: 16px;
}

.info-card {
  grid-column: 1 / -1;
}

.info-card dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0;
}

.info-card div {
  padding: 14px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.32);
}

.info-card dt {
  color: var(--muted);
  font-size: 13px;
}

.info-card dd {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 800;
}

.next-prev-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.next-prev-bar a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(2, 6, 23, 0.32);
}

.next-prev-bar a:hover {
  color: var(--amber-light);
}

.sitemap-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.sitemap-block {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.sitemap-block h2 {
  margin: 0 0 14px;
}

.sitemap-block ul {
  display: grid;
  gap: 8px;
  max-height: 520px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.sitemap-block a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--soft);
}

.sitemap-block a:hover {
  color: var(--amber-light);
}

.sitemap-block span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-brand {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 620px;
  margin: 0;
}

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

.footer-links a:hover {
  color: var(--amber-light);
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  width: 44px;
  height: 44px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
}

.back-to-top.show {
  display: block;
}

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

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

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

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

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    order: 3;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav.open {
    display: flex;
  }

  .header-search {
    order: 4;
    flex: 1 1 100%;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin: 0 auto;
    padding-top: 56px;
  }

  .hero-search-card {
    left: 16px;
    right: 16px;
    bottom: 92px;
    width: auto;
  }

  .stats-strip,
  .taxonomy-panel,
  .category-overview-grid,
  .detail-content-grid,
  .sitemap-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    max-width: 280px;
  }

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

  .rank-list.compact,
  .movie-grid.four-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .movie-grid.six-col,
  .movie-grid.four-col,
  .category-grid,
  .rank-list.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

  .movie-card h3 {
    min-height: 40px;
    font-size: 14px;
  }

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

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

  .rank-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

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

  .footer-inner,
  .next-prev-bar {
    flex-direction: column;
  }
}
