/* =====================================================================
   mGBA Promotional Website - Main Stylesheet
   Theme: Retro Video Game / Neon Arcade (deep purple palette from logo)
   Domain: www.mgba.com.cn
   Standard: HTML5 / CSS3 / No JS-dependent critical layout
   ===================================================================== */

/* ---------- 1. Design Tokens ---------- */
:root {
  /* Brand palette (extracted from mGBA logo) */
  --c-deep-purple: #481890;
  --c-bright-purple: #6030c0;
  --c-neon-purple: #8b3fe0;
  --c-lavender: #c8a8ff;
  --c-magenta: #d640ff;

  /* Backgrounds */
  --c-bg: #0a0612;
  --c-bg-alt: #110820;
  --c-panel: #1a0f2e;
  --c-panel-2: #241339;
  --c-panel-glass: rgba(36, 19, 57, 0.72);

  /* Text */
  --c-text: #f0e6ff;
  --c-text-muted: #9d8bb5;
  --c-text-dim: #6f5d88;

  /* Accents */
  --c-cyan: #00e5ff;
  --c-gold: #ffc400;
  --c-green: #4ade80;
  --c-red: #ff5577;

  /* Typography */
  --f-pixel: 'Press Start 2P', 'JetBrains Mono', monospace;
  --f-display: 'Press Start 2P', 'Noto Sans SC', system-ui, sans-serif;
  --f-body: 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', 'Cascadia Mono', 'Consolas', monospace;

  /* Layout */
  --max-w: 1200px;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-glow: 0 0 24px rgba(139, 63, 224, 0.45);
  --shadow-glow-cyan: 0 0 24px rgba(0, 229, 255, 0.35);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  /* Effects */
  --grid-line: rgba(139, 63, 224, 0.08);
  --scanline: rgba(0, 0, 0, 0.18);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background-color: var(--c-bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(72, 24, 144, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(0, 229, 255, 0.10) 0%, transparent 50%),
    linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-alt) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Grid + scanline overlays on body */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 80%);
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, var(--scanline) 0px, var(--scanline) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
  z-index: 2;
  opacity: 0.4;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--c-lavender); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-cyan); }
ul, ol { padding-left: 1.4em; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--c-cyan); outline-offset: 2px; }

/* ---------- 3. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 5;
}
.section { padding: 88px 0; position: relative; }
.section--tight { padding: 56px 0; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(36,19,57,0.4) 20%, rgba(36,19,57,0.4) 80%, transparent); }

/* Pixel section divider (sawtooth) */
.pixel-divider {
  height: 12px;
  background-image:
    linear-gradient(135deg, var(--c-deep-purple) 25%, transparent 25%) -12px 0,
    linear-gradient(225deg, var(--c-deep-purple) 25%, transparent 25%) -12px 0,
    linear-gradient(315deg, var(--c-deep-purple) 25%, transparent 25%),
    linear-gradient(45deg, var(--c-deep-purple) 25%, transparent 25%);
  background-size: 24px 24px;
  background-color: transparent;
  margin: 0;
  opacity: 0.6;
}

/* ---------- 4. Typography ---------- */
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; color: var(--c-text); }
h1 { font-family: var(--f-display); font-size: clamp(2rem, 6vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-family: var(--f-display); font-size: clamp(1.5rem, 3.5vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; color: var(--c-lavender); }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
strong, b { color: #fff; font-weight: 700; }
code, kbd, samp { font-family: var(--f-mono); font-size: 0.92em; color: var(--c-cyan); background: rgba(0,229,255,0.08); padding: 0.1em 0.4em; border-radius: 4px; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-pixel);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-cyan);
  margin-bottom: 16px;
  padding: 6px 14px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 999px;
}
.section-eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--c-cyan);
  box-shadow: 0 0 8px var(--c-cyan);
  border-radius: 50%;
  animation: blink 1.6s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.section-title {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--c-text) 0%, var(--c-lavender) 60%, var(--c-neon-purple) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  max-width: 720px;
  margin-bottom: 48px;
}
.text-center { text-align: center; }
.text-center .section-subtitle { margin-left: auto; margin-right: auto; }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-pixel);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  line-height: 1;
}
.btn--primary {
  background: linear-gradient(135deg, var(--c-deep-purple), var(--c-bright-purple));
  color: #fff;
  border-color: var(--c-neon-purple);
  box-shadow: 0 4px 0 var(--c-deep-purple), var(--shadow-glow);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--c-deep-purple), 0 0 36px rgba(139, 63, 224, 0.7);
  color: #fff;
}
.btn--primary:active { transform: translateY(2px); box-shadow: 0 0 0 var(--c-deep-purple); }
.btn--ghost {
  background: rgba(36, 19, 57, 0.6);
  color: var(--c-lavender);
  border-color: var(--c-neon-purple);
}
.btn--ghost:hover { color: var(--c-cyan); border-color: var(--c-cyan); box-shadow: var(--shadow-glow-cyan); transform: translateY(-2px); }
.btn--cyan {
  background: rgba(0, 229, 255, 0.08);
  color: var(--c-cyan);
  border-color: var(--c-cyan);
}
.btn--cyan:hover { background: var(--c-cyan); color: var(--c-bg); box-shadow: var(--shadow-glow-cyan); }
.btn--lg { padding: 20px 36px; font-size: 0.82rem; }
.btn--block { display: flex; width: 100%; justify-content: center; }

