/* ====================================================================
   AURORA DESIGN SYSTEM — Лаки Бир
   Северное сияние: глубокий navy + cyan/teal/violet свечение
   Pure CSS, no JS, system fonts, Core Web Vitals-friendly
   ==================================================================== */

:root {
  /* Palette — aurora */
  --bg-deep: #050816;
  --bg-base: #0a0e27;
  --bg-card: #0f1533;
  --bg-card-2: #141a3f;
  --border-soft: rgba(120, 180, 255, 0.12);
  --border-glow: rgba(0, 212, 255, 0.35);

  --aurora-cyan: #00d4ff;
  --aurora-teal: #00ffa3;
  --aurora-violet: #8b5cf6;
  --aurora-pink: #ec4899;
  --aurora-ice: #a5f3fc;

  --text-primary: #e8f0ff;
  --text-secondary: #9fb3d9;
  --text-muted: #6c7fa8;
  --text-accent: var(--aurora-cyan);

  /* Typography */
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'SF Pro Display', -apple-system, 'Segoe UI', 'Inter', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Consolas', monospace;

  /* Spacing scale (8px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* Radii */
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-full: 999px;

  /* Shadows (with glow) */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-glow-cyan: 0 0 24px rgba(0, 212, 255, 0.35), 0 0 48px rgba(0, 212, 255, 0.15);
  --shadow-glow-teal: 0 0 24px rgba(0, 255, 163, 0.4), 0 0 60px rgba(0, 255, 163, 0.18);
  --shadow-glow-violet: 0 0 24px rgba(139, 92, 246, 0.4);

  /* Gradients */
  --grad-aurora: linear-gradient(135deg, #00d4ff 0%, #00ffa3 40%, #8b5cf6 80%, #ec4899 100%);
  --grad-aurora-soft: linear-gradient(135deg, rgba(0,212,255,0.15) 0%, rgba(139,92,246,0.15) 100%);
  --grad-cyan-teal: linear-gradient(135deg, #00d4ff 0%, #00ffa3 100%);
  --grad-violet-pink: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --grad-card: linear-gradient(180deg, rgba(20,26,63,0.8) 0%, rgba(10,14,39,0.9) 100%);
  --grad-border: linear-gradient(135deg, rgba(0,212,255,0.6), rgba(139,92,246,0.6), rgba(0,255,163,0.6));

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --t-fast: 180ms; --t-med: 320ms; --t-slow: 600ms;
}

/* ==================  RESET  ================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-deep);
  background-image: url("/assets/img/bg-aurora.jpg");
  background-image: image-set(url("/assets/img/bg-aurora.webp") type("image/webp"), url("/assets/img/bg-aurora.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Aurora animated background (pure CSS, no JS) — overlays photo bg */
body::before {
  content: '';
  position: fixed;
  inset: -50% -50%;
  background:
    radial-gradient(ellipse 40% 30% at 20% 10%, rgba(0, 212, 255, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 80% 20%, rgba(139, 92, 246, 0.16) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 60% 80%, rgba(0, 255, 163, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 30% 25% at 10% 70%, rgba(236, 72, 153, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, rgba(5, 8, 22, 0.35) 0%, rgba(5, 8, 22, 0.55) 100%);
  z-index: -2;
  animation: auroraDrift 30s var(--ease-in-out) infinite alternate;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(165, 243, 252, 0.04) 0px, transparent 2px),
    radial-gradient(circle at 75% 60%, rgba(255, 255, 255, 0.03) 0px, transparent 2px),
    radial-gradient(circle at 45% 85%, rgba(0, 212, 255, 0.05) 0px, transparent 2px),
    radial-gradient(circle at 85% 15%, rgba(139, 92, 246, 0.04) 0px, transparent 2px),
    radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.03) 0px, transparent 2px);
  background-size: 200px 200px, 180px 180px, 220px 220px, 160px 160px, 240px 240px;
  z-index: -1;
  pointer-events: none;
}

@keyframes auroraDrift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  50%  { transform: translate(3%, -2%) rotate(1deg); }
  100% { transform: translate(-2%, 3%) rotate(-1deg); }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ==================  CONTAINERS  ================== */
.container, main, body > section, body > article, body > header, body > footer, body > nav {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--s-5);
  padding-right: var(--s-5);
}

@media (max-width: 768px) {
  .container, main, body > section, body > article, body > header, body > footer, body > nav {
    padding-left: var(--s-4);
    padding-right: var(--s-4);
  }
}

/* ==================  TYPOGRAPHY  ================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-top: var(--s-6);
  margin-bottom: var(--s-4);
}

h1 {
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-top: 0;
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 80px rgba(0, 212, 255, 0.25);
  padding-bottom: 0.15em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  margin-top: var(--s-8);
  position: relative;
  padding-left: var(--s-5);
}
h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  background: var(--grad-cyan-teal);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-glow-cyan);
}

h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  color: var(--aurora-ice);
  margin-top: var(--s-5);
}

h4 { font-size: 1.1rem; color: var(--aurora-cyan); }

p { margin-bottom: var(--s-4); color: var(--text-secondary); }
p strong, strong { color: var(--text-primary); font-weight: 700; }
p em, em { color: var(--aurora-ice); font-style: italic; }

a {
  color: var(--aurora-cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
a:hover { color: var(--aurora-teal); border-bottom-color: var(--aurora-teal); }
a:focus-visible { outline: 2px solid var(--aurora-cyan); outline-offset: 3px; border-radius: 3px; }

/* ==================  HEADER / NAV  ================== */
body > header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: var(--s-4);
  padding-bottom: var(--s-4);
  max-width: 100% !important;
  background: rgba(5, 8, 22, 0.7);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border-soft);
}
body > header > * {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--s-5);
  padding-right: var(--s-5);
}
body > header nav, body > header .nav {
  display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: center;
}
body > header a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-bottom: none;
  padding: var(--s-1) 0;
  position: relative;
}
body > header a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--grad-cyan-teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
  border-radius: var(--r-full);
}
body > header a:hover { color: var(--text-primary); }
body > header a:hover::after { transform: scaleX(1); }

