/* ═══════════════════════════════════════════════════════════
   51Switch — Design System CSS
   ═══════════════════════════════════════════════════════════ */

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  /* Color */
  --clr-bg:          #080c12;
  --clr-surface:     #0d1117;
  --clr-surface-2:   #161b22;
  --clr-surface-3:   #1c2333;
  --clr-border:      rgba(255,255,255,.08);
  --clr-border-hi:   rgba(255,255,255,.15);

  --clr-primary:     #f02c2c;
  --clr-primary-hi:  #f87171;
  --clr-primary-lo:  #b91c1c;
  --clr-accent:      #ef4444;
  --clr-accent-2:    #f87171;

  --clr-text:        #e2e8f0;
  --clr-text-muted:  #8b949e;
  --clr-text-faint:  #4b5563;

  /* Windows, macOS, Android brand colors */
  --clr-win:   #0078d4;
  --clr-mac:   #a855f7;
  --clr-and:   #3ddc84;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-accent) 100%);
  --grad-glow:    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(240,44,44,.4), transparent);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;
  --sp-4: 1rem;    --sp-6: 1.5rem;  --sp-8: 2rem;
  --sp-10: 2.5rem; --sp-12: 3rem;   --sp-16: 4rem;
  --sp-20: 5rem;   --sp-24: 6rem;   --sp-32: 8rem;

  /* Radii */
  --r-sm: .375rem; --r-md: .625rem; --r-lg: 1rem;
  --r-xl: 1.5rem;  --r-2xl: 2rem;   --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:  0 20px 60px rgba(0,0,0,.6);
  --shadow-glow:0 0 40px rgba(240,44,44,.35);

  /* Transitions */
  --t-fast:   150ms ease;
  --t-normal: 300ms ease;
  --t-slow:   500ms cubic-bezier(.4,0,.2,1);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; }
ul { list-style: none; }
:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── Canvas BG ───────────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .6;
}

/* ── Layout helpers ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
@media (max-width: 640px) {
  .container { padding-inline: var(--sp-4); }
}

/* ── Typography ──────────────────────────────────────────── */
.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-primary-hi);
  margin-bottom: var(--sp-3);
}
.section-title {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  color: var(--clr-text);
  margin-bottom: var(--sp-4);
}
.section-sub {
  font-size: 1.0625rem;
  color: var(--clr-text-muted);
  max-width: 520px;
}
.section-header {
  text-align: center;
  margin-bottom: var(--sp-12);
}
.section-header .section-sub { margin-inline: auto; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1;
  padding: .75rem 1.625rem;
  transition: all var(--t-normal);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.12);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(240,44,44,.5);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(240,44,44,.65);
}

.btn-ghost {
  background: transparent;
  color: var(--clr-text);
  border: 1px solid var(--clr-border-hi);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary-hi);
  transform: translateY(-2px);
}

.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; }
.btn-sm { padding: .5rem 1rem; font-size: .875rem; }

/* ── Navigation ──────────────────────────────────────────── */
.nav-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--t-normal), backdrop-filter var(--t-normal), border-color var(--t-normal);
  border-bottom: 1px solid transparent;
}
.nav-header.scrolled {
  background: rgba(8,12,18,.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-color: var(--clr-border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  height: 68px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 1.25rem;
  font-weight: 700;
}
.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px rgba(0, 195, 227, 0.4));
}
.logo-icon svg {
  display: block;
}
.logo-text { letter-spacing: -.02em; }
.logo-text strong { color: var(--clr-primary-hi); }

