:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.7);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #10b981;
  --accent-strong: #059669;
  --accent-soft: rgba(16, 185, 129, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* {
  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 80% 20%, rgba(59, 130, 246, 0.1), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 75%);
}

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

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

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

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

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color: white;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.35);
}

.brand-name {
  font-size: 1.18rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted-strong);
  font-size: 0.95rem;
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-current {
  color: white;
}

.nav-link.is-current::after,
.nav-link:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 20px 18px;
  background: rgba(15, 23, 42, 0.95);
}

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

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.03);
}

.mobile-link:hover {
  color: white;
  background: var(--accent-soft);
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

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

.hero-image {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.32), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at 70% 30%, rgba(34, 211, 238, 0.16), transparent 30rem);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  filter: saturate(1.08) contrast(1.05);
}

.hero-fallback,
.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  font-weight: 900;
  letter-spacing: -0.08em;
  color: rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.26), transparent 18rem),
    linear-gradient(135deg, #0f172a, #020617);
}

.hero-fallback {
  font-size: clamp(7rem, 18vw, 18rem);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.8)),
    linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0) 40%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 90px 0 110px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #6ee7b7;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-content h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-content p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: 1.12rem;
  line-height: 1.75;
}

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

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

.hero-tags span,
.hero-tags a,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted-strong);
  font-size: 0.84rem;
}

.hero-tags a:hover,
.tag-row span:hover {
  border-color: rgba(16, 185, 129, 0.55);
  color: white;
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.ghost-button,
.section-more {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
  color: var(--muted-strong);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.55);
}

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

.hero-dots button {
  width: 42px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--accent);
}

.hero-dots span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.page-main {
  padding: 42px 0 72px;
}

.home-search {
  position: relative;
  z-index: 5;
  margin-top: -46px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search h2 {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.05em;
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin: 22px 0 24px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.68);
}

.search-box span {
  color: #6ee7b7;
  font-size: 1.4rem;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font-size: 1rem;
}

.search-box input::placeholder {
  color: #64748b;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-filters button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
  padding: 8px 13px;
  cursor: pointer;
}

.quick-filters button:hover,
.quick-filters button.is-active {
  border-color: rgba(16, 185, 129, 0.55);
  background: var(--accent-soft);
  color: white;
}

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

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

.section-heading h2,
.category-overview-head h2,
.side-panel h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.04em;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.52));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.48);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.poster-link,
.side-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

.poster-link img,
.side-poster img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.poster-link:hover img {
  transform: scale(1.06);
}

.image-hidden {
  opacity: 0;
  pointer-events: none;
}

.poster-link .poster-fallback,
.side-poster .poster-fallback {
  font-size: clamp(2rem, 4vw, 4rem);
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  color: white;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #6ee7b7;
  font-size: 0.78rem;
  font-weight: 700;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 1.06rem;
  line-height: 1.32;
}

.movie-card h3 a:hover {
  color: #6ee7b7;
}

.movie-card p {
  margin: 0 0 12px;
  min-height: 3.2em;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.compact-card h3 {
  font-size: 0.98rem;
}

.compact-card p {
  min-height: 2.7em;
  font-size: 0.82rem;
}

.tag-row {
  gap: 6px;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 0.75rem;
}

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

.category-tile,
.category-overview-card,
.side-panel,
.detail-content,
.player-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.24);
}

.category-tile {
  padding: 20px;
}

.category-tile a:first-child {
  display: grid;
  gap: 10px;
}

.category-tile span {
  color: #6ee7b7;
  font-weight: 800;
  font-size: 1.16rem;
}

.category-tile strong {
  color: var(--muted-strong);
  font-size: 0.92rem;
  line-height: 1.65;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-samples a {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.8rem;
}

.category-samples a:hover {
  color: white;
  background: var(--accent-soft);
}

.page-hero {
  overflow: hidden;
  margin-bottom: 34px;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.18), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.76));
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted-strong);
  line-height: 1.85;
}

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

.category-overview-card p {
  margin: 0 0 18px;
  color: var(--muted-strong);
  line-height: 1.7;
}

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

.breadcrumb a:hover {
  color: #6ee7b7;
}

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

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

.rank-link {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
}

.rank-link:hover {
  border-color: rgba(16, 185, 129, 0.48);
  background: rgba(16, 185, 129, 0.08);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: #6ee7b7;
  font-weight: 900;
}

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

.rank-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

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

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

.player-card {
  overflow: hidden;
  padding: 12px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(16, 185, 129, 0.28), rgba(2, 6, 23, 0.78)),
    rgba(2, 6, 23, 0.48);
  color: white;
  cursor: pointer;
}

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

.player-pulse {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #22c55e);
  color: white;
  font-size: 2rem;
  box-shadow: 0 0 0 16px rgba(16, 185, 129, 0.12);
}

.player-overlay strong {
  max-width: min(70%, 620px);
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.04em;
}

.detail-content {
  padding: 30px;
}

.detail-content h1 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.detail-meta {
  margin-bottom: 18px;
}

.lead-text {
  color: #d1fae5;
  font-size: 1.08rem;
  line-height: 1.85;
}

.detail-content p {
  color: var(--muted-strong);
  line-height: 1.9;
}

.detail-content h2 {
  margin-top: 30px;
  margin-bottom: 12px;
  font-size: 1.42rem;
}

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

.detail-aside {
  display: grid;
  align-content: start;
  gap: 18px;
}

.side-poster {
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.side-panel {
  padding: 22px;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 18px 0;
}

.side-panel dt {
  color: var(--muted);
}

.side-panel dd {
  margin: 0;
  color: var(--muted-strong);
}

.full-button {
  width: 100%;
}

.empty-result {
  display: none;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.64);
}

.empty-result.is-visible {
  display: block;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.footer-grid p,
.footer-grid a,
.copyright {
  color: var(--muted);
}

.footer-grid p {
  max-width: 540px;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

.footer-grid a:hover {
  color: #6ee7b7;
}

.copyright {
  margin: 0;
  padding: 18px 0 28px;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

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

  .menu-toggle {
    display: block;
  }

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

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

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

  .detail-aside {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .container,
  .content-section,
  .footer-grid {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-content {
    padding: 72px 0 90px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-content h1 {
    letter-spacing: -0.05em;
  }

  .hero-actions,
  .section-heading,
  .category-overview-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .home-rank-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .page-hero,
  .home-search,
  .detail-content {
    padding: 22px;
    border-radius: 22px;
  }

  .detail-aside {
    grid-template-columns: 1fr;
  }

  .side-poster {
    max-width: 260px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .nav-shell {
    width: min(100% - 20px, 1240px);
  }

  .brand-name {
    font-size: 1rem;
  }
}