/* ==================  SECTIONS (BOX)  ================== */
section, article, .box {
  margin-top: var(--s-7);
  margin-bottom: var(--s-7);
}

section.box, article.box, .box {
  background: var(--grad-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-6);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

section.box::before, .box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  padding: 1px;
  background: var(--grad-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.4;
  pointer-events: none;
}

@media (max-width: 768px) {
  section.box, .box { padding: var(--s-5) var(--s-4); }
}

/* ==================  HERO  ================== */
.hero {
  position: relative;
  padding: var(--s-9) var(--s-5) var(--s-8);
  text-align: center;
  max-width: 1440px;
  margin: 0 auto;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 10% -10% auto auto;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(0,212,255,0.28) 0%, transparent 70%);
  filter: blur(30px);
  z-index: -1;
  border-radius: 50%;
}

.hero h1 { margin-bottom: var(--s-5); }

.hero .lead, .hero > p:first-of-type {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto var(--s-6);
  line-height: 1.55;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: center;
  margin-bottom: var(--s-6);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-full);
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid var(--border-glow);
  color: var(--aurora-ice);
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}
.badge.teal { background: rgba(0, 255, 163, 0.08); border-color: rgba(0, 255, 163, 0.3); color: var(--aurora-teal); }
.badge.violet { background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.3); color: #c4b5fd; }
.badge.pink { background: rgba(236, 72, 153, 0.12); border-color: rgba(236, 72, 153, 0.3); color: #fbcfe8; }

/* ==================  CTA BUTTONS  ================== */
.cta, a.cta, .btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-6);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #001018;
  background: var(--grad-cyan-teal);
  border: none;
  border-radius: var(--r-full);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out), filter var(--t-fast);
  box-shadow: var(--shadow-glow-teal), 0 8px 24px rgba(0, 212, 255, 0.3);
  min-height: 48px;
}

.cta::after {
  content: '→';
  font-size: 1.2em;
  transition: transform var(--t-fast) var(--ease-out);
}

.cta:hover, a.cta:hover {
  color: #001018;
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: var(--shadow-glow-teal), 0 12px 36px rgba(0, 212, 255, 0.5);
  border-bottom-color: transparent;
}
.cta:hover::after { transform: translateX(4px); }

.cta:active { transform: translateY(0); filter: brightness(0.95); }

.cta.secondary {
  background: transparent;
  color: var(--aurora-cyan);
  border: 1.5px solid var(--aurora-cyan);
  box-shadow: none;
}
.cta.secondary:hover {
  background: rgba(0, 212, 255, 0.08);
  color: var(--aurora-ice);
  box-shadow: var(--shadow-glow-cyan);
}

