* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #070a14;
  --bg-soft: #0e1424;
  --panel: rgba(16, 23, 42, 0.78);
  --panel-strong: rgba(20, 28, 48, 0.92);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #a8b3cf;
  --faint: #74809c;
  --brand: #8b5cf6;
  --brand-2: #ec4899;
  --brand-3: #06b6d4;
  --gold: #fbbf24;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(139, 92, 246, 0.32), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(236, 72, 153, 0.22), transparent 24rem),
    linear-gradient(180deg, #070a14 0%, #090d18 44%, #05070d 100%);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(7, 10, 20, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.header-inner,
.footer-inner,
.section,
.hero-shell,
.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 34px rgba(139, 92, 246, 0.35);
}

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

.desktop-nav a,
.mobile-nav a {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-menu-button {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0 16px 16px;
}

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

.hero-shell {
  position: relative;
  min-height: 640px;
  display: grid;
  align-items: center;
  padding: 44px 0 28px;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 36px;
  overflow: hidden;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 380px;
  align-items: center;
  gap: 40px;
  padding: 72px;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 26% 32%, rgba(139, 92, 246, 0.28), transparent 22rem),
    linear-gradient(180deg, transparent 0%, rgba(7, 10, 20, 0.76) 100%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  font-size: 14px;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #d9e2ff;
  font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span,
.info-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d9e2ff;
  font-size: 12px;
}

.hero-actions,
.section-actions,
.filter-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 32px;
}

.primary-button,
.ghost-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: 0.2s ease;
}

.primary-button {
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 800;
  box-shadow: 0 16px 38px rgba(236, 72, 153, 0.28);
}

.ghost-button {
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.small-button {
  padding: 9px 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.primary-button:hover,
.ghost-button:hover,
.small-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  align-self: center;
  justify-self: end;
  width: min(100%, 360px);
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.player-cover img,
.mini-movie img {
  height: 100%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}

.hero-controls {
  position: absolute;
  left: 72px;
  right: 72px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 32px;
  height: 6px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.24);
}

.hero-dot.active {
  background: white;
}

.hero-arrow-group {
  display: flex;
  gap: 10px;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.section,
.page-shell {
  padding: 34px 0;
}

.section-head,
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-kicker {
  color: var(--brand-3);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 13px;
  text-transform: uppercase;
}

.section-title,
.page-head h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-desc,
.page-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.stats-grid,
.category-grid,
.movie-grid,
.rank-layout,
.detail-layout,
.sitemap-grid {
  display: grid;
  gap: 18px;
}

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

.stat-card,
.category-card,
.movie-card,
.panel,
.search-result,
.detail-info,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
}

.stat-card,
.category-card,
.panel,
.search-result {
  padding: 22px;
}

.stat-card strong {
  display: block;
  font-size: 36px;
  line-height: 1;
}

.stat-card span,
.category-card p,
.search-result p,
.detail-info p,
.panel p {
  color: var(--muted);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  transition: 0.2s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -40% -40% auto auto;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.26);
}

.category-card:hover,
.movie-card:hover,
.search-result:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.42);
}

.category-card h3,
.movie-card h3,
.panel h3,
.search-result h3 {
  margin: 0;
}

.category-card strong {
  display: inline-flex;
  margin-top: 16px;
  color: #dbeafe;
}

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

.movie-card {
  overflow: hidden;
  transition: 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #f97316);
  color: #111827;
  font-weight: 900;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--faint);
  font-size: 12px;
}

.movie-card h3 {
  font-size: 17px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 54px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card.compact p {
  min-height: 44px;
}

.rank-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
}

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

.mini-movie {
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.mini-movie img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
}

.mini-movie small {
  display: block;
  color: var(--muted);
}

.mini-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: var(--gold);
  font-weight: 900;
}

.filter-panel {
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

.filter-panel input {
  flex: 1 1 260px;
}

.filter-panel select {
  flex: 0 1 170px;
}

.result-count {
  color: var(--muted);
}

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

.search-result {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.search-result img {
  width: 88px;
  height: 118px;
  border-radius: 16px;
  object-fit: cover;
}

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

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.detail-info,
.player-card {
  padding: 24px;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.info-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.info-item span {
  display: block;
  color: var(--faint);
  font-size: 12px;
}

.info-item strong {
  display: block;
  margin-top: 4px;
}

.player-card {
  margin-top: 22px;
}

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

.video-shell video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.7)),
    rgba(0, 0, 0, 0.22);
  cursor: pointer;
  z-index: 3;
}

.play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.play-button {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 48px rgba(236, 72, 153, 0.38);
  font-size: 18px;
  font-weight: 900;
}

.text-block {
  margin-top: 24px;
}

.text-block h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.text-block p {
  color: #d6dcec;
  white-space: pre-line;
}

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

.sitemap-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.sitemap-list a {
  color: var(--muted);
}

.sitemap-list a:hover {
  color: var(--text);
}

.site-footer {
  margin-top: 48px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

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

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

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 22px auto 0;
}

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 280px;
    padding: 48px;
  }

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero-shell {
    min-height: auto;
    padding-top: 22px;
  }

  .hero-carousel {
    min-height: 720px;
    border-radius: 28px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 22px;
    padding: 34px 24px 96px;
  }

  .hero-poster {
    justify-self: start;
    width: min(260px, 72vw);
  }

  .hero-controls {
    left: 24px;
    right: 24px;
    bottom: 24px;
  }

  .section-head,
  .page-head,
  .footer-inner {
    align-items: start;
    flex-direction: column;
  }

  .stats-grid,
  .movie-grid,
  .category-grid,
  .info-grid,
  .sitemap-grid {
    grid-template-columns: 1fr 1fr;
  }

  .search-result {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .search-result .small-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .section,
  .hero-shell,
  .page-shell {
    width: min(100% - 22px, 1200px);
  }

  .stats-grid,
  .movie-grid,
  .category-grid,
  .info-grid,
  .sitemap-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 38px;
  }

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