/* ---------- 6. Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 6, 18, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(139, 63, 224, 0.3);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--c-text);
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand__logo { width: 38px; height: 38px; flex: none; }
.brand__text b { color: var(--c-lavender); }
.brand__text span { color: var(--c-cyan); }
.brand:hover { color: var(--c-text); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  font-family: var(--f-pixel);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
}
.nav__link:hover, .nav__link.is-active {
  color: var(--c-cyan);
  background: rgba(0, 229, 255, 0.08);
}
.nav__link.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 2px; background: var(--c-cyan); box-shadow: 0 0 8px var(--c-cyan);
}
.nav__cta {
  margin-left: 12px;
  font-size: 0.6rem;
  padding: 12px 18px;
}
.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--c-bg-alt);
    border-bottom: 1px solid rgba(139, 63, 224, 0.3);
    padding: 16px 24px;
    gap: 8px;
    align-items: stretch;
  }
  .nav.is-open .nav__link { padding: 12px 14px; text-align: left; }
  .nav__cta { margin-left: 0; }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-around;
    width: 36px; height: 36px;
    background: transparent;
    border: 1px solid rgba(139, 63, 224, 0.5);
    border-radius: var(--radius-sm);
  }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: var(--c-lavender); margin: auto; transition: var(--transition); }
}

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero__title {
  font-family: var(--f-display);
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  margin: 16px 0 22px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.hero__title .accent {
  background: linear-gradient(135deg, var(--c-neon-purple), var(--c-cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__title .version {
  display: inline-block;
  font-size: 0.4em;
  vertical-align: super;
  color: var(--c-cyan);
  background: rgba(0, 229, 255, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 229, 255, 0.3);
  margin-left: 12px;
}
.hero__subtitle {
  font-size: 1.1rem;
  color: var(--c-text-muted);
  max-width: 540px;
  margin-bottom: 32px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}
.hero__stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid rgba(139, 63, 224, 0.25);
}
.hero__stat .num {
  font-family: var(--f-pixel);
  font-size: 1.4rem;
  color: var(--c-cyan);
  display: block;
  margin-bottom: 6px;
}
.hero__stat .label {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  letter-spacing: 0.04em;
}
.hero__visual {
  position: relative;
  text-align: center;
}
.hero__visual img {
  max-width: 100%;
  filter: drop-shadow(0 12px 40px rgba(139, 63, 224, 0.5));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Floating badges around hero visual */
.hero__badges {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero__badge {
  position: absolute;
  font-family: var(--f-pixel);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  padding: 8px 12px;
  background: var(--c-panel-glass);
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: var(--radius-sm);
  color: var(--c-cyan);
  backdrop-filter: blur(8px);
  animation: pulse-glow 3s ease-in-out infinite;
}
.hero__badge--1 { top: 8%; left: -2%; }
.hero__badge--2 { top: 38%; right: -4%; animation-delay: 1s; }
.hero__badge--3 { bottom: 12%; left: 4%; animation-delay: 2s; }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 229, 255, 0.3); }
  50% { box-shadow: 0 0 24px rgba(0, 229, 255, 0.7); }
}

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__visual { order: -1; }
  .hero__badge { display: none; }
}