.nav-links {
  display: flex;
  gap: var(--sp-6);
  margin-left: auto;
}
.nav-links a {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color var(--t-fast);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
  transform: scaleX(0);
  transition: transform var(--t-fast);
}
.nav-links a:hover { color: var(--clr-text); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta { margin-left: var(--sp-4); }
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: var(--sp-2);
}
.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--clr-text);
  border-radius: var(--r-full);
  transition: all var(--t-normal);
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  background: rgba(8,12,18,.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--clr-border);
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--t-slow);
}
.nav-drawer.open { max-height: 400px; }
.drawer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6);
}
.drawer-links a {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color var(--t-fast);
}
.drawer-links a:hover { color: var(--clr-text); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta { 
    display: flex; 
    margin-left: auto;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
  .nav-burger { display: none; }
  .nav-drawer { display: none; }
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 68px;
  padding-inline: clamp(var(--sp-6), 8vw, var(--sp-24));
  overflow: hidden;
  z-index: 1;
}
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: -1;
}
.hero-glow--left  { top: -100px; left: -150px; background: radial-gradient(circle, rgba(240,44,44,.3), transparent 70%); }
.hero-glow--right { bottom: -200px; right: -100px; background: radial-gradient(circle, rgba(239,68,68,.2), transparent 70%); }

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: var(--sp-20);
  padding-bottom: var(--sp-20);
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(240,44,44,.12);
  border: 1px solid rgba(240,44,44,.3);
  border-radius: var(--r-full);
  padding: .375rem 1rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--clr-primary-hi);
  margin-bottom: var(--sp-6);
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--clr-primary-hi);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--clr-primary-hi);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(.85); }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.04em;
  margin-bottom: var(--sp-6);
}
.hero-desc {
  font-size: 1.125rem;
  color: var(--clr-text-muted);
  max-width: 560px;
  margin-bottom: var(--sp-8);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-10);
  justify-content: center;
}
.platform-badges {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: center;
}
.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  padding: .35rem .875rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: all var(--t-fast);
}
.platform-tag:hover {
  border-color: var(--clr-primary);
  color: var(--clr-text);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero-content {
    gap: var(--sp-10);
  }
  .hero-left {
    padding-right: var(--sp-4);
  }
}

@media (max-width: 960px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
    padding-top: var(--sp-16);
    padding-bottom: var(--sp-16);
    justify-items: center;
  }

  .hero-left {
    max-width: 100%;
    justify-self: center;
    padding-right: 0;
    text-align: center;
    align-items: center;
  }

  .hero-image {
    max-width: 100%;
    order: -1;
  }
}

@media (max-width: 500px) {
  .hero-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }
  .hero-desc {
    max-width: 100%;
  }
  .hero-image img {
    border-radius: var(--r-lg);
  }
}

/* ── Hero Device Mock ───────────────────────────────────── */
.hero-device {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--sp-8) 0;
  animation: float 6s ease-in-out infinite;
}

