:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.78);
  --card-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.42);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --accent: linear-gradient(135deg, #22d3ee 0%, #2563eb 100%);
  --shadow: 0 22px 70px rgba(15, 23, 42, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(
      circle at top left,
      rgba(34, 211, 238, 0.12),
      transparent 32rem
    ),
    radial-gradient(
      circle at top right,
      rgba(59, 130, 246, 0.14),
      transparent 34rem
    ),
    var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.22);
}

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

.brand-text strong,
.footer-logo {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-link,
.nav-more button,
.mobile-nav a {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-more:hover button,
.mobile-nav a:hover {
  color: var(--cyan);
}

.nav-more {
  position: relative;
}

.nav-more button {
  border: 0;
  background: transparent;
  padding: 12px 0;
}

.nav-more-panel {
  position: absolute;
  top: 42px;
  right: 0;
  width: 180px;
  display: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

.nav-more:hover .nav-more-panel {
  display: grid;
  gap: 8px;
}

.nav-more-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.nav-more-panel a:hover {
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
}

.header-search {
  width: min(280px, 22vw);
  display: flex;
  align-items: center;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.68);
}

.header-search input,
.mobile-nav input,
.filter-input,
.filter-select {
  width: 100%;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
}

.header-search input,
.mobile-nav input {
  padding: 8px 10px;
}

.header-search button,
.mobile-nav button {
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(34, 211, 238, 0.18);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #e2e8f0;
  background: transparent;
  font-size: 1.7rem;
}

.mobile-nav {
  display: none;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.open {
  display: grid;
  gap: 14px;
}

.mobile-nav form {
  display: flex;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.48);
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 22px 64px;
}

.hero {
  position: relative;
  min-height: 620px;
  margin: 0 auto 46px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 30px;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.94),
    rgba(15, 23, 42, 0.62)
  );
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px
  );
  background-size: 34px 34px;
  opacity: 0.35;
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 48px;
  align-items: center;
  padding: 70px 64px 86px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
  transform: scale(1.04);
  opacity: 0.55;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.94) 0%,
      rgba(2, 6, 23, 0.78) 48%,
      rgba(2, 6, 23, 0.38) 100%
    ),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 44%);
}

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

.eyebrow,
.page-eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  font-size: 0.85rem;
  font-weight: 760;
}

.hero h1 {
  margin: 18px 0 8px;
  font-size: clamp(2.35rem, 6vw, 5rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  color: #cffafe;
  font-weight: 840;
}

.hero p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 19px;
  border-radius: 14px;
  font-weight: 780;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.22);
}

.btn-secondary,
.btn-ghost {
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.62);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.16);
  font-size: 0.78rem;
  font-weight: 680;
}

.hero-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
}

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

.hero-controls {
  position: absolute;
  left: 64px;
  right: 64px;
  bottom: 26px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.36);
  transition:
    width 0.2s ease,
    background 0.2s ease;
}

.hero-dots button.active {
  width: 58px;
  background: var(--accent);
}

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

.hero-arrows button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.56);
}

.section-block {
  margin: 42px 0;
}

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

.section-heading h2,
.page-heading h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 880;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.22);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 24px 70px rgba(34, 211, 238, 0.1);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.86),
    rgba(30, 41, 59, 0.64)
  );
}

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

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

.card-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(34, 211, 238, 0.88);
  font-size: 0.8rem;
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #facc15);
}

.card-body {
  padding: 15px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted-2);
  font-size: 0.78rem;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.34;
  font-weight: 800;
}

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

.card-summary {
  display: -webkit-box;
  min-height: 3.3em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-summary.compact {
  -webkit-line-clamp: 1;
  min-height: auto;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.92),
    rgba(30, 41, 59, 0.68)
  );
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  width: 132px;
  height: 132px;
  right: -42px;
  bottom: -42px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
}

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

.category-tile h2,
.category-tile h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 1.22rem;
  font-weight: 850;
}

.category-tile p {
  position: relative;
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.62;
}

.category-tile span {
  position: relative;
  color: var(--cyan);
  font-weight: 760;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
}

.side-panel {
  position: sticky;
  top: 98px;
  align-self: start;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: var(--card);
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  font-weight: 840;
}

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

.mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.mini-card:hover {
  border-color: rgba(34, 211, 238, 0.42);
}

.mini-card img {
  width: 62px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.7);
}

.mini-card-info {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mini-card-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card-info em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.88);
  font-size: 0.72rem;
  font-weight: 850;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  margin: 0 0 24px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: var(--card);
}

.filter-input,
.filter-select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 15px;
  background: rgba(2, 6, 23, 0.35);
}

.filter-select option {
  color: #0f172a;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.player-poster-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  z-index: 3;
}

.player-poster-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.2));
}

.player-poster-layer.is-hidden {
  display: none;
}

.play-circle {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.32);
  font-size: 2.4rem;
  padding-left: 6px;
}

.detail-card {
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: var(--card);
}

.detail-cover {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.72);
  aspect-ratio: 2 / 3;
}

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

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.detail-meta span {
  padding: 10px 12px;
  border-radius: 14px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.32);
  font-size: 0.9rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-title {
  margin: 22px 0 10px;
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.detail-lead {
  max-width: 900px;
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.86;
}

.article-block {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: var(--card);
}

.article-block h2 {
  margin: 0 0 14px;
  font-size: 1.42rem;
  font-weight: 860;
}

.article-block p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.92;
}

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

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr;
  gap: 42px;
  padding: 46px 22px;
}

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

.footer-grid h2 {
  margin: 0 0 16px;
  font-size: 1rem;
  color: #fff;
}

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

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

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 22px 28px;
  color: var(--muted-2);
  font-size: 0.9rem;
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 54px 34px 86px;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 68px;
    padding: 0 16px;
  }

  main {
    padding: 18px 16px 44px;
  }

  .brand-text strong {
    font-size: 1.08rem;
  }

  .brand-text em {
    display: none;
  }

  .hero {
    min-height: 590px;
    border-radius: 22px;
  }

  .hero-slide {
    padding: 42px 22px 84px;
  }

  .hero-controls {
    left: 22px;
    right: 22px;
  }

  .section-heading,
  .page-heading {
    display: block;
  }

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

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

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

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

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

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
  }
}