.cta-wrap {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  justify-content: center;
  margin: var(--s-6) 0;
}

/* Sticky mobile CTA */
.cta-sticky {
  position: fixed;
  bottom: var(--s-4);
  left: var(--s-4);
  right: var(--s-4);
  z-index: 40;
  display: none;
  box-shadow: 0 -8px 32px rgba(0, 212, 255, 0.3), var(--shadow-glow-teal);
}
@media (max-width: 640px) {
  .cta-sticky { display: inline-flex; }
  body { padding-bottom: 80px; }
}

/* ==================  CARDS / GRID  ================== */
.grid, .card-grid, ul.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-5);
  list-style: none;
  padding: 0;
  margin: var(--s-5) 0;
}

article.card, .card, li.card {
  background: linear-gradient(180deg, rgba(20,26,63,0.65) 0%, rgba(15,21,51,0.8) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: var(--s-5);
  position: relative;
  transition: transform var(--t-med) var(--ease-out), border-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
  overflow: hidden;
}

article.card::before, .card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-cyan-teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
}

article.card:hover, .card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 16px 48px rgba(0, 212, 255, 0.15), var(--shadow-card);
}
article.card:hover::before, .card:hover::before { transform: scaleX(1); }

article.card h3, .card h3 {
  margin-top: 0;
  color: var(--aurora-ice);
  font-size: 1.2rem;
}
article.card p, .card p { font-size: 0.95rem; margin-bottom: 0; }

/* ==================  TABLES  ================== */
.table-wrap { overflow-x: auto; margin: var(--s-5) 0; border-radius: var(--r-md); border: 1px solid var(--border-soft); }

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(10, 14, 39, 0.6);
  backdrop-filter: blur(8px);
  font-size: 0.95rem;
}

th {
  background: linear-gradient(180deg, rgba(0,212,255,0.12) 0%, rgba(0,212,255,0.06) 100%);
  color: var(--aurora-ice);
  font-weight: 700;
  text-align: left;
  padding: var(--s-4);
  border-bottom: 1px solid var(--border-glow);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid rgba(120,180,255,0.06);
  color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0, 212, 255, 0.04); color: var(--text-primary); }

/* ==================  LISTS  ================== */
ul, ol { padding-left: var(--s-5); margin-bottom: var(--s-4); }
ul li, ol li { margin-bottom: var(--s-2); color: var(--text-secondary); }

ul li::marker { color: var(--aurora-cyan); }
ol li::marker { color: var(--aurora-teal); font-weight: 700; }

/* Checklist style */
ul.check, ul.checklist {
  list-style: none;
  padding-left: 0;
}
ul.check li, ul.checklist li {
  position: relative;
  padding-left: var(--s-6);
}
ul.check li::before, ul.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 22px;
  background: var(--grad-cyan-teal);
  color: #001018;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
  box-shadow: 0 0 12px rgba(0,255,163,0.3);
}

/* ==================  DETAILS / FAQ  ================== */
details {
  background: var(--grad-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-3);
  transition: border-color var(--t-fast);
}

details[open] {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow-cyan);
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  position: relative;
  padding-right: var(--s-6);
  font-size: 1.02rem;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(0,212,255,0.15);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aurora-cyan);
  font-weight: 900;
  transition: transform var(--t-med) var(--ease-out), background var(--t-fast);
}

details[open] summary::after {
  content: '−';
  transform: translateY(-50%) rotate(180deg);
  background: var(--grad-cyan-teal);
  color: #001018;
}

details > *:not(summary) { margin-top: var(--s-3); color: var(--text-secondary); }

/* ==================  BLOCKQUOTE / REVIEWS  ================== */
blockquote {
  border-left: 3px solid var(--aurora-cyan);
  background: linear-gradient(90deg, rgba(0,212,255,0.06) 0%, transparent 100%);
  padding: var(--s-4) var(--s-5);
  margin: var(--s-5) 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text-primary);
  font-style: italic;
  position: relative;
}
blockquote::before {
  content: '"';
  position: absolute;
  top: -10px; left: var(--s-3);
  font-size: 4rem;
  color: var(--aurora-cyan);
  opacity: 0.25;
  font-family: Georgia, serif;
  line-height: 1;
}