.hero-screenshot {
  position: relative;
  max-width: 680px;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow:
    0 50px 100px rgba(0,0,0,.55),
    0 0 0 1px rgba(240,44,44,.2);
}
.hero-screenshot img {
  width: 100%;
  height: auto;
  max-height: 580px;
  object-fit: contain;
  display: block;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

.device-frame {
  width: 420px;
  background: var(--clr-surface-2);
  border-radius: 18px;
  border: 1px solid var(--clr-border-hi);
  box-shadow: var(--shadow-lg), 0 0 80px rgba(240,44,44,.2), inset 0 1px 0 rgba(255,255,255,.06);
  overflow: hidden;
  position: relative;
}
.device-frame::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(240,44,44,.4), transparent 40%, rgba(239,68,68,.2));
  z-index: -1;
}
.device-screen { padding: 0; overflow: hidden; }
.screen-content {
  display: grid;
  grid-template-rows: 36px 1fr;
  grid-template-columns: 56px 1fr;
  min-height: 280px;
  background: var(--clr-surface);
}
.screen-topbar {
  grid-column: 1/-1;
  background: var(--clr-surface-2);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-bottom: 1px solid var(--clr-border);
}
.screen-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.screen-dot:nth-child(1) { background: #ff5f57; }
.screen-dot:nth-child(2) { background: #febc2e; }
.screen-dot:nth-child(3) { background: #28c840; }

.screen-sidebar {
  background: var(--clr-surface-2);
  border-right: 1px solid var(--clr-border);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-item {
  height: 32px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.06);
}
.sidebar-item.active { background: rgba(240,44,44,.3); }

.screen-main { padding: 14px; overflow: hidden; }
.screen-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.header-title { width: 90px; height: 14px; background: rgba(255,255,255,.15); border-radius: 4px; }
.header-btn   { width: 50px; height: 22px; background: rgba(240,44,44,.4); border-radius: var(--r-full); }

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.game-card {
  aspect-ratio: 3/4;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.gc-1 { background: linear-gradient(135deg,#7c3aed,#4f46e5); }
.gc-2 { background: linear-gradient(135deg,#0891b2,#0e7490); }
.gc-3 { background: linear-gradient(135deg,#be185d,#9d174d); }
.gc-4 { background: linear-gradient(135deg,#047857,#065f46); }
.gc-5 { background: linear-gradient(135deg,#b45309,#92400e); }
.gc-6 { background: linear-gradient(135deg,#1d4ed8,#1e40af); }
.gc-label {
  position: absolute;
  bottom: 5px; left: 5px; right: 5px;
  height: 8px;
  background: rgba(255,255,255,.2);
  border-radius: 3px;
}

.stats-bar {
  display: flex;
  gap: 8px;
}
.stat-item {
  flex: 1;
  background: rgba(255,255,255,.04);
  border-radius: 6px;
  padding: 6px 8px;
}
.stat-num { height: 12px; background: rgba(240,44,44,.5); border-radius: 3px; margin-bottom: 4px; }
.stat-lbl { height: 8px; background: rgba(255,255,255,.08); border-radius: 3px; }

/* Floating badges */
.float-badge {
  position: absolute;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-lg);
  padding: .5rem .875rem;
  font-size: .8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.float-badge span { font-size: 1.1rem; }
.fb-1 { top: 12%; right: -30px; animation: floatBadge1 4s ease-in-out infinite; }
.fb-2 { bottom: 30%; left: -40px; animation: floatBadge2 5s ease-in-out infinite .8s; }
.fb-3 { top: 45%; right: -40px; animation: floatBadge1 4.5s ease-in-out infinite 1.5s; }
.fb-4 { top: 28%; left: -50px; animation: floatBadge2 4.2s ease-in-out infinite .5s; }
.fb-5 { bottom: 15%; right: -60px; animation: floatBadge1 5.2s ease-in-out infinite 2s; }
.fb-6 { top: 65%; left: -30px; animation: floatBadge2 4.8s ease-in-out infinite 1.2s; }
@keyframes floatBadge1 {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}
@keyframes floatBadge2 {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-10px) rotate(-1deg); }
}

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; text-align: center; min-height: auto; padding-top: 100px; }
  .hero-content { padding-bottom: 0; }
  .hero-desc, .platform-badges { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .platform-badges { justify-content: center; }
  .hero-device { padding-top: var(--sp-8); }
  .device-frame { width: 340px; }
  .fb-1 { right: 0; }
  .fb-2 { left: 0; }
  .fb-3 { right: 0; }
  .fb-4 { left: 0; }
  .fb-5 { right: 0; }
  .fb-6 { left: 0; }
}
@media (max-width: 480px) {
  .device-frame { width: 280px; }
  .float-badge { display: none; }
}

/* ── Stats Ticker ────────────────────────────────────────── */
.stats-ticker {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  background: var(--clr-surface);
  overflow: hidden;
}
.ticker-inner {
  display: flex;
  gap: var(--sp-16);
  padding: var(--sp-5) 0;
  white-space: nowrap;
  animation: ticker 25s linear infinite;
  width: max-content;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-6);
  flex-shrink: 0;
}
.ticker-stat {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.ticker-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ticker-label {
  font-size: .875rem;
  color: var(--clr-text-muted);
  font-weight: 500;
}
.ticker-divider {
  width: 4px; height: 4px;
  background: var(--clr-text-faint);
  border-radius: 50%;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Features ────────────────────────────────────────────── */
.features-section {
  position: relative;
  z-index: 1;
  padding: var(--sp-32) 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.feature-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--r-xl);
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--t-normal);
  z-index: -1;
}
.feature-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--r-xl) - 2px);
  background: var(--clr-surface);
  z-index: -1;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-glow); }
.feature-card:hover::before { opacity: .8; }

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--sp-4);
  display: block;
  color: var(--clr-primary);
  filter: drop-shadow(0 4px 12px rgba(240,44,44,.4));
  transition: transform var(--t-normal);
}
.feature-icon svg {
  width: 100%;
  height: 100%;
}
.feature-card:hover .feature-icon { transform: scale(1.15) rotate(-5deg); }

.feature-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--sp-2);
  letter-spacing: -.01em;
}
.feature-desc {
  font-size: .9375rem;
  color: var(--clr-text-muted);
  line-height: 1.65;
}

@media (max-width: 1024px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .features-grid { grid-template-columns: 1fr; } }

/* ── Showcase strip ──────────────────────────────────────── */
.showcase-section {
  position: relative;
  z-index: 1;
  padding: var(--sp-32) 0;
  overflow: hidden;
}
.showcase-strip {
  margin-top: var(--sp-8);
  overflow: visible;
  padding: 20px 0;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}
.strip-track {
  display: flex;
  gap: var(--sp-6);
  width: max-content;
  animation: scrollTrack 30s linear infinite;
  padding: 10px;
}
.strip-track:hover { animation-play-state: paused; }
@keyframes scrollTrack {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Screenshots */
.screenshot {
  flex-shrink: 0;
  width: 600px;
  height: 375px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform var(--t-normal), box-shadow var(--t-normal);
  border: 1px solid var(--clr-border-hi);
  background: var(--clr-surface-2);
  cursor: zoom-in;
  position: relative;
}
.screenshot:hover { 
  transform: scale(1.05); 
  box-shadow: var(--shadow-glow), 0 25px 50px rgba(0,0,0,0.5);
  z-index: 10;
}

/* Mobile: smaller screenshots */
@media (max-width: 768px) {
  .screenshot {
    width: 320px;
    height: 200px;
    border-radius: 10px;
  }
}
@media (max-width: 480px) {
  .screenshot {
    width: 260px;
    height: 162px;
    border-radius: 8px;
  }
}

.screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox for full image view */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 40px;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.lightbox.active img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 24px;
  color: #fff;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border-hi);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--clr-primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: var(--shadow-md);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--clr-primary);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* Mobile: adjust back-to-top position */
@media (max-width: 640px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

/* Screen mocks (legacy, keep for compatibility) */
.screen-mock {
  flex-shrink: 0;
  width: 500px;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border-hi);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform var(--t-normal), box-shadow var(--t-normal);
}
.screen-mock:hover { transform: scale(1.03); box-shadow: var(--shadow-glow); }

.sm-topbar {
  background: var(--clr-surface-3);
  height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-bottom: 1px solid var(--clr-border);
}
.sm-topbar span {
  width: 10px; height: 10px; border-radius: 50%;
}
.sm-topbar span:nth-child(1) { background: #ff5f57; }
.sm-topbar span:nth-child(2) { background: #febc2e; }
.sm-topbar span:nth-child(3) { background: #28c840; }

.sm-body { display: flex; height: 300px; }
.sm-sidebar {
  width: 56px;
  background: var(--clr-surface-3);
  border-right: 1px solid var(--clr-border);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sm-sidebar.dark { background: #0a0c12; }
.sm-nav-item { height: 30px; border-radius: 8px; background: rgba(255,255,255,.06); }
.sm-nav-item.active { background: rgba(240,44,44,.35); }

.sm-content { flex: 1; padding: 16px; overflow: hidden; }
.sm-content.full { padding: 16px; }

.sm-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sm-h1 { height: 16px; width: 70%; background: rgba(255,255,255,.15); border-radius: 4px; }
.sm-h1.w50 { width: 50%; }
.sm-pill { height: 20px; width: 60px; background: rgba(240,44,44,.35); border-radius: var(--r-full); }
.sm-search { height: 24px; width: 120px; background: rgba(255,255,255,.07); border-radius: var(--r-full); }

.sm-card-row { display: flex; gap: 10px; margin-bottom: 14px; }
.sm-big-card {
  flex: 1; height: 100px; border-radius: 10px;
}
.sm-big-card.c1 { background: linear-gradient(135deg,#dc2626,#f02c2c); }
.sm-big-card.c2 { background: linear-gradient(135deg,#b91c1c,#ef4444); }
.sm-big-card.c3 { background: linear-gradient(135deg,#b91c1c,#f87171); }

.sm-subtitle { height: 12px; width: 55%; background: rgba(255,255,255,.1); border-radius: 4px; margin-bottom: 12px; }
.sm-small-list { display: flex; flex-direction: column; gap: 8px; }
.sm-list-row { height: 10px; background: rgba(255,255,255,.07); border-radius: 4px; }
.sm-list-row.w60 { width: 60%; }

/* Chart */
.sm-chart-area {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 140px;
  background: rgba(255,255,255,.03);
  border-radius: 10px;
  padding: 16px 14px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--clr-border);
}
.chart-bar {
  flex: 1;
  height: var(--h, 50%);
  background: var(--grad-primary);
  border-radius: 4px 4px 0 0;
  opacity: .8;
  animation: barGrow 1.5s ease-out both;
}
@keyframes barGrow {
  from { height: 0; }
  to { height: var(--h, 50%); }
}
.sm-stat-row { display: flex; gap: 10px; }
.sm-stat-card { flex: 1; height: 50px; background: rgba(255,255,255,.04); border-radius: 8px; border: 1px solid var(--clr-border); }

/* Game grid */
.sm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sg-item { aspect-ratio: 3/4; border-radius: 8px; }
.gi-1 { background: linear-gradient(135deg,#dc2626,#f87171); }
.gi-2 { background: linear-gradient(135deg,#b91c1c,#f87171); }
.gi-3 { background: linear-gradient(135deg,#b91c1c,#fca5a5); }
.gi-4 { background: linear-gradient(135deg,#991b1b,#fca5a5); }
.gi-5 { background: linear-gradient(135deg,#991b1b,#fecaca); }
.gi-6 { background: linear-gradient(135deg,#f02c2c,#f87171); }

/* Profile mock */
.sm-profile-area { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--clr-border); }
.sm-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--grad-primary); flex-shrink: 0; }
.sm-profile-info { flex: 1; }
.sm-profile-info div:first-child { height: 13px; width: 80%; background: rgba(255,255,255,.18); border-radius: 4px; margin-bottom: 6px; }
.sm-profile-info div:last-child  { height: 10px; width: 55%; background: rgba(255,255,255,.08); border-radius: 4px; }
.sm-settings-list { display: flex; flex-direction: column; gap: 10px; }
.sm-setting-row { height: 36px; background: rgba(255,255,255,.04); border-radius: 8px; border: 1px solid var(--clr-border); }

/* ── Download Section ────────────────────────────────────── */
.download-section {
  position: relative;
  z-index: 1;
  padding: var(--sp-32) 0;
  overflow: hidden;
}
.download-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(240,44,44,.12), transparent 60%);
  pointer-events: none;
}

.download-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
  margin-bottom: var(--sp-10);
}

.dl-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-2xl);
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}
.dl-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--dl-color, var(--grad-primary));
  opacity: 0;
  transition: opacity var(--t-normal);
}
.dl-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg), 0 0 40px rgba(240,44,44,.15); }
.dl-card:hover::before { opacity: 1; }

.dl-card-badge {
  position: absolute;
  top: var(--sp-4); right: var(--sp-4);
  background: var(--dl-color, var(--clr-primary));
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: var(--r-full);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dl-card-icon {
  width: 72px; height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--clr-border);
  font-size: 2rem;
  margin-bottom: var(--sp-2);
  transition: all var(--t-normal);
}
.dl-card:hover .dl-card-icon {
  background: transparent;
  border-color: var(--dl-color);
  transform: scale(1.1);
}

.dl-card-platform {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.dl-card-version {
  font-family: var(--font-mono);
  font-size: .8125rem;
  color: var(--clr-text-muted);
  background: var(--clr-surface-2);
  padding: .2rem .6rem;
  border-radius: var(--r-full);
  border: 1px solid var(--clr-border);
  transition: all var(--t-normal);
}
.dl-card:hover .dl-card-version {
  border-color: var(--dl-color);
  color: var(--dl-color);
}
.dl-card-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  text-align: center;
}
.dl-card-info span {
  font-size: .8125rem;
  color: var(--clr-text-muted);
}
.dl-card-info strong { color: var(--clr-text-muted); font-weight: 500; }

.dl-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  justify-content: center;
  width: 100%;
  padding: .875rem;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: .9375rem;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border-hi);
  color: var(--clr-text);
  transition: all var(--t-normal);
  margin-top: auto;
}
.dl-card:hover .dl-btn-active {
  background: var(--dl-color);
  border-color: transparent;
  color: #fff;
}

/* 并排下载按钮组 */
.dl-btn-group {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  margin-top: auto;
}
.dl-btn-half {
  flex: 1;
  padding: 0.875rem 0.5rem;
  font-size: 0.9375rem;
}
.dl-btn-half svg {
  width: 18px;
  height: 18px;
}
.dl-btn svg { flex-shrink: 0; }

.dl-btn-disabled {
  background: rgba(255,255,255,.03);
  border-color: var(--clr-border);
  color: var(--clr-text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}
.dl-btn-disabled:hover {
  background: rgba(255,255,255,.03);
  border-color: var(--clr-border);
  color: var(--clr-text-muted);
  box-shadow: none;
  transform: none;
}

/* 安装帮助文字链接样式 */
.dl-link-help {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #4691e5;
  text-decoration: none;
  transition: color var(--t-fast);
}
.dl-link-help:hover {
  color: #6aa8f0;
}

.version-note {
  text-align: center;
  font-size: .875rem;
  color: var(--clr-text-faint);
}
.version-note a { color: var(--clr-primary-hi); text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color var(--t-fast); }
.version-note a:hover { text-decoration-color: currentColor; }

@media (max-width: 1024px) {
  .download-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .download-cards { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
}

/* ── Testimonials ────────────────────────────────────────── */
.testimonials-section {
  position: relative;
  z-index: 1;
  padding: var(--sp-32) 0;
  overflow: hidden;
}
.testi-grid {
  margin-top: var(--sp-8);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}
.testi-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  transition: all var(--t-normal);
}
.testi-card:hover { transform: translateY(-4px); border-color: var(--clr-primary); box-shadow: var(--shadow-glow); }
.testi-stars { color: #fbbf24; font-size: 1rem; margin-bottom: var(--sp-3); letter-spacing: .1em; }
.testi-text {
  font-size: .9375rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: var(--sp-4);
}
.testi-author {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--clr-primary-hi);
  font-family: var(--font-mono);
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--clr-border);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--sp-8);
  padding-bottom: var(--sp-16);
}
.footer-tagline {
  font-size: .9375rem;
  color: var(--clr-text-muted);
  margin-top: var(--sp-4);
  line-height: 1.6;
}
.footer-col h3 {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-4);
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.footer-col a {
  font-size: .9375rem;
  color: var(--clr-text-muted);
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--clr-text); }
.footer-bottom {
  border-top: 1px solid var(--clr-border);
  padding: var(--sp-6) 0;
}
.footer-bottom .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  text-align: center;
}
.footer-disclaimer {
  font-size: .875rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  max-width: 900px;
}
.footer-disclaimer strong {
  color: var(--clr-primary-hi);
}
.footer-copyright {
  font-size: .75rem;
  color: var(--clr-text-faint);
}

@media (max-width: 1024px) {
  .testi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .testi-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom .container { flex-direction: column; text-align: center; }
}

/* ── Reveal animation ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--clr-surface); }
::-webkit-scrollbar-thumb { background: var(--clr-surface-3); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--clr-primary-lo); }

/* ── Selection ───────────────────────────────────────────── */
::selection { background: rgba(240,44,44,.35); color: var(--clr-text); }

/* ── Reduce motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
