:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.86);
  --bg-card-strong: rgba(30, 41, 59, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --indigo: #4f46e5;
  --amber: #fbbf24;
  --radius: 22px;
  --shadow: 0 26px 60px rgba(2, 6, 23, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 8%, rgba(79, 70, 229, 0.22), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(30, 64, 175, 0.9), rgba(2, 6, 23, 0.94));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.35);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.28);
}

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

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

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

.nav-panel {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
}

.nav-panel a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #dbeafe;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-panel a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 360px;
}

.nav-search input,
.big-search input,
.local-filter input {
  width: 100%;
  min-width: 0;
  color: white;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}

.nav-search input:focus,
.big-search input:focus,
.local-filter input:focus {
  border-color: rgba(34, 211, 238, 0.82);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
}

.nav-search button,
.big-search button,
.local-filter button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.28);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
}

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.05);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.18)),
    linear-gradient(180deg, transparent 48%, #020617 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding-top: 24px;
}

.hero-copy {
  max-width: 760px;
}

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

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.6rem);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.hero p,
.page-hero p,
.lead-text {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.9;
}

.hero-tags,
.tag-row,
.text-link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags a,
.tag-row span,
.text-link-cloud a {
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.62);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.9rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.34);
}

.btn-ghost {
  color: #e0f2fe;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.58);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  min-height: 480px;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: white;
  background: rgba(37, 99, 235, 0.82);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.42);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: white;
  background: rgba(2, 6, 23, 0.48);
  cursor: pointer;
  font-size: 2rem;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

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

.section-block,
.page-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.section-block {
  padding: 54px 0;
}

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

.section-head h2,
.rank-panel-head h2,
.content-card h2,
.category-link-box h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.5vw, 2.35rem);
  letter-spacing: -0.035em;
}

.section-head p,
.category-link-box p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--subtle);
}

.section-link,
.rank-panel-head a {
  color: var(--cyan);
  font-weight: 900;
}

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

.category-chip,
.category-panel,
.category-link-box,
.content-card,
.rank-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.86));
  box-shadow: var(--shadow);
}

.category-chip {
  min-height: 112px;
  padding: 20px;
  transition: transform 0.25s ease, border 0.25s ease;
}

.category-chip:hover,
.category-panel:hover,
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.45);
}

.category-chip strong,
.category-panel strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.category-chip span,
.category-panel p {
  color: var(--subtle);
  line-height: 1.7;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-card);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.26);
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

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

.movie-card-wide .movie-cover {
  aspect-ratio: auto;
  min-height: 176px;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(2, 6, 23, 0.84) 100%);
}

.cover-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  border-radius: 50%;
  color: white;
  background: rgba(37, 99, 235, 0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.cover-badge,
.cover-year {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.cover-badge {
  left: 12px;
  color: #00111a;
  background: var(--cyan);
}

.cover-year {
  right: 12px;
  color: white;
  background: rgba(2, 6, 23, 0.62);
}

.movie-body {
  padding: 16px;
}

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

.movie-body h3 a:hover {
  color: var(--cyan);
}

.movie-body p {
  min-height: 3.6em;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.94rem;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--subtle);
  font-size: 0.86rem;
}

.tag-row span {
  font-size: 0.78rem;
  padding: 5px 9px;
}

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

.rank-panel {
  padding: 22px;
  position: sticky;
  top: 98px;
}

.rank-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-item:hover {
  background: rgba(30, 41, 59, 0.95);
  transform: translateX(4px);
}

.rank-number {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--amber), #f97316);
  font-weight: 950;
}

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

.rank-info {
  color: var(--subtle);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.86rem;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: clamp(28px, 5vw, 64px);
  margin: 20px 0 20px;
  background:
    radial-gradient(circle at 85% 12%, rgba(34, 211, 238, 0.22), transparent 18rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.94));
  box-shadow: var(--shadow);
}

.small-hero h1 {
  font-size: clamp(2.2rem, 4vw, 4.2rem);
}

.big-search,
.local-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 760px;
  margin-top: 24px;
}

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

.category-panel {
  min-height: 160px;
  padding: 24px;
  transition: transform 0.25s ease, border 0.25s ease;
}

.category-panel span {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--cyan);
  font-weight: 900;
}

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

.category-link-box {
  padding: 24px;
}

.category-link-box .text-link-cloud {
  margin-top: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--subtle);
  margin: 14px 0 24px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: clamp(20px, 4vw, 42px);
  background:
    radial-gradient(circle at 16% 8%, rgba(34, 211, 238, 0.2), transparent 24rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.92));
  box-shadow: var(--shadow);
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38);
  background: rgba(15, 23, 42, 0.9);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.detail-meta-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.66);
}

.detail-meta-grid strong {
  display: block;
  color: var(--subtle);
  margin-bottom: 6px;
}

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

.detail-actions {
  margin-top: 28px;
}

.player-section {
  margin: 30px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.48);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.54));
  cursor: pointer;
}

.player-overlay span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 46px rgba(37, 99, 235, 0.38);
  font-size: 2.2rem;
}

.player-overlay.is-hidden {
  display: none;
}

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

.content-card {
  padding: 26px;
}

.content-card p {
  color: var(--muted);
  line-height: 1.95;
}

.content-card:nth-child(3) {
  grid-column: 1 / -1;
}

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

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

.footer-logo {
  font-size: 1.2rem;
  font-weight: 950;
  color: white;
}

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

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

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

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

@media (max-width: 1120px) {
  .hero-content,
  .split-section,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero {
    height: auto;
    min-height: 760px;
  }

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

  .hero-poster {
    width: min(380px, 100%);
    min-height: 420px;
  }

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    min-height: auto;
    padding: 14px 0;
    flex-wrap: wrap;
  }

  .menu-button {
    display: block;
    margin-left: auto;
  }

  .nav-panel {
    display: none;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0;
  }

  .nav-panel.is-open {
    display: flex;
  }

  .nav-search {
    flex: 1 0 100%;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-poster {
    display: none;
  }

  .hero-arrow {
    top: auto;
    bottom: 70px;
  }

  .hero-prev {
    left: 18px;
  }

  .hero-next {
    right: 18px;
  }

  .section-head,
  .footer-inner {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 18px;
  }

  .category-chip-grid,
  .category-panel-grid,
  .category-link-section,
  .movie-grid,
  .compact-grid,
  .all-grid,
  .wide-grid,
  .two-column,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .movie-card-wide {
    grid-template-columns: 1fr;
  }

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

  .big-search,
  .local-filter {
    display: grid;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 640px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2.25rem;
  }

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

  .player-overlay span {
    width: 72px;
    height: 72px;
  }
}
