:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --emerald: #10b981;
  --emerald-2: #34d399;
  --cyan: #22d3ee;
  --purple: #a78bfa;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  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 30%),
    linear-gradient(180deg, #0f172a 0%, #020617 52%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-name {
  font-size: 22px;
  background: linear-gradient(90deg, var(--emerald-2), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--emerald-2);
  box-shadow: 0 0 32px rgba(16, 185, 129, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.nav-link,
.mobile-link {
  color: var(--soft);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 310px;
}

.top-search input,
.wide-search input,
.filter-inner input,
.filter-inner select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
  border-radius: 14px;
  padding: 12px 14px;
}

.top-search input:focus,
.wide-search input:focus,
.filter-inner input:focus,
.filter-inner select:focus {
  border-color: rgba(52, 211, 153, 0.75);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.top-search button,
.wide-search button,
.filter-inner button {
  border: 0;
  color: white;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.22);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 4px;
  background: var(--soft);
}

.mobile-nav {
  display: none;
  padding: 10px 16px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.9s ease, transform 1.2s ease;
}

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.75) 44%, rgba(15, 23, 42, 0.28)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.2) 44%, rgba(2, 6, 23, 0.55));
}

.hero-content {
  position: relative;
  z-index: 3;
}

.hero-copy {
  max-width: 790px;
  padding: 60px 0;
  animation: fadeInUp 0.8s ease both;
}

.hero-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.16);
  color: var(--emerald-2);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 750;
  font-size: 14px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  margin: 0;
  max-width: 760px;
  color: var(--soft);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 10px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--soft);
  font-size: 13px;
}

.hero-actions,
.detail-copy .primary-btn {
  margin-top: 32px;
}

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.ghost-btn,
.section-more {
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.58);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.search-panel,
.filter-bar {
  background: rgba(2, 6, 23, 0.64);
  border-top: 1px solid rgba(148, 163, 184, 0.13);
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.search-panel-inner,
.filter-inner {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 560px);
  gap: 24px;
  align-items: center;
  padding: 28px 0;
}

.search-panel h2,
.section-head h2,
.detail-text h2,
.overview-copy h2,
.site-footer h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.5vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.search-panel p,
.section-head p,
.overview-copy p,
.site-footer p {
  margin: 0;
  color: var(--muted);
}

.wide-search {
  display: flex;
  gap: 10px;
}

.content-section {
  padding: 62px 0;
}

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

.section-head.centered {
  display: block;
  text-align: center;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78));
  border: 1px solid rgba(148, 163, 184, 0.17);
  box-shadow: var(--shadow);
}

.category-tile:hover .category-glow {
  opacity: 1;
}

.category-glow {
  position: absolute;
  inset: auto -50px -70px auto;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  opacity: 0.55;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.42), transparent 68%);
  transition: opacity 0.2s ease;
}

.category-title {
  position: relative;
  z-index: 2;
  display: block;
  font-size: 22px;
  font-weight: 850;
}

.category-desc {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.category-thumbs {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(2, 46px);
  gap: 8px;
}

.category-thumbs img {
  width: 46px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.18), rgba(34, 211, 238, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.compact-grid {
  grid-template-columns: repeat(5, 1fr);
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.26);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.42);
  box-shadow: 0 28px 74px rgba(2, 6, 23, 0.42);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(2, 6, 23, 0.9));
}

.movie-card.compact .poster-link {
  aspect-ratio: 3 / 4;
}

.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.86), transparent 56%);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  background: rgba(16, 185, 129, 0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.poster-year {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: white;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--emerald-2);
  font-size: 12px;
  font-weight: 800;
}

