:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --text-strong: #ffffff;
  --emerald: #34d399;
  --emerald-strong: #10b981;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34rem),
    radial-gradient(circle at 70% 5%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.42), transparent);
  backdrop-filter: blur(12px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), #22c55e);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.35);
}

.brand-text {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.96rem;
  font-weight: 700;
}

.nav-link {
  color: #e2e8f0;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  border: 0;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 1.2rem;
}

.hero {
  min-height: 94vh;
  position: relative;
  overflow: hidden;
  background: #020617;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.75s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  transform: scale(1.02);
}

.hero-slide.cover-fallback,
.poster-link.cover-fallback,
.category-tile.cover-fallback,
.category-cover.cover-fallback,
.detail-cover.cover-fallback {
  background:
    radial-gradient(circle at 20% 20%, rgba(52, 211, 153, 0.38), transparent 18rem),
    radial-gradient(circle at 80% 40%, rgba(59, 130, 246, 0.32), transparent 20rem),
    linear-gradient(135deg, #0f172a, #111827 48%, #022c22);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 94vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 88px;
}

.hero-kicker,
.eyebrow {
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 900;
}

.hero h1 {
  max-width: 760px;
  margin: 16px 0 18px;
  color: var(--text-strong);
  font-size: clamp(2.7rem, 7vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.6vw, 1.28rem);
  line-height: 1.9;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
  color: #d1fae5;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-actions,
.title-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

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

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

.btn.primary {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-strong));
  color: #02130d;
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.28);
}

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

.btn.link {
  color: var(--emerald);
}

.btn.full {
  width: 100%;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  background: var(--emerald);
}

.page-main,
.filter-panel,
.content-section,
.split-section,
.site-footer,
.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.page-main {
  padding-top: 112px;
  padding-bottom: 64px;
}

.page-title {
  margin-bottom: 34px;
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.20), transparent 26rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.compact-title {
  padding: 42px;
}

.page-title h1 {
  margin: 10px 0 14px;
  color: #ffffff;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-title p {
  max-width: 820px;
  color: #cbd5e1;
  line-height: 1.8;
}

.filter-panel {
  margin-top: 30px;
  margin-bottom: 36px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  color: #ffffff;
}

.filter-heading span {
  color: var(--muted);
  font-size: 0.9rem;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  outline: none;
}

.content-section {
  margin-top: 54px;
}

.no-margin {
  margin-top: 0;
}

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

.section-head h2,
.ranking-head h2,
.category-panel h2,
.text-card h2 {
  margin: 6px 0 0;
  color: #ffffff;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  letter-spacing: -0.04em;
}

.more-link {
  color: var(--emerald);
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.category-tile img,
.category-cover img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.category-tile span {
  bottom: 42px;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile em {
  bottom: 18px;
  color: var(--emerald);
  font-style: normal;
  font-size: 0.88rem;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
  margin-top: 56px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.20);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.play-mark {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rating,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.rating {
  right: 12px;
  background: rgba(245, 158, 11, 0.92);
  color: #ffffff;
}

.rank-badge {
  left: 12px;
  background: rgba(16, 185, 129, 0.92);
  color: #022c22;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--emerald);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.65;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.ranking-card {
  position: sticky;
  top: 98px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
}

.ranking-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.ranking-head > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(16, 185, 129, 0.16);
}

.ranking-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-card li + li {
  border-top: 1px solid var(--line);
}

.ranking-card a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 0;
}

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

.ranking-card strong {
  display: block;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-card em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.8rem;
}

.category-panels {
  display: grid;
  gap: 22px;
}

.category-panel {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.category-cover {
  min-height: 220px;
  background: #0f172a;
}

.category-panel-body {
  padding: 24px 24px 24px 0;
}

.category-panel p {
  color: #cbd5e1;
}

.category-panel ul {
  display: grid;
  gap: 10px;
  margin: 14px 0 20px;
  padding: 0;
  list-style: none;
}

.category-panel li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: #e2e8f0;
}

.category-panel li span {
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--muted);
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 24px;
  background:
    radial-gradient(circle at 80% 10%, rgba(16, 185, 129, 0.15), transparent 24rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  min-height: 420px;
  border-radius: 26px;
  background: #0f172a;
}

.detail-info {
  padding: 18px 10px 18px 0;
}

.detail-info h1 {
  margin: 12px 0 14px;
  color: #ffffff;
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-one-line {
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.9;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.detail-meta li {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(2, 6, 23, 0.42);
}

.detail-meta span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.detail-meta strong {
  color: #ffffff;
}

.player-section {
  margin-top: 32px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.20), rgba(2, 6, 23, 0.55));
  color: #ffffff;
  cursor: pointer;
}

.player-start.is-hidden {
  display: none;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--emerald-strong);
  box-shadow: 0 18px 48px rgba(16, 185, 129, 0.36);
  font-size: 2rem;
}

.player-note {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.text-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 26px;
  background: rgba(15, 23, 42, 0.76);
}

.text-card p {
  color: #cbd5e1;
  line-height: 2;
}

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

.site-footer {
  margin-top: 60px;
  padding: 42px 0 28px;
  border-top: 1px solid var(--line);
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 36px;
}

.footer-logo {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
}

.site-footer h3 {
  color: #ffffff;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: var(--emerald);
}

.footer-columns {
  columns: 2;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.back-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: #ffffff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.is-filtered-out {
  display: none;
}

@media (max-width: 1080px) {
  .nav-links {
    position: absolute;
    inset: 76px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.98);
  }

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

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

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

  .split-section,
  .detail-hero,
  .detail-text-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    position: static;
  }

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

@media (max-width: 760px) {
  .hero-content {
    justify-content: flex-end;
    padding-bottom: 94px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.32));
  }

  .hero h1 {
    font-size: clamp(2.35rem, 12vw, 4.2rem);
  }

  .page-title,
  .compact-title,
  .detail-hero {
    padding: 24px;
    border-radius: 24px;
  }

  .category-grid,
  .movie-grid,
  .small-grid,
  .filter-controls,
  .footer-grid,
  .category-panel,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .category-panel-body {
    padding: 0 20px 22px;
  }

  .category-cover {
    min-height: 180px;
  }

  .detail-cover {
    min-height: 310px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