/* ==================  TOC  ================== */
.toc, nav.toc, aside.toc {
  background: var(--grad-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin: var(--s-5) 0;
}
.toc h2, .toc h3, nav.toc h2 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--aurora-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-left: 0;
}
.toc h2::before, nav.toc h2::before { display: none; }
.toc ol, .toc ul {
  counter-reset: toc;
  list-style: none;
  padding: 0;
}
.toc li {
  counter-increment: toc;
  padding: var(--s-2) 0;
  padding-left: var(--s-5);
  position: relative;
  border-bottom: 1px dashed rgba(120,180,255,0.08);
}
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--aurora-teal);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}
.toc li:last-child { border-bottom: none; }
.toc a { border-bottom: none; color: var(--text-secondary); font-weight: 500; }
.toc a:hover { color: var(--aurora-cyan); }

/* ==================  FOOTER  ================== */
body > footer {
  margin-top: var(--s-10);
  padding-top: var(--s-8);
  padding-bottom: var(--s-8);
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(180deg, transparent, rgba(5,8,22,0.8));
  color: var(--text-muted);
  font-size: 0.9rem;
}
body > footer a { color: var(--text-secondary); border-bottom: none; }
body > footer a:hover { color: var(--aurora-cyan); }

/* ==================  IMAGES  ================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-md);
}

.hero-img, .hero img {
  border-radius: var(--r-xl);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 80px rgba(0,212,255,0.15);
  margin: var(--s-6) auto;
  max-width: 720px;
}

/* Breadcrumbs */
.breadcrumbs, nav.breadcrumbs {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: var(--s-4);
  margin-bottom: var(--s-5);
}
.breadcrumbs a { color: var(--text-secondary); border-bottom: none; }
.breadcrumbs a:hover { color: var(--aurora-cyan); }

/* Horizontal rule */
hr {
  border: none;
  height: 1px;
  background: var(--grad-aurora);
  opacity: 0.3;
  margin: var(--s-7) 0;
}

/* Code */
code, kbd {
  font-family: var(--font-mono);
  background: rgba(0,212,255,0.08);
  border: 1px solid var(--border-soft);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--aurora-ice);
  font-size: 0.92em;
}

/* ==================  UTILITIES  ================== */
.text-center { text-align: center; }
.text-accent { color: var(--aurora-cyan); }
.text-gradient {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.muted { color: var(--text-muted); font-size: 0.88rem; }

/* ==================  PRINT  ================== */
@media print {
  body::before, body::after { display: none; }
  body { background: white; color: black; }
  .cta-sticky { display: none; }
}

/* ==================  WRAP / LAYOUT OVERRIDES  ================== */
.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--s-5);
  position: relative;
}
@media (max-width: 768px) {
  .wrap { padding: 0 var(--s-4); }
}

/* Override container rule — wrap is now the container */
body > .wrap > * {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* Top nav bar */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0 calc(var(--s-5) * -1) var(--s-5);
  padding: var(--s-4) var(--s-5);
  background: rgba(5, 8, 22, 0.75);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border-soft);
}
@media (max-width: 768px) {
  .topnav { margin: 0 calc(var(--s-4) * -1) var(--s-4); padding: var(--s-3) var(--s-4); }
}

.topnav-inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  max-width: 1440px;
  margin: 0 auto;
}

.topnav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  border-bottom: none !important;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  white-space: nowrap;
}
.topnav-logo::before {
  content: '';
  width: 28px; height: 28px;
  background: var(--grad-aurora);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(0,212,255,0.5);
  flex: 0 0 auto;
}
.topnav-logo span {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topnav-links {
  display: flex;
  gap: var(--s-5);
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.topnav-links::-webkit-scrollbar { display: none; }

.topnav-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  border-bottom: none !important;
  padding: var(--s-2) 0;
  position: relative;
  transition: color var(--t-fast);
}
.topnav-links a:hover { color: var(--text-primary); }
.topnav-links a.active { color: var(--aurora-cyan); }

.topnav-cta {
  margin-left: var(--s-4);
  padding: var(--s-2) var(--s-4);
  font-size: 0.9rem;
  min-height: 38px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.topnav-cta::after { display: none; }

@media (max-width: 920px) {
  .topnav-cta { display: none; }
}
@media (max-width: 640px) {
  .topnav-links { gap: var(--s-4); font-size: 0.86rem; }
  .topnav-logo { font-size: 1.05rem; }
}

/* Hero block — for homepage header */
body > .wrap > header.box {
  padding: var(--s-8) var(--s-6);
  text-align: center;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(0,212,255,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(139,92,246,0.12) 0%, transparent 50%),
    var(--grad-card);
  border: 1px solid var(--border-soft);
  margin-top: var(--s-5);
}

body > .wrap > header.box h1 {
  margin-bottom: var(--s-4);
}

body > .wrap > header.box .muted {
  font-size: 0.85rem;
  color: var(--aurora-teal);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--s-3);
}

/* Hero CTA row */
body > .wrap > header.box p:has(a.cta) {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: center;
  margin-top: var(--s-5);
}

/* Sticky bottom bar (existing .sticky structure) */
.sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: var(--s-3) 0;
  background: rgba(5, 8, 22, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-glow);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5), 0 -2px 24px rgba(0,212,255,0.15);
}

