:root {
  color-scheme: dark;
  --bg: #04140c;
  --bg-soft: #092016;
  --panel: rgba(8, 39, 26, 0.84);
  --panel-strong: rgba(9, 58, 39, 0.94);
  --line: rgba(148, 248, 186, 0.16);
  --text: #f2fff7;
  --muted: #a9c6b5;
  --brand: #22c55e;
  --brand-2: #10b981;
  --brand-3: #84cc16;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 197, 94, 0.22), transparent 28rem),
    radial-gradient(circle at 90% 15%, rgba(16, 185, 129, 0.20), transparent 30rem),
    linear-gradient(180deg, #052016 0%, #04140c 48%, #020806 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.96), rgba(4, 120, 87, 0.94));
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #052016;
  background: linear-gradient(135deg, #bef264, #22c55e 58%, #14b8a6);
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.36);
  font-size: 14px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  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.8s ease;
  background-image:
    linear-gradient(90deg, rgba(3, 16, 10, 0.96) 0%, rgba(3, 23, 14, 0.82) 42%, rgba(3, 16, 10, 0.40) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 28%, rgba(34, 197, 94, 0.23), transparent 30rem),
    linear-gradient(180deg, transparent, rgba(2, 8, 6, 0.76));
}

.hero-content {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 48px;
  padding: 82px 0 58px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 16px;
  padding: 8px 12px;
  border: 1px solid rgba(132, 204, 22, 0.4);
  border-radius: 999px;
  color: #d9f99d;
  background: rgba(34, 197, 94, 0.14);
  font-size: 14px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-desc {
  max-width: 720px;
  margin: 22px 0 0;
  color: #d3eadb;
  font-size: 18px;
  line-height: 1.9;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.filter-tabs button {
  padding: 7px 11px;
  border: 1px solid rgba(148, 248, 186, 0.18);
  border-radius: 999px;
  color: #d9f99d;
  background: rgba(7, 45, 29, 0.72);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #052016;
  background: linear-gradient(135deg, #bef264, #22c55e 60%, #14b8a6);
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.28);
}

.btn.ghost {
  color: #f2fff7;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #064e3b, #022c22);
}

.hero-poster span,
.poster-play,
.player-cover span {
  position: absolute;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #052016;
  background: rgba(190, 242, 100, 0.96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
}

.hero-poster span {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

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

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

.hero-dots button.active {
  background: #bef264;
}

.section {
  padding: 66px 0;
}

.section.compact {
  padding-top: 34px;
}

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

.section-head h2,
.block-title,
.detail-block h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-lead,
.card-body p,
.category-card p,
.detail-block p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card,
.category-card,
.panel,
.detail-block,
.player-card,
.search-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(9, 58, 39, 0.84), rgba(4, 24, 16, 0.88));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(190, 242, 100, 0.34);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #064e3b, #022c22);
}

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

.movie-card:hover img {
  transform: scale(1.05);
  opacity: 0.92;
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #052016;
  background: #bef264;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.rank-title:hover {
  color: #bef264;
}

.meta-line {
  margin: 0 0 8px;
  font-size: 13px;
}

.card-body p {
  margin: 0 0 12px;
  font-size: 14px;
}

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

.category-card {
  display: block;
  min-height: 156px;
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(190, 242, 100, 0.34);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.rank-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.rank-no {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #052016;
  background: linear-gradient(135deg, #bef264, #22c55e);
  font-weight: 900;
}

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

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

.page-hero {
  padding: 70px 0 28px;
  background: radial-gradient(circle at 30% 0%, rgba(34, 197, 94, 0.18), transparent 32rem);
}

.page-hero h1 {
  max-width: 860px;
}

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

.toolbar,
.search-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.toolbar input,
.toolbar select,
.search-panel input,
.search-panel select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #f2fff7;
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.toolbar input,
.search-panel input {
  flex: 1 1 260px;
}

.toolbar select,
.search-panel select {
  flex: 0 0 170px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 52px 0;
  background: linear-gradient(90deg, rgba(4, 17, 12, 0.95), rgba(5, 46, 31, 0.74)), var(--detail-bg);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}

.detail-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #064e3b, #022c22);
}

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

.breadcrumb a:hover {
  color: #bef264;
}

.detail-title h1 {
  max-width: 840px;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-facts span {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #d3eadb;
}

.detail-lead {
  max-width: 860px;
  margin: 0;
  font-size: 17px;
}

.player-card {
  overflow: hidden;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.78)),
    var(--player-cover);
  background-size: cover;
  background-position: center;
}

.player-cover span {
  position: static;
  width: 78px;
  height: 78px;
  font-size: 24px;
}

.player-card.playing .player-cover {
  display: none;
}

.player-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

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

.detail-block {
  padding: 24px;
  margin-bottom: 20px;
}

.detail-block p {
  margin: 14px 0 0;
  font-size: 16px;
}

.side-panel {
  position: sticky;
  top: 86px;
}

.search-panel {
  padding: 18px;
}

.empty-state {
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 24px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.site-footer p {
  max-width: 420px;
}

.footer-links {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.footer-links a:hover {
  color: #bef264;
}

@media (max-width: 1024px) {
  .hero-content,
  .detail-layout,
  .rank-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

  .side-panel {
    position: static;
  }
}

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

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

  .site-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(4, 24, 16, 0.98);
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    border-radius: 12px;
  }

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: clamp(32px, 12vw, 48px);
  }

  .movie-grid,
  .category-grid,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .player-info,
  .rank-item {
    align-items: start;
    flex-direction: column;
  }

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

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