:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-2: #ef4444;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(239, 68, 68, 0.22), transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(245, 158, 11, 0.17), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

body.menu-open {
  overflow: hidden;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.12), rgba(15, 23, 42, 0.6));
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316 55%, #ef4444);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.34);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 14px;
  transition: 0.22s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
}

.hero-section {
  position: relative;
  height: min(85vh, 820px);
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 48%, rgba(2, 6, 23, 0.62) 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: min(620px, calc(100% - 64px));
  transform: translateY(-46%);
  z-index: 2;
}

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

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

.hero-desc,
.page-hero p,
.detail-one-line,
.intro-strip p {
  margin: 20px 0 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.year-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(12px);
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  min-height: 30px;
  padding: 5px 11px;
  font-size: 13px;
}

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

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

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316 60%, #ef4444);
  box-shadow: 0 18px 44px rgba(249, 115, 22, 0.35);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(249, 115, 22, 0.46);
}

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

.ghost-btn:hover {
  background: rgba(148, 163, 184, 0.14);
}

.hero-poster {
  position: absolute;
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 74px;
  width: min(320px, 28vw);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  z-index: 2;
}

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

.hero-controls {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 42px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: 0.24s ease;
}

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

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

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 36px;
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.5));
  box-shadow: var(--shadow);
}

.intro-strip h2,
.section-heading h2,
.content-panel h2,
.side-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

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

.section-heading a {
  color: var(--accent);
  font-weight: 800;
}

.small-heading {
  margin-bottom: 18px;
}

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

.category-card,
.category-overview-card,
.top-rank-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  transition: 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover,
.top-rank-card:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.44);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
  transition: transform 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

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

.category-card span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
}

.category-card strong,
.category-card em,
.category-overview-body span,
.rank-info strong,
.rank-info em,
.top-rank-card strong,
.top-rank-card em {
  display: block;
}

.category-card strong {
  font-size: 22px;
}

.category-card em,
.rank-info em,
.top-rank-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.55));
  transition: 0.25s ease;
}

.movie-card.is-hidden,
.rank-item.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

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

.year-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  min-height: 28px;
  padding: 3px 10px;
  color: #111827;
  background: rgba(251, 191, 36, 0.92);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--accent);
}

.movie-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 48px;
  margin: 12px 0 0;
  overflow: hidden;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card .movie-desc {
  display: none;
}

.rank-panel,
.side-card,
.content-panel,
.player-box,
.tool-bar {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.28);
  transition: 0.22s ease;
}

.rank-item:hover {
  background: rgba(148, 163, 184, 0.1);
}

.rank-no {
  color: var(--accent);
  font-size: 20px;
  font-weight: 950;
}

.rank-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
}

.slim-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 48px auto 0;
  padding: 68px 48px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.25), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.45));
  box-shadow: var(--shadow);
}

.category-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.category-hero > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 24px;
}

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

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

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

.category-collage img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
}

.category-overview-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

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

.category-overview-body span {
  color: var(--accent);
  font-weight: 900;
}

.tool-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  padding: 16px;
  margin-bottom: 28px;
}

.search-box,
.filter-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-box input,
.filter-box select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  background: rgba(2, 6, 23, 0.55);
}

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

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

.top-rank-card {
  min-height: 0;
  padding: 18px;
}

.top-rank-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 14px;
}

.top-rank-no {
  display: inline-flex;
  margin-bottom: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

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

.detail-hero {
  min-height: 620px;
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
}

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

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

.big-tags {
  margin-bottom: 30px;
}

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

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

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

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text);
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.78));
  transition: opacity 0.25s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #ef4444);
  box-shadow: 0 18px 50px rgba(239, 68, 68, 0.42);
}

.content-panel {
  padding: 28px;
}

.content-panel p {
  margin: 16px 0 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.9;
}

.detail-side {
  position: sticky;
  top: 98px;
}

.side-card {
  padding: 24px;
}

.side-card dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

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

.side-card dd {
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.6;
}

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

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

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 82px;
    display: none;
    max-height: calc(100vh - 110px);
    padding: 14px;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  body.menu-open .site-nav {
    display: flex;
  }

  .hero-section {
    min-height: 720px;
  }

  .hero-content {
    top: 44%;
  }

  .hero-poster {
    right: 24px;
    bottom: 74px;
    width: 180px;
  }

  .intro-strip,
  .section-heading,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

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

  .detail-poster {
    display: none;
  }
}

@media (max-width: 540px) {
  .section-wrap,
  .header-inner,
  .footer-inner,
  .slim-hero,
  .category-hero,
  .detail-inner {
    width: min(100% - 22px, 1180px);
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero-controls {
    left: 18px;
  }

  .hero-poster {
    opacity: 0.34;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .compact-grid,
  .top-rank-grid,
  .full-rank-list {
    grid-template-columns: 1fr;
  }

  .slim-hero,
  .intro-strip,
  .content-panel {
    padding: 26px;
  }

  .rank-item {
    grid-template-columns: 38px 54px minmax(0, 1fr);
  }
}