.sticky-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.sticky small {
  color: var(--text-muted);
  font-size: 0.82rem;
  flex: 1;
  min-width: 0;
}

.sticky .cta {
  padding: var(--s-3) var(--s-5);
  font-size: 0.95rem;
  min-height: 42px;
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .sticky-inner { padding: 0 var(--s-3); gap: var(--s-3); }
  .sticky small { font-size: 0.72rem; }
  .sticky .cta { padding: var(--s-2) var(--s-4); font-size: 0.88rem; }
}

body { padding-bottom: 80px; }

/* Footer box restyle */
body > .wrap > footer.box {
  background:
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 100%),
    var(--grad-card);
  text-align: left;
  margin-top: var(--s-9);
  color: var(--text-muted);
}
body > .wrap > footer.box p { margin-bottom: var(--s-3); font-size: 0.9rem; }
body > .wrap > footer.box a { color: var(--text-secondary); border-bottom: none; }
body > .wrap > footer.box a:hover { color: var(--aurora-cyan); }

/* vh class (visually hidden) — but keep breadcrumbs visible for schema, just minimize */
.vh {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: var(--s-3) 0;
  padding-left: 0;
}
.vh ol { display: flex; gap: var(--s-2); flex-wrap: wrap; padding: 0; list-style: none; }
.vh ol li { margin: 0; }
.vh ol li + li::before { content: '/ '; color: var(--text-muted); margin-right: var(--s-2); }
.vh a { color: var(--text-secondary); border-bottom: none; }

/* Hero image placeholder (for pages without image) */
.hero-visual {
  margin: var(--s-6) auto;
  max-width: 720px;
  aspect-ratio: 16/9;
  background:
    radial-gradient(circle at 30% 40%, rgba(0,212,255,0.3) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(139,92,246,0.3) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0,255,163,0.2) 0%, transparent 70%),
    linear-gradient(135deg, #0a0e27, #141a3f);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-card), 0 0 80px rgba(0,212,255,0.1);
  position: relative;
  overflow: hidden;
}

.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, rgba(165,243,252,0.8), transparent),
    radial-gradient(2px 2px at 70% 20%, white, transparent),
    radial-gradient(1px 1px at 85% 80%, rgba(0,255,163,0.8), transparent),
    radial-gradient(1.5px 1.5px at 55% 45%, white, transparent);
  opacity: 0.6;
}

/* Key stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-4);
  margin: var(--s-6) 0;
}
.stat {
  text-align: center;
  padding: var(--s-4);
  background: rgba(0,212,255,0.04);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  background: var(--grad-cyan-teal);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--s-2);
}

/* ==================  REVIEW STARS  ================== */
.stars, strong.stars {
  display: inline-block;
  color: transparent;
  background: linear-gradient(90deg, #ffd93d 0%, #ffa93d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
  font-size: 1em;
  text-shadow: 0 0 12px rgba(255, 200, 60, 0.4);
  margin-right: 4px;
}

/* Review cards nicer */
section .card p {
  line-height: 1.6;
}
section .card p strong:first-child:not(.stars) {
  color: var(--aurora-cyan);
}

/* Highlight author in reviews: text after em-dash */
/* Fallback for review author separator */
.review-author { color: var(--aurora-ice); font-weight: 600; }

/* ==================  IMAGES — PICTURE / HERO  ================== */
picture.hero-visual {
  display: block;
  margin: var(--s-6) auto 0;
  max-width: 720px;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 80px rgba(0,212,255,0.18);
  border: 1px solid var(--border-glow);
  position: relative;
}
picture.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}
picture.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(5,8,22,0.35) 100%);
  pointer-events: none;
}

