:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(34, 211, 238, 0.18);
  --line-soft: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #06b6d4;
  --accent-strong: #22d3ee;
  --accent-warm: #fb923c;
  --violet: #8b5cf6;
  --shadow: 0 24px 80px rgba(6, 182, 212, 0.13);
  font-family: 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;
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.22), transparent 32rem),
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.18), transparent 34rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

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

.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;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.35);
}

.logo-text {
  display: grid;
  line-height: 1.1;
}

.logo-text strong,
.footer-logo strong {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #22d3ee, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  color: var(--soft);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-strong);
}

.nav-link:hover {
  transform: translateY(-1px);
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  flex-direction: column;
  gap: 10px;
}

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

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

.hero-slider {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
  pointer-events: none;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 30% 30%, rgba(6, 182, 212, 0.4), transparent 28rem), #020617;
}

.hero-slide::before,
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-slide::before {
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.86) 22%, rgba(2, 6, 23, 0.24) 100%);
}

.hero-slide::after {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.76));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 78vh;
  margin: 0 auto;
  padding: 120px 0 82px;
  display: flex;
  align-items: flex-end;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  font-weight: 800;
  margin-bottom: 18px;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-desc {
  margin: 0;
  color: var(--soft);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.85;
}

.hero-meta,
.detail-meta,
.card-tags,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin: 22px 0 32px;
}

.pill,
.hero-meta span,
.detail-meta span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(6, 182, 212, 0.13);
  border: 1px solid rgba(34, 211, 238, 0.25);
  font-size: 13px;
  font-weight: 700;
}

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

.btn-primary,
.btn-secondary,
.footer-search button,
.search-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 13px 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.footer-search button,
.search-panel button {
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.22);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-secondary:hover,
.footer-search button:hover,
.search-panel button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(6, 182, 212, 0.28);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 42px;
  z-index: 4;
  display: flex;
  gap: 12px;
}

.hero-control {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
  padding: 58px 0 0;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.section-title h2,
.page-title h1,
.detail-title {
  margin: 0;
  font-size: clamp(25px, 3.2vw, 38px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-title span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: white;
  background: linear-gradient(135deg, #fb923c, #ef4444);
}

.section-more {
  color: var(--accent-strong);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 12px 38px rgba(2, 6, 23, 0.32);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: var(--shadow);
}

.poster-media {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 25%, rgba(6, 182, 212, 0.38), transparent 12rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
}

.poster-media img,
.rank-thumb img,
.category-preview img,
.detail-poster img,
.player-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.25s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.08) 54%, rgba(2, 6, 23, 0.28));
  opacity: 0.76;
}

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.9);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-badge,
.poster-score {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-badge {
  left: 12px;
  color: white;
  background: rgba(6, 182, 212, 0.86);
}

.poster-score {
  right: 12px;
  color: #fde68a;
  background: rgba(2, 6, 23, 0.78);
}

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
  flex: 1;
}

.movie-card-body strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.movie-card-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--soft);
  font-size: 13px;
}

.feature-panel,
.category-panel,
.search-panel,
.detail-panel,
.player-card {
  border: 1px solid var(--line-soft);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.48));
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.28);
}

.feature-panel {
  padding: clamp(22px, 4vw, 42px);
}

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

.category-card {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 12rem),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

.category-card strong {
  position: absolute;
  right: 20px;
  bottom: 16px;
  color: rgba(255, 255, 255, 0.1);
  font-size: 58px;
  line-height: 1;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 62px 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.48);
}

.rank-no {
  color: var(--accent-warm);
  font-size: 24px;
  font-weight: 900;
}

.rank-thumb {
  width: 62px;
  height: 82px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.88);
}

.rank-text {
  display: grid;
  gap: 4px;
}

.rank-text strong {
  font-size: 16px;
}

.rank-text em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-score {
  color: #fde68a;
  font-size: 18px;
  font-weight: 900;
}

.page-hero {
  padding: 72px 0 30px;
}

.page-title {
  display: grid;
  gap: 14px;
}

.page-title p {
  max-width: 780px;
  margin: 0;
  color: var(--soft);
  line-height: 1.85;
}

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

.breadcrumbs a {
  color: var(--accent-strong);
}

.filter-bar {
  margin: 28px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.filter-bar input,
.footer-search input,
.search-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  color: var(--text);
  outline: none;
  background: rgba(15, 23, 42, 0.78);
  padding: 0 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus,
.footer-search input:focus,
.search-panel input:focus {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.filter-hint {
  color: var(--muted);
  white-space: nowrap;
}

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

.filter-empty.show {
  display: block;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0 42px;
  background: rgba(2, 6, 23, 0.55);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  filter: blur(5px);
  transform: scale(1.04);
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.26), transparent 36rem);
}

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

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

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  background: rgba(30, 41, 59, 0.75);
  box-shadow: var(--shadow);
}

.detail-info {
  display: grid;
  gap: 18px;
}

.detail-title {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-line {
  margin: 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.85;
}

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

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

.player-card {
  margin: 34px 0;
  padding: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: black;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: black;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.55);
}

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

.player-mask::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), rgba(2, 6, 23, 0.2));
}

.player-cover {
  position: absolute;
  inset: 0;
  opacity: 0.6;
}

.player-button {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.34);
  font-size: 30px;
  cursor: pointer;
}

.detail-panel {
  padding: 28px;
  margin-bottom: 22px;
}

.detail-panel h2,
.side-box h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-panel p {
  margin: 0;
  color: var(--soft);
  line-height: 1.9;
}

.side-box {
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.64);
  position: sticky;
  top: 92px;
}

.search-panel {
  padding: clamp(22px, 4vw, 44px);
  margin: 28px 0 36px;
}

.search-form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.search-summary {
  color: var(--muted);
  margin: 18px 0 0;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr 1.1fr;
  gap: 30px;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.footer-grid h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

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

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

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

.footer-search {
  display: flex;
  gap: 10px;
}

.footer-search button {
  padding-inline: 16px;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  font-size: 13px;
}

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

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

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

  .side-box {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-slider,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content {
    padding-top: 96px;
    padding-bottom: 88px;
  }

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

  .hero-dots {
    left: 16px;
    bottom: 38px;
    transform: none;
  }

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

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

  .detail-layout {
    gap: 24px;
  }

  .detail-poster {
    width: min(260px, 76vw);
  }

  .filter-bar,
  .footer-bottom,
  .footer-search {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-hint {
    white-space: normal;
  }

  .rank-row {
    grid-template-columns: 36px 54px 1fr;
  }

  .rank-score {
    grid-column: 3;
  }

  .search-form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .site-header-inner {
    height: 64px;
  }

  .logo-text strong {
    font-size: 18px;
  }

  .hero-title {
    font-size: 36px;
  }

  .movie-grid {
    gap: 12px;
  }

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

  .poster-play {
    width: 46px;
    height: 46px;
  }
}