/* ---------- 8. Cards / Grids ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--c-panel);
  border: 1px solid rgba(139, 63, 224, 0.25);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(139, 63, 224, 0.08) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover {
  border-color: rgba(0, 229, 255, 0.5);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}
.card:hover::before { opacity: 1; }
.card__icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(72, 24, 144, 0.5), rgba(0, 229, 255, 0.15));
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  color: var(--c-cyan);
}
.card__icon svg { width: 28px; height: 28px; }
.card__title {
  font-family: var(--f-display);
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--c-lavender);
  letter-spacing: 0;
}
.card__text {
  font-size: 0.92rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}
.card__tag {
  display: inline-block;
  font-family: var(--f-pixel);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-cyan);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

/* ---------- 9. Feature spotlight (large horizontal block) ---------- */
.spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px;
  background: linear-gradient(135deg, var(--c-panel) 0%, var(--c-panel-2) 100%);
  border: 1px solid rgba(139, 63, 224, 0.3);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.spotlight::after {
  content: "";
  position: absolute; right: -100px; top: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.15), transparent 70%);
  pointer-events: none;
}
.spotlight + .spotlight { margin-top: 32px; }
.spotlight--reverse .spotlight__visual { order: -1; }
.spotlight__visual {
  background: var(--c-bg);
  border: 1px solid rgba(139, 63, 224, 0.4);
  border-radius: var(--radius);
  padding: 24px;
  font-family: var(--f-mono);
  font-size: 0.82rem;
  color: var(--c-lavender);
  position: relative;
  min-height: 240px;
}
.spotlight__title {
  font-family: var(--f-display);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  margin: 16px 0 18px;
  color: var(--c-text);
}
.spotlight__text { color: var(--c-text-muted); margin-bottom: 18px; }
.spotlight__list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}
.spotlight__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--c-text);
}
.spotlight__list li::before {
  content: "►";
  color: var(--c-cyan);
  flex: none;
  font-size: 0.7em;
  margin-top: 0.4em;
}

@media (max-width: 880px) {
  .spotlight { grid-template-columns: 1fr; padding: 28px; gap: 24px; }
  .spotlight--reverse .spotlight__visual { order: 0; }
}

/* ---------- 10. Scene (usage scenario) grid ---------- */
.scene {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(139, 63, 224, 0.25);
  background: var(--c-panel);
  transition: all var(--transition);
}
.scene:hover { border-color: rgba(0, 229, 255, 0.6); transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.scene__img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  border-bottom: 1px solid rgba(139, 63, 224, 0.3);
  filter: saturate(1.1);
}
.scene__body { padding: 22px; }
.scene__title {
  font-family: var(--f-display);
  font-size: 0.95rem;
  color: var(--c-lavender);
  margin-bottom: 8px;
}
.scene__text { font-size: 0.86rem; color: var(--c-text-muted); line-height: 1.55; }

/* ---------- 11. Reviews ---------- */
.review {
  background: var(--c-panel);
  border: 1px solid rgba(139, 63, 224, 0.25);
  border-left: 3px solid var(--c-neon-purple);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  transition: all var(--transition);
}
.review:hover { border-left-color: var(--c-cyan); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.review__stars { color: var(--c-gold); letter-spacing: 4px; margin-bottom: 14px; font-size: 0.95rem; }
.review__text {
  font-size: 0.95rem;
  color: var(--c-text);
  line-height: 1.7;
  margin-bottom: 18px;
  font-style: italic;
}
.review__author { display: flex; align-items: center; gap: 12px; }
.review__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-deep-purple), var(--c-cyan));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-pixel); font-size: 0.7rem; color: #fff;
  flex: none;
}
.review__name { font-weight: 700; font-size: 0.92rem; color: var(--c-lavender); }
.review__meta { font-size: 0.78rem; color: var(--c-text-muted); }

