:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c31;
  --panel-hover: #1e293b;
  --text: #ffffff;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --line: #1e293b;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --blue: #60a5fa;
  --shadow: 0 25px 50px rgba(0, 0, 0, 0.28);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.14), transparent 28rem),
    radial-gradient(circle at 85% 18%, rgba(37, 99, 235, 0.14), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.95);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
}

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

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

.logo-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  color: #111827;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.28);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted-strong);
  font-size: 14px;
}

.nav-link {
  position: relative;
  padding: 22px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.nav-link.is-active::after,
.nav-link:hover::after {
  position: absolute;
  right: 0;
  bottom: 15px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--amber-light);
  content: "";
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.55);
  color: var(--text);
}

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

.hero {
  position: relative;
  display: grid;
  min-height: 620px;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 32px max(16px, calc((100vw - 1180px) / 2)) 64px;
}

.hero-stage {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 32px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

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

.hero-slide img,
.detail-bg img,
.category-tile img,
.category-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.74) 38%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 45%);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: min(720px, 100%);
  padding: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.section-heading p,
.category-card-body p,
.detail-one-line {
  color: var(--muted-strong);
}

.hero-content p {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-meta span,
.detail-meta span,
.movie-meta span {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--muted-strong);
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
}

.movie-meta span {
  padding: 4px 8px;
  font-size: 12px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  color: #111827;
}

.btn-secondary {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
}

.hero-dots {
  position: absolute;
  right: 32px;
  bottom: 30px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.is-active {
  width: 28px;
  background: var(--amber-light);
}

.hero-search-card,
.rank-panel,
.content-card,
.filter-bar,
.category-card,
.mini-rank {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.hero-search-card {
  align-self: stretch;
  padding: 30px;
}

.hero-search-card h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.hero-search-card p {
  margin: 0 0 24px;
  color: var(--muted);
}

.hero-search {
  display: grid;
  gap: 12px;
}

.hero-search input,
.filter-input-wrap input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.56);
  color: var(--text);
  outline: none;
}

.hero-search input,
.filter-input-wrap input {
  padding: 13px 16px;
}

.hero-search button {
  border: 0;
  border-radius: 14px;
  background: var(--amber);
  color: #111827;
  font-weight: 800;
  padding: 13px 16px;
}

.section {
  padding: 56px 0;
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-heading-left {
  margin-left: 0;
  text-align: left;
}

.section-heading h2,
.rank-panel h2,
.content-card h2,
.mini-rank h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.category-tile {
  position: relative;
  display: grid;
  min-height: 170px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: var(--panel);
}

.category-tile::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 70%);
  content: "";
}

.category-tile span,
.category-tile em {
  position: absolute;
  z-index: 1;
  left: 18px;
}

.category-tile span {
  bottom: 38px;
  font-weight: 800;
}

.category-tile em {
  bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
  background: var(--panel-hover);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0b1120;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: grid;
  min-width: 38px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  color: #111827;
  font-weight: 900;
}

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

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.movie-tags span {
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber-light);
  font-size: 12px;
  padding: 4px 8px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card h3 a:hover,
.text-link:hover,
.info-list a:hover {
  color: var(--amber-light);
}

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

.movie-card-compact .poster-wrap {
  aspect-ratio: 16 / 10;
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.rank-panel-wide {
  position: static;
  margin: 30px 0 70px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: rgba(245, 158, 11, 0.12);
}

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

.rank-row img {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  background: #0b1120;
}

.rank-info {
  display: grid;
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.page-hero {
  padding: 58px 0 34px;
}

.page-hero h1 {
  margin-bottom: 14px;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  font-size: 18px;
}

.page-hero-with-cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: stretch;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
}

.filter-input-wrap {
  position: relative;
}

.filter-input-wrap span {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--muted);
  transform: translateY(-50%);
}

.filter-input-wrap input {
  padding-left: 40px;
}

.filter-bar select {
  min-height: 48px;
  padding: 0 12px;
}

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

.category-list-page {
  display: grid;
  gap: 20px;
  padding-bottom: 70px;
}

.category-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  overflow: hidden;
}

.category-card-image {
  min-height: 210px;
  background: #0b1120;
}

.category-card-body {
  padding: 26px;
}

.category-card-body h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.text-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--amber-light);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 580px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  filter: blur(2px);
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.65)),
    linear-gradient(0deg, var(--bg), transparent 48%);
  content: "";
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  min-height: 580px;
  padding: 46px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

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

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

.detail-info h1 {
  margin-bottom: 18px;
}

.detail-one-line {
  max-width: 800px;
  margin: 0 0 22px;
  font-size: 19px;
}

.detail-meta {
  margin-bottom: 18px;
}

.detail-tags {
  margin-bottom: 26px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 46px 0;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-section {
  scroll-margin-top: 92px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.76));
  color: var(--text);
  transition: opacity 0.2s ease;
}

.play-overlay.is-hidden {
  pointer-events: none;
  opacity: 0;
}

.play-overlay span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  color: #111827;
  font-size: 26px;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.26);
}

.player-message {
  position: absolute;
  right: 14px;
  bottom: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--muted-strong);
  font-size: 13px;
  padding: 6px 10px;
}

.content-card {
  padding: 24px;
}

.content-card p {
  margin: 0;
  color: var(--muted-strong);
  white-space: pre-line;
}

.small-card h2 {
  font-size: 24px;
}

.info-list {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

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

.info-list dd {
  margin: 0;
  color: var(--muted-strong);
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.82);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-grid p,
.footer-links a {
  color: var(--muted);
}

.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: #111827;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.back-to-top.is-visible {
  display: block;
}

@media (max-width: 1120px) {
  .hero,
  .split-layout,
  .page-hero-with-cover,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 68px;
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100vh - 68px);
    overflow: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 14px 0;
  }

  .nav-link.is-active::after,
  .nav-link:hover::after {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 18px;
  }

  .hero-stage {
    min-height: 540px;
  }

  .hero-content {
    padding: 30px;
  }

  .category-grid,
  .movie-grid,
  .rank-list-two,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

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

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

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

  .hero-content p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .category-grid,
  .movie-grid,
  .rank-list-two,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 500px;
    border-radius: 22px;
  }

  .hero-search-card,
  .content-card,
  .filter-bar {
    padding: 18px;
  }
}