/* ==================  GRID PATTERN BACKGROUND  ================== */
body {
  background:
    linear-gradient(var(--bg-deep), var(--bg-deep));
}

/* Thin grid overlay (between body::before aurora and body::after stars) */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 180, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: -1;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.15) 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.15) 70%, transparent 100%);
}

/* ==================  CATEGORY CARDS (games page)  ================== */
.category-grid .cat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-5);
}

.cat-card {
  display: block;
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--grad-card);
  transition: transform var(--t-med) var(--ease-out), border-color var(--t-med), box-shadow var(--t-med);
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: none !important;
}
.cat-card picture {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}
.cat-card picture img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-out);
  border-radius: 0;
}
.cat-card picture::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5,8,22,0.85) 100%);
}
.cat-card h3 {
  position: absolute;
  bottom: var(--s-5);
  left: var(--s-5);
  right: var(--s-5);
  margin: 0;
  color: var(--aurora-ice);
  font-size: 1.25rem;
  z-index: 2;
  padding-left: 0;
}
.cat-card h3::before { display: none; }
.cat-card p {
  position: absolute;
  bottom: var(--s-3);
  left: var(--s-5);
  right: var(--s-5);
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  z-index: 2;
}
.cat-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 16px 48px rgba(0,212,255,0.25);
}
.cat-card:hover picture img { transform: scale(1.08); }

/* ==================  DECORATIVE ROULETTE (lollipop-style)  ================== */
.deco-roulette {
  position: relative;
  display: block;
  width: 320px;
  height: 320px;
  margin: var(--s-8) auto;
  pointer-events: none;
}
.deco-roulette::before,
.deco-roulette::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.deco-roulette::before {
  background: conic-gradient(
    from 0deg,
    var(--aurora-cyan) 0deg 30deg,
    var(--aurora-violet) 30deg 60deg,
    var(--aurora-teal) 60deg 90deg,
    var(--aurora-pink) 90deg 120deg,
    var(--aurora-cyan) 120deg 150deg,
    var(--aurora-violet) 150deg 180deg,
    var(--aurora-teal) 180deg 210deg,
    var(--aurora-pink) 210deg 240deg,
    var(--aurora-cyan) 240deg 270deg,
    var(--aurora-violet) 270deg 300deg,
    var(--aurora-teal) 300deg 330deg,
    var(--aurora-pink) 330deg 360deg
  );
  filter: blur(0.5px);
  animation: spin 40s linear infinite;
  box-shadow: 0 0 60px rgba(0,212,255,0.4), 0 0 120px rgba(139,92,246,0.25);
  opacity: 0.85;
}
.deco-roulette::after {
  background:
    radial-gradient(circle at center, var(--bg-deep) 0%, var(--bg-deep) 35%, transparent 36%),
    radial-gradient(circle at center, transparent 48%, rgba(0,212,255,0.2) 50%, transparent 52%),
    radial-gradient(circle at center, transparent 58%, rgba(139,92,246,0.15) 60%, transparent 62%);
  box-shadow:
    inset 0 0 60px rgba(0,212,255,0.2);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .deco-roulette { width: 200px; height: 200px; margin: var(--s-6) auto; }
}

@media (prefers-reduced-motion: reduce) {
  .deco-roulette::before { animation: none; }
}

/* Decoration section with roulette centered */
.deco-section {
  text-align: center;
  padding: var(--s-8) var(--s-4);
  margin: var(--s-8) 0;
  position: relative;
}
.deco-section h2 {
  padding-left: 0;
  display: inline-block;
}
.deco-section h2::before { display: none; }
.deco-section p {
  max-width: 620px;
  margin: 0 auto var(--s-5);
}

/* Section stats row */
.stats-inline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
  margin: var(--s-6) 0;
  text-align: center;
}
.stats-inline > div {
  padding: var(--s-4);
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  backdrop-filter: blur(8px);
}
.stats-inline strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  background: var(--grad-cyan-teal);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}
.stats-inline span {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@media (max-width: 640px) {
  .stats-inline { grid-template-columns: repeat(2, 1fr); }
}