/* ---------- 12. Download Center ---------- */
.platform-card {
  background: var(--c-panel);
  border: 1px solid rgba(139, 63, 224, 0.3);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.platform-card:hover {
  border-color: var(--c-neon-purple);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}
.platform-card__head {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px dashed rgba(139, 63, 224, 0.3);
  margin-bottom: 18px;
}
.platform-card__icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(72, 24, 144, 0.5), rgba(0, 229, 255, 0.1));
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-sm);
  color: var(--c-cyan);
  flex: none;
}
.platform-card__icon svg { width: 26px; height: 26px; }
.platform-card__title { font-family: var(--f-display); font-size: 1rem; color: var(--c-text); }
.platform-card__sub { font-size: 0.78rem; color: var(--c-text-muted); margin-top: 2px; }
.platform-card__list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.platform-card__list li {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.86rem; padding: 6px 0;
  border-bottom: 1px solid rgba(139, 63, 224, 0.1);
}
.platform-card__list li:last-child { border-bottom: none; }
.platform-card__list .size { color: var(--c-text-muted); font-family: var(--f-mono); font-size: 0.78rem; }
.platform-card__list a { color: var(--c-lavender); }
.platform-card__list a:hover { color: var(--c-cyan); }

/* ---------- 13. Download Modal ---------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(10, 6, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal.is-open { display: flex; animation: fadeIn 0.2s;   left: 0;
  right: 0;
  top: 0;
  bottom: 0;}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
button { outline: none } 
.modal__panel {
  background: linear-gradient(135deg, var(--c-panel) 0%, var(--c-panel-2) 100%);
  border: 1px solid var(--c-neon-purple);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 720px;
  width: 100%;
  position: relative;
  box-shadow: 0 0 60px rgba(139, 63, 224, 0.5);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(139, 63, 224, 0.4);
  border-radius: 50%;
  color: var(--c-text-muted);
  transition: all var(--transition);
}
.modal__close:hover { color: var(--c-red); border-color: var(--c-red); transform: rotate(90deg); }

.modal__title {
  font-family: var(--f-display);
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--c-text);
}
.modal__sub {
  color: var(--c-text-muted);
  margin-bottom: 28px;
  font-size: 0.92rem;
}

.qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
@media (max-width: 560px) { .qr-grid { grid-template-columns: 1fr; } }

.qr-tile {
  text-align: center;
  padding: 22px 16px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius);
  border: 2px solid var(--c-neon-purple);
  position: relative;
}
.qr-tile__img {
  width: 200px; height: 200px;
  margin: 0 auto 14px;
  display: block;
  image-rendering: pixelated;
}
.qr-tile__label {
  font-family: var(--f-pixel);
  font-size: 0.7rem;
  color: var(--c-deep-purple);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.qr-tile__hint {
  font-size: 0.78rem;
  color: #555;
}

.modal__cta {
  display: flex; gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px dashed rgba(139, 63, 224, 0.3);
}
.modal__note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--c-text-dim);
  margin-top: 16px;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, transparent 0%, rgba(16, 8, 28, 0.95) 30%);
  border-top: 1px solid rgba(139, 63, 224, 0.3);
  padding: 64px 0 24px;
  position: relative;
  z-index: 5;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 880px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__brand-block {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.footer__brand-block img { width: 44px; height: 44px; }
.footer__brand-text { font-family: var(--f-display); font-size: 1.2rem; color: var(--c-lavender); }
.footer__desc { color: var(--c-text-muted); font-size: 0.9rem; margin-bottom: 16px; }
.footer__social { display: flex; gap: 10px; }
.footer__social a {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(139, 63, 224, 0.4);
  border-radius: var(--radius-sm);
  color: var(--c-text-muted);
  transition: all var(--transition);
}
.footer__social a:hover { color: var(--c-cyan); border-color: var(--c-cyan); }
.footer__social svg { width: 18px; height: 18px; }

.footer__col h4 {
  font-family: var(--f-pixel);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-cyan);
  margin-bottom: 16px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer__col a { color: var(--c-text-muted); font-size: 0.88rem; }
.footer__col a:hover { color: var(--c-lavender); }

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(139, 63, 224, 0.2);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--c-text-dim);
}
.footer__bottom a { color: var(--c-text-muted); }

/* ---------- 15. Misc utility blocks ---------- */
.breadcrumb { font-size: 0.82rem; color: var(--c-text-muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb a:hover { color: var(--c-cyan); }
.breadcrumb span { margin: 0 8px; color: var(--c-text-dim); }

.callout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 36px 40px;
  background: linear-gradient(135deg, rgba(72, 24, 144, 0.4), rgba(0, 229, 255, 0.1));
  border: 1px solid var(--c-neon-purple);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.callout::before {
  content: "";
  position: absolute; right: -50px; top: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.2), transparent 70%);
}
@media (max-width: 720px) { .callout { grid-template-columns: 1fr; padding: 28px; } }
.callout__title {
  font-family: var(--f-display);
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.callout__text { color: var(--c-text-muted); font-size: 0.95rem; }

/* Definition list (FAQ / FAQ-like) */
.faq { display: grid; gap: 14px; }
.faq__item {
  background: var(--c-panel);
  border: 1px solid rgba(139, 63, 224, 0.25);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq__q {
  width: 100%;
  text-align: left;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  font-weight: 700;
  color: var(--c-text);
  font-size: 0.98rem;
}
.faq__q .toggle { color: var(--c-cyan); transition: transform var(--transition); }
.faq__item.is-open .toggle { transform: rotate(45deg); }
.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 24px;
  color: var(--c-text-muted);
}
.faq__item.is-open .faq__a { max-height: 500px; padding: 0 24px 20px; }

/* Page hero (interior pages) */
.page-hero {
  padding: 64px 0 40px;
  text-align: center;
  position: relative;
}
.page-hero__eyebrow { margin: 0 auto 16px; }
.page-hero__title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--c-text), var(--c-lavender), var(--c-neon-purple));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.page-hero__subtitle {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  max-width: 720px;
  margin: 0 auto;
}

