:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-bright: rgba(34, 211, 238, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #22d3ee;
  --accent-strong: #2563eb;
  --accent-soft: rgba(34, 211, 238, 0.14);
  --danger: #f97316;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.5);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius: 14px;
  font-family: Inter, 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(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ecfeff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.25);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--soft);
  font-size: 14px;
}

.desktop-nav a {
  position: relative;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--accent);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  transform: scaleX(1);
}

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

.mobile-nav {
  display: none;
  padding: 8px 20px 20px;
  background: rgba(2, 6, 23, 0.94);
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px 4px;
  color: var(--soft);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

main {
  padding-top: 68px;
}

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

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.1) contrast(1.05);
}

.hero-shade,
.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 34%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.35) 52%, rgba(2, 6, 23, 0.65) 100%);
}

.hero-content {
  position: absolute;
  left: max(28px, calc((100vw - 1180px) / 2));
  bottom: clamp(70px, 12vh, 150px);
  z-index: 2;
  max-width: 760px;
  padding-right: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-summary,
.lead-text,
.page-hero p {
  max-width: 760px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.hero-summary {
  margin: 22px 0 18px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
  font-size: 12px;
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.secondary-btn {
  color: var(--text);
  background: rgba(15, 23, 42, 0.54);
  border: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(16px);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(34, 211, 238, 0.22);
}

.text-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-weight: 800;
}

.text-link:hover {
  color: #67e8f9;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  transform: translateY(-50%);
  color: var(--text);
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(16px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-arrow:hover {
  border-color: var(--line-bright);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dots button {
  width: 34px;
  height: 4px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--accent);
}

.section-block,
.home-search-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 72px auto 0;
}

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

.section-title-row h2,
.filter-panel h2,
.copy-grid h2,
.site-footer h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.wide-grid,
.slim-grid,
.ranking-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 55px rgba(2, 6, 23, 0.26);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-bright);
  box-shadow: 0 28px 70px rgba(8, 145, 178, 0.14);
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #020617);
}

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

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

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), transparent 40%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .poster-glow {
  opacity: 1;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.26);
}

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

.movie-card-body h2 {
  margin: 10px 0 8px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.28;
}

.movie-card-body h2 a:hover {
  color: var(--accent);
}

.movie-card-body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.meta-row a {
  color: var(--accent);
}

.movie-card-compact .movie-card-body h2 {
  font-size: 15px;
}

.movie-card-compact .movie-card-body p {
  display: none;
}

.filter-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.filter-panel p {
  margin: 10px 0 0;
  color: var(--muted);
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(130px, 0.5fr));
  gap: 12px;
}

.filter-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: none;
}

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

.empty-state {
  grid-column: 1 / -1;
  padding: 16px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

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

.category-card,
.category-panel,
.page-hero,
.detail-copy article {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), transparent 38%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-panel:hover {
  transform: translateY(-4px);
  border-color: var(--line-bright);
}

.category-name {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.category-card strong {
  margin: 18px 0;
  color: var(--text);
  line-height: 1.7;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.category-preview span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.48);
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 0;
  padding: clamp(34px, 6vw, 70px);
}

.compact-hero {
  min-height: 290px;
  display: grid;
  align-content: center;
}

.category-panels {
  display: grid;
  gap: 24px;
}

.category-panel {
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-panel-head {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.category-panel-head span {
  color: var(--accent);
  font-weight: 900;
}

.category-panel-head strong {
  color: var(--soft);
  font-weight: 500;
  line-height: 1.7;
}

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

.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.mini-card:hover {
  border-color: var(--line-bright);
}

.mini-card img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
}

.mini-card span {
  display: grid;
  gap: 5px;
}

.mini-card strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.mini-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.detail-hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.18);
  transform: scale(1.08);
  opacity: 0.48;
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 44px;
  align-items: end;
  padding: 80px 0 64px;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

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

.detail-info {
  max-width: 780px;
  padding-bottom: 16px;
}

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

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

.detail-tags {
  margin: 22px 0 28px;
}

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

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 12px;
  color: white;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.22), rgba(2, 6, 23, 0.72) 62%),
    rgba(2, 6, 23, 0.44);
  border: 0;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.player-start[hidden],
.video-frame.is-playing .player-start {
  display: none;
}

.play-symbol {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #ecfeff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 22px 60px rgba(34, 211, 238, 0.32);
  font-size: 34px;
}

.copy-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
}

.detail-copy article {
  padding: clamp(24px, 4vw, 38px);
}

.detail-copy p {
  color: var(--soft);
  line-height: 2;
  font-size: 16px;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 88px auto 0;
  padding: 42px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

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

.site-footer h2 {
  color: var(--accent);
  font-size: 18px;
  margin-bottom: 14px;
}

.site-footer p {
  line-height: 1.8;
}

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

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

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

.copyright {
  margin: 34px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 12px;
    font-size: 13px;
  }

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

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

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

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

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .mobile-nav.is-open {
    display: block;
  }

  main {
    padding-top: 68px;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 76px;
    padding-right: 0;
  }

  .hero-arrow {
    display: none;
  }

  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .wide-grid,
  .slim-grid,
  .ranking-grid,
  .category-grid,
  .mini-card-grid,
  .footer-grid,
  .copy-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
    padding-top: 56px;
  }

  .detail-poster {
    max-width: 240px;
  }

  .detail-hero,
  .detail-layout {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .nav-wrap,
  .section-block,
  .home-search-shell,
  .page-hero,
  .detail-layout,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

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

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

  .movie-grid {
    gap: 16px;
  }

  .video-frame {
    border-radius: 18px;
  }
}
