:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --purple: #a855f7;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.46);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(34, 211, 238, 0.22), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.22), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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

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

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

button,
input {
  font: inherit;
}

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

.nav-inner {
  width: min(1200px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.38);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong,
.footer-logo {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-menu a,
.mobile-panel a {
  color: var(--soft);
  padding: 10px 16px;
  border-radius: 14px;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-menu a:hover,
.mobile-panel a:hover {
  color: var(--cyan);
  background: rgba(15, 23, 42, 0.92);
  transform: translateY(-1px);
}

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

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.94);
}

main {
  position: relative;
  z-index: 1;
}

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

.hero-track,
.hero-slide {
  min-height: 680px;
}

.hero-slide {
  display: none;
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  display: block;
}

.hero-content {
  width: min(1200px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px);
  align-items: center;
  gap: 56px;
  padding: 72px 0 96px;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-title-block h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h1,
.page-hero h1 {
  max-width: 850px;
  font-size: clamp(44px, 7vw, 86px);
  background: linear-gradient(90deg, #ffffff, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy h2 {
  margin-top: 18px;
  font-size: clamp(30px, 5vw, 58px);
}

.hero-copy p,
.page-hero p,
.detail-title-block p {
  max-width: 760px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-tags,
.detail-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 999px;
  color: #dffbff;
  background: rgba(8, 145, 178, 0.14);
}

.hero-tags span,
.detail-tags span {
  padding: 8px 12px;
}

.movie-tags span {
  padding: 5px 8px;
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.25);
}

.btn-soft {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.75);
}

.btn-ghost {
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.26);
  background: rgba(34, 211, 238, 0.1);
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster::after,
.movie-cover::after,
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.78));
}

.hero-poster img,
.movie-cover img,
.rank-cover img,
.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.8);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: min(1200px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-controls button {
  pointer-events: auto;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

.hero-controls > button {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-size: 30px;
}

.hero-dots {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  pointer-events: auto;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

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

.section-tight {
  padding-top: 50px;
}

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

.section-head h2,
.content-card h2,
.side-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-link {
  color: var(--cyan);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.64));
  box-shadow: 0 18px 50px rgba(2, 6, 23, 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(34, 211, 238, 0.38);
  box-shadow: 0 24px 72px rgba(8, 145, 178, 0.16);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.movie-cover img {
  transition: transform 0.32s ease;
}

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

.movie-year,
.movie-kind {
  position: absolute;
  z-index: 1;
  top: 12px;
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(12px);
}

.movie-year {
  left: 12px;
}

.movie-kind {
  right: 12px;
}

.movie-info {
  padding: 16px;
}

.movie-meta-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.movie-info h3,
.rank-content h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.rank-content h3 a:hover,
.sample-links a:hover,
.next-card a:hover {
  color: var(--cyan);
}

.movie-info p,
.rank-content p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-tile,
.category-card a {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), transparent),
    rgba(15, 23, 42, 0.76);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-tile:hover,
.category-card a:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.09)),
    rgba(15, 23, 42, 0.9);
}

.category-tile span:first-child,
.category-card span {
  color: var(--cyan);
  font-weight: 900;
}

.category-tile strong,
.category-card h2 {
  margin: 10px 0;
  font-size: 24px;
}

.category-tile em,
.category-card p {
  color: var(--soft);
  font-style: normal;
  line-height: 1.65;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.sample-links a {
  color: var(--muted);
  font-size: 13px;
}

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

.rank-panel,
.player-card,
.content-card,
.side-card,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.rank-head {
  align-items: center;
  margin-bottom: 18px;
}

.rank-head h2 {
  font-size: 26px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 68px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.compact-rank-list .rank-item {
  grid-template-columns: 54px 34px minmax(0, 1fr);
}

.compact-rank-list .rank-link {
  display: none;
}

.rank-cover {
  display: block;
  width: 68px;
  height: 88px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
}

.compact-rank-list .rank-cover {
  width: 54px;
  height: 70px;
}

.rank-number {
  color: var(--cyan);
  font-size: 20px;
  font-weight: 900;
}

.rank-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.page-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 36px;
}

.page-hero p {
  margin-bottom: 0;
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
}

.search-field {
  display: grid;
  gap: 8px;
}

.search-field span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

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

.search-field input:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.filter-chip.is-active {
  border-color: rgba(34, 211, 238, 0.52);
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.no-results {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.68);
}

.detail-hero {
  min-height: 560px;
  padding: 52px 0 70px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}

.breadcrumbs,
.detail-hero-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--cyan);
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  padding-top: 52px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-title-block h1 {
  font-size: clamp(42px, 6vw, 78px);
}

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

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

.player-card {
  padding: 12px;
  scroll-margin-top: 90px;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.76));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 5px;
  color: #ffffff;
  font-size: 32px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.35);
}

.play-overlay strong {
  font-size: 18px;
}

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

.content-card,
.side-card {
  padding: 26px;
}

.content-card p {
  color: var(--soft);
  font-size: 17px;
  line-height: 1.9;
}

.detail-side {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 96px;
}

.side-card dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.side-card dl div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

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

.side-card dd {
  margin: 0;
  color: var(--text);
}

.next-card {
  display: grid;
  gap: 12px;
}

.next-card a {
  color: var(--soft);
  line-height: 1.5;
}

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

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 28px;
}

.footer-inner p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-content: start;
}

.footer-links a {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.42);
}

[hidden] {
  display: none !important;
}

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

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .mobile-panel.is-open {
    display: grid;
    gap: 4px;
  }

  .hero,
  .hero-track,
  .hero-slide {
    min-height: auto;
  }

  .hero-content {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 54px 0 96px;
  }

  .hero-poster {
    max-width: 340px;
    transform: none;
  }

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

  .detail-poster {
    width: min(280px, 100%);
  }

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

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

  .footer-inner {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .nav-inner,
  .section,
  .page-hero,
  .breadcrumbs,
  .detail-hero-inner,
  .footer-inner,
  .hero-content,
  .hero-controls {
    width: min(100% - 22px, 1200px);
  }

  .brand-text em {
    display: none;
  }

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

  .hero-copy h2,
  .detail-title-block h1 {
    font-size: 34px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-title-block p {
    font-size: 16px;
  }

  .movie-grid,
  .movie-grid-small,
  .category-grid,
  .category-page-grid {
    grid-template-columns: 1fr;
  }

  .rank-item,
  .compact-rank-list .rank-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .rank-number {
    grid-row: 1;
  }

  .rank-cover {
    display: none;
  }

  .rank-link {
    display: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .side-card dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