.card-meta span,
.card-meta a {
  color: inherit;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

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

.movie-card p {
  margin: 0;
  min-height: 52px;
  color: var(--muted);
  font-size: 14px;
}

.movie-card .tag-row {
  margin-top: 14px;
  gap: 7px;
}

.movie-card .tag-row span {
  min-height: auto;
  font-size: 12px;
  padding: 4px 8px;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.rank-item:hover,
.ranking-row:hover {
  border-color: rgba(52, 211, 153, 0.36);
  background: rgba(15, 23, 42, 0.92);
}

.rank-no {
  color: var(--emerald-2);
  font-size: 22px;
  font-weight: 900;
}

.rank-item img {
  width: 56px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(16, 185, 129, 0.16);
}

.rank-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rank-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.page-main,
.detail-main {
  min-height: 70vh;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  padding: 86px 0 72px;
}

.mini-hero {
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.24), transparent 30%),
    linear-gradient(135deg, #111827, #020617);
}

.page-hero-mask,
.detail-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.74));
}

.page-hero .container,
.detail-hero-inner {
  position: relative;
  z-index: 2;
}

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

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

.filter-inner {
  grid-template-columns: 1fr 180px 160px;
}

.search-filter .filter-inner {
  grid-template-columns: 1fr 170px 170px 150px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.overview-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.overview-link {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 210px;
}

.overview-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 14px;
  background: rgba(2, 6, 23, 0.46);
}

.overview-covers img {
  width: 100%;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.14);
}

.overview-copy {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.overview-copy span {
  margin-top: 20px;
  color: var(--emerald-2);
  font-weight: 850;
}

.ranking-list {
  display: grid;
  gap: 12px;
  padding: 34px 0 70px;
}

.ranking-row {
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
}

.ranking-main {
  display: grid;
  grid-template-columns: 74px 88px 1fr 92px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
}

.ranking-num {
  color: var(--emerald-2);
  font-weight: 950;
  font-size: 26px;
}

.ranking-main img {
  width: 88px;
  height: 112px;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.14);
}

.ranking-info {
  display: grid;
  gap: 5px;
}

.ranking-info strong {
  font-size: 19px;
}

.ranking-info em,
.ranking-info small {
  color: var(--muted);
  font-style: normal;
}

.heat-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  justify-self: end;
  border-radius: 18px;
  color: white;
  font-weight: 950;
  background: linear-gradient(135deg, var(--emerald), var(--purple));
}

.detail-hero {
  padding: 56px 0 72px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(2, 6, 23, 0.9));
}

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

.detail-copy h1 {
  font-size: clamp(36px, 5.8vw, 72px);
}

.player-section {
  padding: 56px 0 30px;
}

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

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.08));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
}

.player-overlay span {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 22px 64px rgba(16, 185, 129, 0.32);
}

.player-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--soft);
  pointer-events: none;
}

.player-shell.is-playing .player-caption {
  opacity: 0;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-text article {
  padding: 30px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.detail-text p {
  color: var(--soft);
  margin: 0 0 16px;
}

.detail-text p:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.64), #020617);
  padding: 54px 0 26px;
}

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

.footer-brand {
  font-size: 20px;
  margin-bottom: 14px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

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

.site-footer h2 {
  font-size: 18px;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .desktop-nav {
    display: none;
  }

  .top-search {
    margin-left: auto;
  }

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

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

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 64px;
  }

  .top-search {
    display: none;
  }

  .hero-slider {
    min-height: 72vh;
  }

  .hero-copy {
    padding: 70px 0 92px;
  }

  .search-panel-inner,
  .filter-inner,
  .search-filter .filter-inner {
    grid-template-columns: 1fr;
  }

  .wide-search,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .category-grid,
  .grid-cards,
  .compact-grid,
  .rank-grid,
  .overview-grid,
  .footer-grid,
  .detail-text-grid {
    grid-template-columns: 1fr;
  }

  .overview-link,
  .detail-grid,
  .ranking-main {
    grid-template-columns: 1fr;
  }

  .overview-covers {
    grid-template-columns: repeat(6, 1fr);
  }

  .overview-covers img {
    height: 72px;
  }

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

  .ranking-main img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .heat-score {
    justify-self: start;
  }

  .player-caption {
    display: none;
  }
}

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

  .brand-name {
    font-size: 18px;
  }

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

  .hero-actions {
    display: grid;
  }

  .content-section {
    padding: 42px 0;
  }

  .page-hero,
  .detail-hero {
    padding: 46px 0;
  }
}
