:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(96, 165, 250, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #38bdf8;
  --accent-2: #60a5fa;
  --accent-3: #22d3ee;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.55);
}

* {
  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(37, 99, 235, 0.24), transparent 34rem),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.16), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.88));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 50px rgba(37, 99, 235, 0.08);
  backdrop-filter: blur(18px);
}

.site-nav {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #dff8ff;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(34, 211, 238, 0.82));
  box-shadow: 0 0 32px rgba(56, 189, 248, 0.35);
  font-size: 15px;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 14px;
  color: var(--soft);
  font-weight: 700;
  font-size: 14px;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #e0f2fe;
  background: rgba(59, 130, 246, 0.18);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.2);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
}

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

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.92)),
    radial-gradient(circle at 68% 24%, rgba(56, 189, 248, 0.26), transparent 24rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 86vh;
  margin: 0 auto;
  padding: 128px 24px 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 58px;
  align-items: center;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-kicker::before,
.section-kicker::before {
  content: "";
  width: 30px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.hero h1,
.hero h2 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 70px rgba(0, 0, 0, 0.42);
}

.hero p {
  max-width: 740px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2.2vw, 22px);
}

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

.hero-tags {
  margin-top: 26px;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.detail-tags a {
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
  padding: 6px 12px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 16px;
  font-weight: 900;
  transition: 0.25s ease;
}

.primary-btn {
  color: #06121f;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  box-shadow: 0 18px 42px rgba(56, 189, 248, 0.28);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px rgba(56, 189, 248, 0.38);
}

.ghost-btn,
.section-link {
  color: var(--text);
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(125, 211, 252, 0.18);
}

.ghost-btn:hover,
.section-link:hover {
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(59, 130, 246, 0.18);
}

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgba(125, 211, 252, 0.18);
  transform: rotate(2deg);
  background: rgba(15, 23, 42, 0.92);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-controls {
  position: absolute;
  right: 24px;
  bottom: 32px;
  left: 24px;
  z-index: 4;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-arrow,
.hero-dot {
  pointer-events: auto;
  border: 1px solid rgba(125, 211, 252, 0.18);
  color: var(--text);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-arrow {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  font-size: 34px;
  line-height: 1;
}

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

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

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

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.container.wide {
  width: min(1280px, calc(100% - 40px));
}

main section {
  margin: 72px auto;
}

.page-main {
  padding-top: 106px;
}

.page-title {
  margin-top: 46px;
  margin-bottom: 36px;
}

.page-title h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-title p,
.section-head p {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 760px;
}

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

.search-section {
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, minmax(130px, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.74);
  outline: none;
  padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

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

.movie-card {
  min-width: 0;
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.25);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.94);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.8);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.86));
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #082f49;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  box-shadow: 0 12px 34px rgba(56, 189, 248, 0.35);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 38px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #06121f;
  background: linear-gradient(135deg, #fde68a, #67e8f9);
  font-weight: 900;
  font-size: 13px;
}

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

.movie-meta-line {
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 9px 0 7px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.3;
}

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

.compact-card .movie-card-body {
  padding: 13px;
}

.compact-card h3 {
  font-size: 15px;
}

.compact-card p {
  font-size: 12px;
}

.tag-row {
  gap: 6px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 11px;
}

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

.category-tile,
.category-panel a {
  display: grid;
  min-height: 174px;
  padding: 22px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 60%),
    rgba(15, 23, 42, 0.74);
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.28);
  transition: 0.25s ease;
}

.category-tile:hover,
.category-panel a:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.42);
}

.category-tile span,
.category-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong,
.category-panel strong {
  align-self: end;
  color: var(--accent);
}

.category-tile em,
.category-panel p {
  margin-top: 10px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-preview span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(2, 6, 23, 0.5);
  font-size: 12px;
}

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

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.36fr) minmax(320px, 0.64fr);
  gap: 28px;
  align-items: stretch;
}

.detail-player {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow), 0 0 0 1px rgba(125, 211, 252, 0.16);
}

.detail-player video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  object-fit: cover;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

.player-cover.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.player-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #06121f;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  box-shadow: 0 20px 60px rgba(56, 189, 248, 0.35);
  font-size: 34px;
}

.player-title {
  max-width: 80%;
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 900;
  text-align: center;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.detail-info {
  padding: 30px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 20px 58px rgba(2, 6, 23, 0.28);
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

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

.detail-meta {
  margin-bottom: 18px;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-tags a:hover {
  border-color: rgba(56, 189, 248, 0.45);
  color: #e0f2fe;
}

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

.detail-text article {
  padding: 28px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.7);
}

.detail-text h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-text p {
  margin: 0;
  color: var(--soft);
}

.site-footer {
  margin-top: 86px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), #020617);
}

.footer-inner {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: 28px;
  align-items: start;
}

.footer-inner p,
.footer-copy {
  color: var(--muted);
}

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

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

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

[data-card].hidden-card {
  display: none;
}

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

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

@media (max-width: 920px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    right: 20px;
    left: 20px;
    top: 78px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: grid;
  }

  .nav-link {
    width: 100%;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 112px;
  }

  .hero-poster {
    width: min(270px, 70vw);
    transform: none;
  }

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

  .search-field {
    grid-column: 1 / -1;
  }

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

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

  .detail-info {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .site-nav {
    height: 66px;
    padding: 0 16px;
  }

  .site-logo {
    font-size: 20px;
  }

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

  .hero-content {
    padding: 104px 20px 78px;
  }

  .hero-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-controls {
    bottom: 20px;
  }

  .hero-arrow {
    width: 42px;
    height: 42px;
  }

  .container,
  .container.wide {
    width: min(100% - 28px, 1280px);
  }

  main section {
    margin: 48px auto;
  }

  .filter-panel,
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

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

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

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p {
    font-size: 12px;
  }

  .detail-player,
  .detail-player video {
    min-height: 260px;
  }
}