/* Steps (for guide page) */
.steps { display: grid; gap: 24px; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  align-items: start;
  padding: 24px;
  background: var(--c-panel);
  border: 1px solid rgba(139, 63, 224, 0.25);
  border-radius: var(--radius);
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--f-pixel);
  font-size: 1.4rem;
  color: var(--c-cyan);
  background: linear-gradient(135deg, rgba(72, 24, 144, 0.5), rgba(0, 229, 255, 0.1));
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-sm);
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
}
.step__title { font-family: var(--f-display); font-size: 1rem; color: var(--c-lavender); margin-bottom: 8px; }
.step__text { color: var(--c-text-muted); font-size: 0.92rem; }
@media (max-width: 560px) { .step { grid-template-columns: 1fr; gap: 12px; } .step::before { width: 48px; height: 48px; font-size: 1rem; } }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid rgba(139, 63, 224, 0.3); border-radius: var(--radius); }
table.cmp {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 560px;
}
table.cmp th, table.cmp td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(139, 63, 224, 0.15);
}
table.cmp thead th {
  background: var(--c-panel-2);
  font-family: var(--f-pixel);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-cyan);
}
table.cmp tbody tr:hover { background: rgba(139, 63, 224, 0.08); }
table.cmp .yes { color: var(--c-green); font-weight: 700; }
table.cmp .no { color: var(--c-text-dim); }
table.cmp td:first-child { color: var(--c-lavender); font-weight: 600; }

/* Terminal / code block */
.terminal {
  background: #0a0414;
  border: 1px solid rgba(139, 63, 224, 0.4);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-family: var(--f-mono);
  font-size: 0.86rem;
  color: var(--c-lavender);
  position: relative;
  overflow-x: auto;
}
.terminal::before {
  content: "● ● ●";
  display: block;
  color: rgba(255, 85, 119, 0.5);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}
.terminal .prompt { color: var(--c-cyan); }
.terminal .comment { color: var(--c-text-dim); font-style: italic; }
.terminal .ok { color: var(--c-green); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-pixel);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid;
}
.badge--cyan { color: var(--c-cyan); border-color: rgba(0,229,255,0.4); background: rgba(0,229,255,0.06); }
.badge--gold { color: var(--c-gold); border-color: rgba(255,196,0,0.4); background: rgba(255,196,0,0.06); }
.badge--green { color: var(--c-green); border-color: rgba(74,222,128,0.4); background: rgba(74,222,128,0.06); }
.badge--purple { color: var(--c-lavender); border-color: rgba(200,168,255,0.4); background: rgba(200,168,255,0.06); }

/* Aspect-ratio fallback for older browsers (we use modern, but provide min-height) */
.scene__img { min-height: 180px; }

/* Selection */
::selection { background: var(--c-neon-purple); color: #fff; }

/* Skip-link for accessibility */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--c-bg-alt); color: var(--c-cyan);
  padding: 12px 20px; z-index: 999;
  font-family: var(--f-pixel); font-size: 0.7rem;
}
.skip-link:focus { left: 0; }
