:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #10b981;
  --accent-dark: #059669;
  --accent-soft: rgba(16, 185, 129, 0.18);
  --amber: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(16, 185, 129, 0.18), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  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: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.3);
}

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

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

.nav-link,
.mobile-nav-link {
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 9px 15px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #6ee7b7;
  background: var(--accent-soft);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.85);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav-link {
  display: block;
  padding: 13px 14px;
}

.hero {
  position: relative;
  height: min(85vh, 820px);
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.hero-slide.is-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(0, 0, 0, 0.85) 0%, rgba(2, 6, 23, 0.64) 45%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, transparent 28%);
}

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

.hero-kicker {
  margin: 0 0 12px;
  color: #6ee7b7;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.hero-text {
  max-width: 58ch;
  margin: 0 0 24px;
  color: var(--muted-strong);
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.78;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.16);
  font-size: 0.82rem;
  font-weight: 650;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 32px;
  color: var(--muted-strong);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-actions,
.filter-bar,
.ranking-title,
.section-heading,
.site-footer .footer-inner,
.breadcrumb {
  display: flex;
  align-items: center;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.secondary-button {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
}

.primary-button:hover,
.secondary-button:hover,
.home-search button:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(8px);
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.58);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--accent);
}

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

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 28px;
  align-items: center;
}

.intro-copy,
.page-hero,
.player-card,
.detail-content,
.detail-side,
.ranking-panel,
.category-overview-card,
.category-tile {
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.intro-copy,
.page-hero,
.ranking-panel,
.category-overview-card,
.category-tile,
.detail-content,
.detail-side {
  border-radius: 24px;
}

.intro-copy {
  padding: 30px;
}

.intro-copy h2,
.section-heading h2,
.ranking-title h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.04em;
}

.intro-copy p,
.section-heading p,
.page-hero p,
.category-overview-card p,
.category-tile p,
.detail-content p {
  color: var(--muted-strong);
  line-height: 1.78;
}

.home-search {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}

.home-search input,
.filter-bar input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 16px;
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  padding: 0 16px;
}

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

.section-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading p {
  margin: 8px 0 0;
}

.section-more,
.ranking-title a {
  color: #6ee7b7;
  font-weight: 750;
}

.category-grid,
.category-overview-grid,
.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile::after,
.category-overview-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -40px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.16);
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.46);
}

.category-tile span,
.category-overview-title {
  display: block;
  margin-bottom: 8px;
  font-size: 1.25rem;
  font-weight: 800;
}

.category-tile strong,
.category-count {
  color: #6ee7b7;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.34);
}

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

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

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

.poster-play,
.rank-badge {
  position: absolute;
  display: inline-grid;
  place-items: center;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: white;
  background: rgba(16, 185, 129, 0.82);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--amber), #d97706);
  font-weight: 850;
}

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

.movie-meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 54px;
  margin: 0 0 14px;
  color: var(--muted-strong);
  font-size: 0.92rem;
  line-height: 1.62;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

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

.ranking-title {
  justify-content: space-between;
  margin-bottom: 18px;
}

.ranking-title h2 {
  font-size: 1.55rem;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 28px 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.4);
}

.ranking-item img {
  width: 52px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-item span {
  color: #6ee7b7;
  font-weight: 900;
}

.ranking-item strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-item em {
  color: var(--amber);
  font-style: normal;
  font-weight: 800;
}

.page-main {
  min-height: 70vh;
  padding-top: 24px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: 42px;
  background:
    radial-gradient(circle at 88% 20%, rgba(16, 185, 129, 0.2), transparent 24rem),
    rgba(15, 23, 42, 0.82);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  letter-spacing: -0.05em;
}

.filter-bar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
}

.filter-bar input {
  max-width: 420px;
}

.large-filter {
  align-items: flex-start;
  flex-direction: column;
}

.large-filter input {
  max-width: none;
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(2, 6, 23, 0.42);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.46);
  background: rgba(16, 185, 129, 0.16);
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  color: var(--muted-strong);
  text-align: center;
}

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

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

.category-samples a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.14);
  font-size: 0.86rem;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto;
  gap: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

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

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: black;
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.48));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-ring {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.86);
  box-shadow: 0 24px 70px rgba(16, 185, 129, 0.34);
  font-size: 2.2rem;
}

.detail-content,
.detail-side {
  padding: 28px;
}

.detail-content h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-one-line {
  font-size: 1.12rem;
}

.detail-tags {
  margin: 18px 0 28px;
}

.detail-content h2 {
  margin: 28px 0 12px;
  font-size: 1.5rem;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 20px;
  object-fit: cover;
  background: #0f172a;
}

.movie-info-list {
  display: grid;
  gap: 14px;
  margin: 22px 0 0;
}

.movie-info-list div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.movie-info-list dt {
  color: var(--muted);
}

.movie-info-list dd {
  margin: 0;
  color: var(--text);
}

.related-section {
  padding-top: 42px;
}

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

.site-footer .footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  max-width: 520px;
  color: var(--muted-strong);
}

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

[data-movie-card].is-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .category-grid,
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .ranking-panel {
    position: static;
  }

  .detail-side {
    max-width: 420px;
  }
}

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

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

  .mobile-nav.is-open {
    display: block;
  }

  .site-header-inner {
    height: 64px;
  }

  .hero {
    min-height: 640px;
    height: calc(100vh - 64px);
  }

  .hero-content {
    top: 54%;
  }

  .hero-arrow {
    display: none;
  }

  .hero-actions,
  .home-search,
  .filter-bar,
  .site-footer .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar input {
    max-width: none;
  }

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

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

  .page-hero,
  .intro-copy,
  .detail-content,
  .detail-side {
    padding: 22px;
  }

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

  .movie-card p {
    min-height: 0;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .hero h1,
  .hero h2 {
    font-size: 2.35rem;
  }

  .ranking-item {
    grid-template-columns: 24px 46px minmax(0, 1fr);
  }

  .ranking-item em {
    display: none;
  }
}
