: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;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #04131d;
  background: linear-gradient(135deg, #67e8f9, #0891b2);
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  color: var(--muted-strong);
  font-size: 15px;
  transition: color 0.2s ease;
}

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

.nav-search {
  width: 270px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.45);
  overflow: hidden;
}

.nav-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 10px 12px 10px 16px;
}

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

.nav-search button {
  border: 0;
  color: white;
  background: var(--cyan-deep);
  padding: 10px 16px;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

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

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

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

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.7);
  color: var(--muted-strong);
}

.hero {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

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

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.08) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 43%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.28) 48%, rgba(2, 6, 23, 0.35) 100%);
}

.hero-inner {
  position: relative;
  min-height: 74vh;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 160px;
}

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1,
.hero h2,
.page-title h1,
.detail-copy h1 {
  margin: 16px 0 0;
  color: #fff;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 70px);
}

.hero h2 {
  font-size: clamp(28px, 4vw, 54px);
}

.hero p {
  max-width: 660px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-meta span,
.detail-meta span {
  padding: 7px 11px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.52);
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 22px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: #04131d;
  background: linear-gradient(135deg, #67e8f9, #06b6d4);
  box-shadow: 0 16px 40px rgba(8, 145, 178, 0.32);
}

.ghost-btn {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.56);
}

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

.ghost-btn:hover {
  border-color: rgba(34, 211, 238, 0.5);
  color: var(--cyan);
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.36);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-rail {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: -86px;
}

.rank-item {
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.36);
}

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

.rank-item img {
  width: 58px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong {
  display: block;
  overflow: hidden;
  color: #f8fafc;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-block {
  margin-top: 70px;
}

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

.section-head h2,
.detail-section h2,
.detail-side h2,
.site-footer h2 {
  margin: 8px 0 0;
  color: #f8fafc;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
}

.section-head a {
  color: var(--cyan);
  font-weight: 700;
}

.inline-head {
  display: block;
}

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

.category-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 70%),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.4);
}

.category-card span {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 20px 55px rgba(2, 6, 23, 0.28);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

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

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

.poster-link::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent 48%);
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  overflow: hidden;
  padding: 5px 10px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 47, 73, 0.78);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body {
  padding: 16px;
}

.meta-line {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-body h3 {
  margin: 8px 0 8px;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.25;
}

.card-body h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.18);
  font-size: 12px;
}

.movie-card-small .card-body h3 {
  font-size: 16px;
}

.movie-card-small .card-body p {
  min-height: 40px;
  font-size: 13px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.detail-side,
.detail-article,
.filter-panel,
.category-title-card,
.ranking-title,
.search-title {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

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

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

.page-main {
  padding: 54px 0 0;
}

.page-title {
  margin-bottom: 34px;
  padding: 34px;
}

.page-title h1 {
  font-size: clamp(34px, 4vw, 58px);
}

.page-title p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted-strong);
  font-size: 17px;
}

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

.crumbs a {
  color: #bae6fd;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.category-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
}

.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 4px 0 10px;
  color: #fff;
  font-size: 24px;
}

.category-overview-card p {
  margin: 0;
  color: var(--muted);
}

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

.sample-links a {
  max-width: 180px;
  overflow: hidden;
  padding: 6px 10px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.16);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  outline: 0;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.52);
  padding: 12px 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

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

.ranking-wide {
  margin-top: 36px;
}

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

.detail-main {
  padding-bottom: 10px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 70px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  filter: blur(16px) saturate(1.12);
  transform: scale(1.08);
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68)), linear-gradient(0deg, #020617, transparent);
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
  gap: 34px;
  align-items: center;
}

.player-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 32px 90px rgba(2, 6, 23, 0.58);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.28));
  text-align: center;
}

.play-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #04131d;
  background: linear-gradient(135deg, #67e8f9, #06b6d4);
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.35);
  font-size: 28px;
}

.play-cover strong {
  max-width: 80%;
  color: #f8fafc;
  font-size: clamp(20px, 3vw, 34px);
}

.detail-copy h1 {
  font-size: clamp(32px, 4vw, 56px);
}

.detail-one-line {
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.detail-play-btn {
  margin-top: 26px;
  border: 0;
}

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

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

.detail-section + .detail-section {
  margin-top: 30px;
}

.detail-section h2,
.detail-side h2 {
  font-size: 28px;
}

.detail-section p {
  margin: 14px 0 0;
  color: var(--muted-strong);
  font-size: 17px;
}

.side-rank-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
}

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

.footer-brand {
  margin-bottom: 16px;
}

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

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

.footer-links {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

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

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

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

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

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

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

  .two-column,
  .detail-layout,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-wrap {
    min-height: 62px;
  }

  .brand {
    font-size: 18px;
  }

  .hero,
  .hero-inner {
    min-height: 78vh;
  }

  .hero-inner {
    padding: 96px 0 150px;
  }

  .hero-meta,
  .detail-meta,
  .hero-actions {
    gap: 8px;
  }

  .hero-rail {
    margin-top: -94px;
    overflow-x: auto;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 84%);
    grid-template-columns: none;
    padding-bottom: 4px;
  }

  .hero-dots {
    bottom: 120px;
  }

  .section-block {
    margin-top: 52px;
  }

  .section-head {
    display: block;
  }

  .section-head a {
    display: inline-block;
    margin-top: 10px;
  }

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

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .category-cover {
    max-height: 300px;
  }

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

  .page-title {
    padding: 24px;
  }

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .detail-hero {
    padding: 28px 0 48px;
  }

  .detail-layout {
    gap: 22px;
  }

  .detail-content-grid {
    margin-top: 34px;
  }

  .detail-article,
  .detail-side {
    padding: 22px;
  }

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

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

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