:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --emerald: #10b981;
  --emerald-strong: #059669;
  --teal: #14b8a6;
  --yellow: #facc15;
  --danger: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(20, 184, 166, 0.12), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr minmax(220px, 320px);
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: white;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.32);
}

.brand-text {
  font-size: 1.2rem;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(16, 185, 129, 0.16);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: white;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  margin: 4px auto;
  border-radius: 999px;
}

.site-search {
  position: relative;
}

.site-search-input,
.card-filter {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  outline: none;
  padding: 12px 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search-input:focus,
.card-filter:focus {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.site-search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 92vw);
  max-height: 460px;
  overflow: auto;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
}

.site-search-panel.active {
  display: block;
}

.search-result {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  color: white;
}

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

.search-result img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 9px;
  background: #111827;
}

.search-result h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.search-result p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

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

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, transparent 45%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1180px) / 2));
  transform: translateY(-50%);
  width: min(650px, calc(100% - 48px));
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  color: #e2e8f0;
  font-size: clamp(1rem, 2vw, 1.22rem);
  margin: 0 0 22px;
  max-width: 58ch;
}

.hero-meta,
.detail-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--soft);
}

.hero-meta span,
.detail-meta span,
.meta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.16);
  padding: 4px 10px;
  font-size: 0.85rem;
}

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

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

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

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

.btn.ghost {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.18);
  color: white;
}

.btn.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.92rem;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  color: white;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 18px;
  transform: translateY(-50%);
}

.hero-next {
  right: 18px;
  transform: translateY(-50%);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  padding: 0;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 34px;
  background: var(--emerald);
}

.page-section {
  padding: 72px 0;
}

.sub-page {
  padding-top: 36px;
}

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

.small-hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
}

.small-hero p {
  max-width: 760px;
  color: var(--soft);
  margin: 0;
  font-size: 1.04rem;
}

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

.section-heading h2,
.category-overview-heading h2,
.panel-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.1;
}

.section-heading p,
.category-overview-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 740px;
}

.section-more {
  color: var(--emerald);
  font-weight: 800;
  white-space: nowrap;
}

.surface-block,
.category-overview-card,
.ranking-panel,
.player-card,
.detail-info,
.sticky-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.surface-block {
  padding: 28px;
}

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

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

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 45%);
  opacity: 0;
  transition: opacity 0.28s ease;
}

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

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

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.play-badge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: auto;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.88);
  color: white;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: scale(1);
}

.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--yellow);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 4px 8px;
}

.movie-card-body {
  padding: 12px 2px 0;
}

.movie-card h3 {
  margin: 0 0 6px;
  color: white;
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: #34d399;
}

.movie-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.tag-row span,
.detail-tags span {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--soft);
  padding: 4px 9px;
  font-size: 0.76rem;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #0f172a;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.category-tile:hover img {
  opacity: 0.55;
  transform: scale(1.08);
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 1.3rem;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: var(--soft);
  font-size: 0.9rem;
}

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

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

.panel-heading span {
  color: var(--emerald);
  font-weight: 900;
}

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

.rank-list.mini {
  gap: 12px;
}

.rank-card a {
  display: grid;
  grid-template-columns: auto 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-list.mini .rank-card a {
  grid-template-columns: auto 74px minmax(0, 1fr);
}

.rank-card a:hover {
  background: rgba(30, 41, 59, 0.85);
  transform: translateY(-1px);
}

.rank-number {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: white;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-weight: 900;
}

.rank-card img {
  width: 96px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.rank-list.mini .rank-card img {
  width: 74px;
  height: 58px;
}

.rank-card h3 {
  margin: 0 0 5px;
  font-size: 1rem;
  line-height: 1.35;
  color: white;
}

.rank-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-overview {
  display: grid;
  gap: 28px;
  padding-bottom: 72px;
}

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

.filter-box {
  max-width: 620px;
  margin-top: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 0.94rem;
}

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

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

.detail-main {
  min-width: 0;
}

.player-card {
  padding: 14px;
  margin-bottom: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  display: block;
}

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: #000;
  color: white;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2), rgba(2, 6, 23, 0.78));
}

.player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: white;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 50px rgba(16, 185, 129, 0.36);
  font-size: 1.7rem;
}

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

.detail-info {
  padding: 30px;
}

.detail-info h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
}

.leadline {
  color: #34d399;
  font-size: 1.12rem;
  margin: 0 0 20px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.info-grid div {
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  padding: 16px;
}

.info-grid strong {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 5px;
}

.info-grid p {
  margin: 0;
  color: white;
}

.info-grid a {
  color: #34d399;
}

.detail-info h2,
.sticky-panel h2 {
  margin: 26px 0 12px;
  font-size: 1.35rem;
}

.detail-info p {
  color: var(--soft);
}

.detail-side {
  min-width: 0;
}

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

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

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

.footer-inner strong {
  color: white;
  font-size: 1.1rem;
}

.footer-inner p {
  margin: 6px 0 0;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

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

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

@media (max-width: 1080px) {
  .header-inner {
    grid-template-columns: auto auto 1fr;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    box-shadow: var(--shadow);
  }

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

  .nav-toggle {
    display: block;
    order: 2;
  }

  .site-search {
    order: 3;
  }

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

  .ranking-panel,
  .sticky-panel {
    position: static;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    grid-template-columns: auto auto;
    gap: 12px;
    padding: 12px 0;
  }

  .site-search {
    grid-column: 1 / -1;
    width: 100%;
  }

  .hero {
    min-height: 560px;
    height: 78vh;
  }

  .hero-content {
    top: 54%;
  }

  .hero-arrow {
    display: none;
  }

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

  .movie-grid,
  .movie-grid.compact,
  .movie-grid.four,
  .movie-grid.mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

  .rank-card a,
  .rank-list.mini .rank-card a {
    grid-template-columns: auto 82px minmax(0, 1fr);
  }

  .rank-card img,
  .rank-list.mini .rank-card img {
    width: 82px;
    height: 62px;
  }

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

  .surface-block,
  .category-overview-card,
  .detail-info {
    padding: 20px;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .movie-grid.compact,
  .movie-grid.four,
  .movie-grid.mini-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .movie-card h3 {
    font-size: 0.94rem;
  }

  .movie-card p {
    display: none;
  }

  .meta-row span {
    font-size: 0.74rem;
  }
}
