/* ═══════════════════════════════════════════
   CSS CUSTOM PROPERTIES — DARK (default)
═══════════════════════════════════════════ */
:root {
  --bg-primary: #0c0c0c;
  --bg-secondary: #141414;
  --bg-tertiary: #1c1c1c;
  --bg-card: rgba(255,255,255,0.03);
  --text-primary: #fafafa;
  --text-secondary: #a3a3a3;
  --text-muted: #525252;
  --accent: #f59e0b;
  --accent-glow: #fbbf24;
  --accent-dim: #d97706;
  --green: #10b981;
  --green-dim: #059669;
  --cyan: #22d3ee;
  --orange: #fb923c;
  --red: #f87171;
  --yellow: #facc15;
  --pink: #f472b6;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --terminal-bg: #0a0a0a;
  --terminal-green: #34d399;
  --terminal-prompt: #fbbf24;
  --glow-color: rgba(245, 158, 11, 0.1);
  --nav-bg: rgba(12, 12, 12, 0.65);
  --nav-border: rgba(255, 255, 255, 0.06);
  --nav-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  --nav-shadow-scrolled: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.04);
  --nav-bg-scrolled: rgba(12, 12, 12, 0.88);
  --selection-bg: var(--accent);
  --selection-color: white;
  --scrollbar-track: var(--bg-primary);
  --scrollbar-thumb: var(--border);
  --particle-color: 245,158,11;
  --font-display: 'Space Grotesk', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════
   LIGHT MODE
═══════════════════════════════════════════ */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-card: rgba(15, 23, 42, 0.03);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #2563eb;
  --accent-glow: #3b82f6;
  --accent-dim: #1d4ed8;
  --green: #059669;
  --green-dim: #047857;
  --cyan: #0891b2;
  --orange: #ea580c;
  --red: #dc2626;
  --yellow: #ca8a04;
  --pink: #db2777;
  --border: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.15);
  --terminal-bg: #1e1b4b;
  --terminal-green: #34d399;
  --terminal-prompt: #a5b4fc;
  --glow-color: rgba(37, 99, 235, 0.08);
  --nav-bg: rgba(248, 250, 252, 0.65);
  --nav-border: rgba(15, 23, 42, 0.08);
  --nav-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  --nav-shadow-scrolled: 0 8px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(15,23,42,0.04);
  --nav-bg-scrolled: rgba(248, 250, 252, 0.92);
  --selection-bg: var(--accent);
  --selection-color: white;
  --scrollbar-track: var(--bg-secondary);
  --scrollbar-thumb: rgba(15, 23, 42, 0.12);
  --particle-color: 37,99,235;
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.6s ease, color 0.5s ease;
}

/* ═══════════════════════════════════════════
   THEME TRANSITION — smooth color morphing
═══════════════════════════════════════════ */
nav,
.nav-icon-btn,
.theme-switch,
.terminal-toggle,
.nav-divider,
.mobile-nav,
.project-card,
.testimonial-card,
.cert-item,
.contact-link,
.skill-item,
.exp-item,
.btn,
.btn-ghost,
.section-label,
footer,
.footer-content,
.hero-metric,
.hero-metric-bar,
.stat-card {
  transition: background-color 0.6s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* View Transition API — circular reveal (Chrome 111+) */
::view-transition-old(root) {
  animation: none;
  z-index: 1;
}
::view-transition-new(root) {
  animation: 0.7s cubic-bezier(0.4, 0, 0.2, 1) vt-theme-reveal;
  z-index: 9999;
}
@keyframes vt-theme-reveal {
  from { clip-path: circle(0px at var(--vt-x, 50%) var(--vt-y, 50%)); }
  to   { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 50%)); }
}
::selection { background: var(--selection-bg); color: var(--selection-color); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

/* ═══════════════════════════════════════════
   ANIMATED BACKGROUND
═══════════════════════════════════════════ */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.4;
  transition: opacity 0.8s ease;
}
[data-theme="light"] #bg-canvas {
  opacity: 0.25;
}

/* ═══════════════════════════════════════════
   NOISE OVERLAY
═══════════════════════════════════════════ */
.noise {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════
   PORTFOLIO MODE
═══════════════════════════════════════════ */
#portfolio-mode {
  position: relative;
  z-index: 2;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
#portfolio-mode.hidden {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
  position: absolute;
}

/* NAV — Floating Pill */
nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 24px);
  max-width: 1100px;
  padding: 0 1.25rem;
  height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--nav-shadow);
}
nav.scrolled {
  box-shadow: var(--nav-shadow-scrolled);
  background: var(--nav-bg-scrolled);
}
.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-glow);
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo span { color: var(--text-muted); }
.nav-links {
  display: flex;
  gap: 0.15rem;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  position: relative;
  white-space: nowrap;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}
.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 55%;
}
.nav-links a.active {
  color: var(--accent);
}
.nav-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-shrink: 0;
}

/* NAV ICON BUTTONS (lang) */
.nav-icon-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0;
}
.nav-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-card);
  transform: translateY(-1px);
}

/* THEME SWITCH — Day/Night Sky Toggle */
.theme-switch {
  position: relative;
  width: 56px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}
.theme-switch:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .theme-switch {
  background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 100%);
  border-color: rgba(14, 165, 233, 0.3);
}
[data-theme="light"] .theme-switch:hover {
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
}

/* Stars — twinkling in night sky */
.theme-switch__stars {
  position: absolute;
  inset: 0;
  transition: opacity 0.4s ease 0.15s;
}
.theme-switch__stars span {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: ts-twinkle 1.5s ease-in-out infinite alternate;
}
.theme-switch__stars span:nth-child(1) { width: 2px; height: 2px; top: 6px;  left: 32px; animation-delay: 0s; }
.theme-switch__stars span:nth-child(2) { width: 1.5px; height: 1.5px; top: 15px; left: 39px; animation-delay: 0.5s; }
.theme-switch__stars span:nth-child(3) { width: 2px; height: 2px; top: 10px; left: 45px; animation-delay: 1s; }
.theme-switch__stars span:nth-child(4) { width: 1px; height: 1px; top: 19px; left: 30px; animation-delay: 0.3s; }
[data-theme="light"] .theme-switch__stars {
  opacity: 0;
  transition-delay: 0s;
}
@keyframes ts-twinkle {
  0%   { opacity: 0.2; transform: scale(0.6); }
  100% { opacity: 1;   transform: scale(1.3); }
}

/* Clouds — drifting in day sky */
.theme-switch__clouds {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease 0s;
}
.theme-switch__clouds span {
  position: absolute;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 10px;
}
.theme-switch__clouds span:nth-child(1) {
  width: 12px; height: 5px; top: 6px; left: 6px;
  animation: ts-drift 4s ease-in-out infinite alternate;
}
.theme-switch__clouds span:nth-child(2) {
  width: 8px; height: 4px; top: 16px; left: 13px;
  animation: ts-drift 5s ease-in-out infinite alternate-reverse;
}
[data-theme="light"] .theme-switch__clouds {
  opacity: 1;
  transition-delay: 0.2s;
}
@keyframes ts-drift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(3px); }
}

/* Knob — Moon (dark mode default, left side) */
.theme-switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  box-shadow: inset -4px -1px 0 0 #94a3b8, 0 0 6px rgba(226, 232, 240, 0.3);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}
/* Knob — Sun (light mode, slides right) */
[data-theme="light"] .theme-switch__knob {
  left: 31px;
  background: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.6), 0 0 20px rgba(251, 191, 36, 0.15);
}
/* Sun rays glow */
.theme-switch__knob::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.4) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.5s ease;
}
[data-theme="light"] .theme-switch__knob::after {
  opacity: 1;
  transform: scale(1);
  animation: ts-sun-pulse 2s ease-in-out infinite alternate;
}
@keyframes ts-sun-pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0.3; }
}

/* NAV DIVIDER */
.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 0.1rem;
  flex-shrink: 0;
}

/* TERMINAL TOGGLE */
.terminal-toggle {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--terminal-green);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.terminal-toggle:hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(16, 185, 129, 0.08);
  transform: translateY(-1px);
}
.terminal-toggle svg { position: relative; z-index: 1; width: 18px; height: 18px; }

/* HAMBURGER (mobile) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  gap: 4px;
  padding: 0;
  transition: all 0.3s ease;
}
.nav-hamburger span {
  display: block;
  width: 15px;
  height: 1.5px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
.nav-hamburger:hover { border-color: var(--accent); }
.nav-hamburger:hover span { background: var(--accent); }
.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(3.5px, 3.5px);
}
.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(3.5px, -3.5px);
}

/* MOBILE NAV DROPDOWN */
.mobile-nav {
  position: fixed;
  top: 74px;
  left: 12px;
  right: 12px;
  z-index: 99;
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--nav-border);
  border-radius: 16px;
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--nav-shadow-scrolled);
}
.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  display: block;
}
.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--bg-card);
  color: var(--accent);
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 4rem;
  position: relative;
}
.hero-content {
  max-width: 720px;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}
.hero h1 .highlight {
  color: var(--accent);
  position: relative;
}
.hero h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: 0.1em;
  left: -2px;
  right: -2px;
  height: 0.3em;
  background: var(--accent);
  opacity: 0.2;
  z-index: -1;
  transform: skewX(-3deg);
}
.hero p, .hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
}
.btn-primary {
  background: var(--accent);
  color: #0c0c0c;
}
.btn-primary:hover {
  background: var(--accent-glow);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* SECTIONS */
section { padding: 5rem 2rem; position: relative; }
.section-container { max-width: 900px; margin: 0 auto; }
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0;
}
.section-label::before {
  content: '//';
  margin-right: 0.5rem;
  color: var(--accent);
  opacity: 0.6;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 2.5rem;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: start;
}
.about-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.8;
}
.about-text strong {
  color: var(--text-primary);
  font-weight: 500;
}
.about-stats {
  display: flex;
  gap: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.skill-category {
  padding: 0;
}
.skill-category h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.skill-category h3::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.skill-category-icon {
  display: none;
  margin-bottom: 1rem;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.skill-tag {
  padding: 0.25rem 0.6rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  transition: all 0.2s ease;
  cursor: default;
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--glow-color);
}

/* EXPERIENCE */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.exp-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
}
.exp-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 0.25rem;
}
.exp-content {}
.exp-role {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.exp-company {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.exp-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}
.exp-desc li {
  margin-bottom: 0.3rem;
  list-style: none;
  padding-left: 1rem;
  position: relative;
}
.exp-desc li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}
.project-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.25s ease;
  position: relative;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 0.25s ease;
  border-radius: 8px 0 0 8px;
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}
.project-card:hover::before {
  height: 100%;
}
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.project-links { display: flex; gap: 0.5rem; }
.project-links a {
  color: var(--text-muted);
  transition: color 0.15s;
}
.project-links a:hover { color: var(--text-primary); }
.project-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}
.project-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.project-tech span::after {
  content: ' \00B7';
  color: var(--border);
}
.project-tech span:last-child::after { content: ''; }
.project-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--green);
  background: rgba(16, 185, 129, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.75rem;
}
[data-theme="light"] .project-metric {
  background: rgba(5, 150, 105, 0.1);
}

/* CERTIFICATIONS */
.certs-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cert-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
}
.cert-item:hover {
  padding-left: 0.5rem;
}
.cert-item:hover .cert-name {
  color: var(--accent);
}
.cert-item:last-child { border-bottom: none; }
.cert-name {
  font-size: 0.95rem;
  color: var(--text-primary);
}
.cert-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* BLOG */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.blog-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.25s ease;
  cursor: default;
}
.blog-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.blog-card-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.blog-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.blog-card-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--accent);
  border-radius: 3px;
  opacity: 0.7;
}
.blog-coming-soon {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  margin-top: 1.5rem;
}

/* TESTIMONIALS */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.testimonial-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  position: relative;
  transition: all 0.25s ease;
}
.testimonial-card:hover {
  border-color: var(--border-hover);
}
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  font-family: Georgia, serif;
}
.testimonial-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  padding-top: 1rem;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.testimonial-author-info {
  display: flex;
  flex-direction: column;
}
.testimonial-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.testimonial-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* CONTACT */
.contact-section { }
.contact-text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.contact-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.contact-link:hover {
  color: var(--accent);
}
.contact-link svg {
  width: 16px;
  height: 16px;
}

/* FOOTER */
footer {
  padding: 4rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}
footer .footer-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
footer a:hover { color: var(--accent); }
.footer-built {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.footer-avatar-wrap {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  overflow: visible;
}
.runner-footer-shop-btn {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, 0.82);
  background: rgba(248, 250, 252, 0.92);
  color: #020617;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
  z-index: 2;
  flex-shrink: 0;
}
.runner-footer-shop-btn:hover,
.runner-footer-shop-btn:focus-visible {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.26);
}
.runner-footer-shop-btn:focus-visible {
  outline: 1px solid rgba(15, 23, 42, 0.8);
  outline-offset: 1px;
}
.footer-avatar {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 0px transparent);
  transition: filter 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}
.footer-avatar-wrap:hover .footer-avatar {
  transform: scale(1.12) translateY(-2px);
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.4));
}
.runner-shop-icon {
  width: 12px;
  height: 12px;
  display: block;
  color: currentColor;
  pointer-events: none;
}
@media (max-width: 768px) {
  .runner-footer-shop-btn {
    width: 16px;
    height: 16px;
  }
  .runner-footer-shop-btn .runner-shop-icon {
    width: 9px;
    height: 9px;
  }
}
/* Mushroom */
.mario-mushroom {
  position: fixed;
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  z-index: 9999;
  pointer-events: none;
  transition: none;
  filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.4));
}
.mario-mushroom.bouncing {
  animation: mushroom-bob 0.3s ease-in-out infinite alternate, mushroom-glow 0.6s ease-in-out infinite alternate;
}
@keyframes mushroom-bob {
  0%   { transform: translateY(0) rotate(-3deg); }
  100% { transform: translateY(-8px) rotate(3deg); }
}
@keyframes mushroom-glow {
  0%   { filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.3)); }
  100% { filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.7)); }
}
/* Power-up flash — initial burst */
.footer-avatar-wrap.powerup::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(245,158,11,0.3) 40%, transparent 70%);
  animation: powerup-flash 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 0;
  pointer-events: none;
}
@keyframes powerup-flash {
  0%   { opacity: 1; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(3); }
}

/* Power-up glow — persistent aura during big phase */
.footer-avatar-wrap.powerup::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.25) 0%, transparent 70%);
  animation: powerup-aura 4s ease forwards;
  z-index: 0;
  pointer-events: none;
}
@keyframes powerup-aura {
  0%   { opacity: 0; transform: scale(0.5); }
  15%  { opacity: 1; transform: scale(1.3); }
  20%  { opacity: 0.8; transform: scale(1.1); }
  65%  { opacity: 0.7; transform: scale(1.15); }
  70%  { opacity: 0.9; transform: scale(1.3); }
  85%  { opacity: 0.4; transform: scale(0.9); }
  95%  { opacity: 0; transform: scale(0.5); }
  100% { opacity: 0; transform: scale(0); }
}

/* Power-up avatar grow */
.footer-avatar-wrap.powerup .footer-avatar {
  animation: mario-grow 4s ease forwards;
}
@keyframes mario-grow {
  /* Flicker grow — bouncy alternation */
  0%    { transform: scale(1);    filter: brightness(1); }
  3%    { transform: scale(1.6);  filter: brightness(1.8); }
  5%    { transform: scale(0.95); filter: brightness(1.2); }
  8%    { transform: scale(1.8);  filter: brightness(1.6); }
  10%   { transform: scale(0.9);  filter: brightness(1.3); }
  13%   { transform: scale(2.15); filter: brightness(1.5); }
  15%   { transform: scale(1.85); filter: brightness(1.1); }
  18%   { transform: scale(2.1);  filter: brightness(1.3); }
  /* Pop into big — satisfying overshoot */
  20%   { transform: scale(2);    filter: brightness(1) drop-shadow(0 6px 20px rgba(245, 158, 11, 0.5)); }
  /* Big phase — subtle breathing */
  30%   { transform: scale(2.04); filter: brightness(1.02) drop-shadow(0 8px 24px rgba(245, 158, 11, 0.55)); }
  40%   { transform: scale(1.97); filter: brightness(1)    drop-shadow(0 5px 18px rgba(245, 158, 11, 0.4)); }
  50%   { transform: scale(2.03); filter: brightness(1.02) drop-shadow(0 7px 22px rgba(245, 158, 11, 0.5)); }
  60%   { transform: scale(1.98); filter: brightness(1)    drop-shadow(0 5px 18px rgba(245, 158, 11, 0.4)); }
  70%   { transform: scale(2);    filter: brightness(1)    drop-shadow(0 6px 20px rgba(245, 158, 11, 0.45)); }
  /* Warning shrink — urgent flicker */
  73%   { transform: scale(1.3);  filter: brightness(1.6); }
  76%   { transform: scale(1.9);  filter: brightness(1.1); }
  79%   { transform: scale(1.15); filter: brightness(1.7); }
  82%   { transform: scale(1.7);  filter: brightness(1.2); }
  85%   { transform: scale(1.05); filter: brightness(1.5); }
  88%   { transform: scale(1.4);  filter: brightness(1.1); }
  91%   { transform: scale(0.95); filter: brightness(1.3); }
  94%   { transform: scale(1.08); filter: brightness(1.1); }
  97%   { transform: scale(0.98); filter: brightness(1.05); }
  100%  { transform: scale(1);    filter: brightness(1); }
}

/* ═══════════════════════════════════════════
   RUNNER MINI-GAME (DOM-based, inline on footer border)
═══════════════════════════════════════════ */
.footer-name-trigger {
  cursor: pointer;
  transition: color 0.2s ease;
  border-bottom: 1px dashed transparent;
}
.footer-name-trigger:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
footer.runner-active {
  position: relative;
  overflow: visible;
}
.runner-area {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 10;
  isolation: isolate;
  overflow: visible;
  border-radius: 8px 8px 0 0;
  --runner-zone-primary: #f59e0b;
  --runner-zone-secondary: #38bdf8;
  --runner-zone-accent: #22c55e;
  background:
    radial-gradient(125% 95% at 12% -20%, color-mix(in srgb, var(--runner-zone-secondary) 18%, transparent) 0%, transparent 62%),
    radial-gradient(100% 85% at 84% -2%, color-mix(in srgb, var(--runner-zone-accent) 14%, transparent) 0%, transparent 62%),
    linear-gradient(180deg, rgba(6, 10, 18, 0.78) 0%, rgba(6, 10, 18, 0.45) 46%, rgba(6, 10, 18, 0.1) 100%);
}
/* Static atmosphere (doesn't scroll with parallax) */
.runner-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.58) 0%, rgba(0,0,0,0.2) 30%, transparent 68%),
    linear-gradient(90deg, color-mix(in srgb, var(--runner-zone-primary) 14%, transparent) 0%, transparent 45%, color-mix(in srgb, var(--runner-zone-secondary) 12%, transparent) 100%),
    repeating-linear-gradient(0deg, transparent 0px, transparent 2px, rgba(255,255,255,0.018) 2px, rgba(255,255,255,0.018) 3px);
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  opacity: 0.42;
  animation: runnerAtmosShift 20s ease-in-out infinite alternate;
}
.runner-area::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 0%, color-mix(in srgb, var(--runner-zone-primary) 16%, transparent) 40%, transparent 68%),
    radial-gradient(120px 45px at 80% 26%, color-mix(in srgb, var(--runner-zone-secondary) 24%, transparent) 0%, transparent 80%);
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.1;
  animation: runnerLightSweep 16s linear infinite;
}
@keyframes runnerAtmosShift {
  from { transform: translateY(0); filter: saturate(1); }
  to { transform: translateY(-2px); filter: saturate(1.15); }
}
@keyframes runnerLightSweep {
  from { transform: translateX(-10px); }
  to { transform: translateX(10px); }
}
.runner-player {
  position: absolute;
  bottom: 0;
  left: 50px;
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
  z-index: 5;
  will-change: transform;
  transform-origin: bottom center;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6)) drop-shadow(0 0 10px rgba(245,158,11,0.25));
}
.runner-player-jetpack {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
  z-index: 6;
  pointer-events: none;
  display: none;
  transform-origin: center center;
  filter: drop-shadow(0 0 8px rgba(251,146,60,0.35));
}
.runner-player-jetpack-flame {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 10px;
  height: 15px;
  z-index: 4;
  pointer-events: none;
  display: none;
  border-radius: 50% 50% 45% 45%;
  background:
    radial-gradient(45% 40% at 50% 18%, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0) 100%),
    linear-gradient(180deg, #fde68a 0%, #fb923c 45%, #ef4444 100%);
  box-shadow:
    0 0 14px rgba(251,146,60,0.7),
    0 0 24px rgba(239,68,68,0.35);
  animation: runnerJetpackFlame 0.12s ease-in-out infinite alternate;
}
@keyframes runnerJetpackFlame {
  from { filter: saturate(0.9) brightness(0.95); }
  to { filter: saturate(1.25) brightness(1.15); }
}
.runner-player.death-pop {
  animation: runnerDeathPop 0.72s cubic-bezier(0.25, 0.85, 0.4, 1) forwards;
}
/* Skin swap pop (shop/equip feedback) */
.runner-player.skin-swap-pop {
  animation: runnerSkinSwap 0.24s ease-out;
}
@keyframes runnerSkinSwap {
  0% { filter: drop-shadow(0 0 0 rgba(250, 204, 21, 0)); transform: translateY(0) scale(1); }
  35% { filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.8)); transform: translateY(-2px) scale(1.06); }
  100% { filter: drop-shadow(0 0 0 rgba(250, 204, 21, 0)); transform: translateY(0) scale(1); }
}
@keyframes runnerDeathPop {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6)); }
  22% { transform: translateY(-34px) rotate(-7deg); opacity: 1; }
  56% { transform: translateY(24px) rotate(6deg); opacity: 1; }
  100% { transform: translateY(148px) rotate(12deg); opacity: 0; filter: drop-shadow(0 0 14px rgba(248,113,113,0.45)); }
}
/* Ground — glowing platform edge */
.runner-ground {
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 20px;
  background-repeat: repeat-x;
  background-position: bottom left;
  background-size: auto 100%;
  opacity: 0.95;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.35);
}
/* Obstacles */
.runner-obstacle {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 4;
  will-change: transform;
  pointer-events: none;
  white-space: nowrap;
  background: transparent;
  border: none;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 4px currentColor);
}
.runner-obstacle svg,
.runner-obstacle img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.runner-obstacle.air {
  bottom: 22px;
}

/* ═══════ OBSTACLE BEHAVIORS ═══════ */
.runner-obstacle.obs-destroyable {
  filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 14px rgba(234,179,8,0.3));
  animation: obsDestroyPulse 0.6s ease-in-out infinite alternate;
}
@keyframes obsDestroyPulse {
  from { filter: drop-shadow(0 0 4px currentColor); }
  to { filter: drop-shadow(0 0 10px currentColor) drop-shadow(0 0 18px rgba(234,179,8,0.4)); }
}
.runner-obstacle.obs-debuff-slip {
  opacity: 0.85;
}
.runner-obstacle.obs-debuff-invert {
  animation: obsGlitch 0.3s infinite;
}
@keyframes obsGlitch {
  0%, 100% { filter: drop-shadow(0 0 4px #ef4444); }
  25% { filter: drop-shadow(0 0 8px #ef4444) hue-rotate(90deg); }
  75% { filter: drop-shadow(0 0 8px #ef4444) hue-rotate(-90deg); }
}
.runner-obstacle.obs-falling-active {
  opacity: 0.85;
}
.runner-obstacle.obs-laser {
  border-radius: 0;
  filter: drop-shadow(0 0 8px #ef4444) drop-shadow(0 0 18px rgba(239,68,68,0.4));
}
.runner-obstacle.obs-laser-warmup {
  animation: laserWarmupPulse 0.16s steps(2) infinite;
}
@keyframes laserWarmupPulse {
  from { filter: drop-shadow(0 0 4px #ef4444) brightness(0.9); }
  to { filter: drop-shadow(0 0 14px #ef4444) brightness(1.2); }
}
.runner-obstacle.obs-alarm {
  animation: obsAlarmPulse 0.6s infinite alternate;
}
@keyframes obsAlarmPulse {
  from { filter: drop-shadow(0 0 4px currentColor); }
  to { filter: drop-shadow(0 0 12px currentColor) drop-shadow(0 0 20px rgba(250,204,21,0.4)); }
}
.runner-obstacle.obs-expanding {
  transition: width 0.3s ease-out;
}
.runner-obstacle.obs-rolling {
  animation: obsRolling 0.3s linear infinite;
}
@keyframes obsRolling {
  from { filter: drop-shadow(0 0 4px currentColor); }
  to { filter: drop-shadow(0 0 8px currentColor) drop-shadow(0 0 14px rgba(120,113,108,0.3)); }
}
.runner-obstacle.obs-glitch {
  transition: opacity 0.08s;
}
.runner-obstacle.obs-swinging {
  transition: transform 0.05s linear;
}
.runner-obstacle.obs-growing {
  transition: height 0.15s ease-out;
  filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 12px rgba(168,85,247,0.3));
}

/* Fall warning indicator */
.runner-fall-warning {
  position: absolute;
  bottom: 0;
  left: 0;
  font-size: 8px;
  font-weight: bold;
  color: #facc15;
  font-family: var(--font-mono);
  letter-spacing: 0.6px;
  padding: 1px 4px;
  border: 1px solid rgba(250,204,21,0.4);
  border-radius: 3px;
  background: rgba(15,23,42,0.72);
  pointer-events: none;
  z-index: 3;
  will-change: transform;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  animation: warnBlink 0.3s infinite alternate;
}
.runner-fall-warning img {
  width: 12px;
  height: 9px;
  image-rendering: pixelated;
}
@keyframes warnBlink {
  from { opacity: 0.3; text-shadow: 0 0 4px #facc15; }
  to { opacity: 1; text-shadow: 0 0 12px #facc15; }
}
.runner-threat-warning,
.runner-gap-warning {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 4;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.7px;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid currentColor;
  background: rgba(2, 6, 23, 0.78);
  text-shadow: 0 0 8px currentColor;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  animation: threatBlink 0.24s steps(2) infinite;
}
.runner-threat-warning img,
.runner-gap-warning img {
  width: 10px;
  height: 10px;
  object-fit: contain;
  image-rendering: pixelated;
}
.runner-threat-warning.threat-laser img {
  width: 12px;
  height: 9px;
}
.runner-threat-warning.threat-laser {
  color: #f87171;
}
.runner-threat-warning.threat-alarm {
  color: #facc15;
}
.runner-gap-warning {
  color: #fb7185;
  top: auto;
  bottom: 10px;
}
@keyframes threatBlink {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

/* ═══════ DEBUFF OVERLAYS ═══════ */
.runner-area.debuff-slip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(146, 64, 14, 0.12);
  pointer-events: none;
  z-index: 5;
  animation: debuffSlipPulse 0.5s ease-in-out infinite;
}
@keyframes debuffSlipPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.runner-player.slipping {
  transition: transform 0.1s;
  filter: drop-shadow(0 0 6px rgba(146,64,14,0.5)) brightness(0.9);
}
.runner-area.debuff-invert::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(239,68,68,0.06) 3px,
    rgba(239,68,68,0.06) 4px
  );
  animation: debuffGlitch 0.15s infinite;
}
@keyframes debuffGlitch {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-2px); }
  100% { transform: translateY(1px); }
}

/* ═══════ ZONE GROUND TEXTURES ═══════ */
.runner-area[data-zone="office"] .runner-ground {
  box-shadow: 0 -5px 18px rgba(148, 163, 184, 0.35);
}
.runner-area[data-zone="cloud"] .runner-ground {
  box-shadow: 0 -6px 20px rgba(56, 189, 248, 0.4);
}
.runner-area[data-zone="darkweb"] .runner-ground {
  box-shadow: 0 -6px 20px rgba(168, 85, 247, 0.45);
}
.runner-area[data-zone="prod"] .runner-ground {
  box-shadow: 0 -7px 24px rgba(239, 68, 68, 0.45);
}

/* ═══════ ZONE BG TINTS ═══════ */
.runner-area[data-zone="office"] {
  background:
    radial-gradient(120% 90% at 16% -12%, rgba(125,211,252,0.34) 0%, transparent 62%),
    radial-gradient(95% 85% at 82% 2%, rgba(74,222,128,0.12) 0%, transparent 60%),
    linear-gradient(180deg, rgba(203,236,255,0.34) 0%, rgba(203,236,255,0.16) 44%, rgba(15,23,42,0.14) 100%);
}
.runner-area[data-zone="office"]::before {
  opacity: 0.2;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.06) 34%, transparent 72%),
    linear-gradient(90deg, rgba(148,163,184,0.1) 0%, transparent 52%, rgba(56,189,248,0.06) 100%);
}
.runner-area[data-zone="office"]::after {
  opacity: 0.05;
}
.runner-area[data-zone="cloud"] {
  background:
    radial-gradient(120% 95% at 20% -10%, rgba(56,189,248,0.36) 0%, transparent 64%),
    radial-gradient(95% 80% at 80% -2%, rgba(191,219,254,0.26) 0%, transparent 60%),
    linear-gradient(180deg, rgba(8,47,73,0.52) 0%, rgba(8,47,73,0.24) 44%, rgba(56,189,248,0.12) 100%);
}
.runner-area[data-zone="darkweb"] {
  background:
    radial-gradient(130% 95% at 18% -15%, rgba(168,85,247,0.22) 0%, transparent 64%),
    radial-gradient(100% 85% at 86% 0%, rgba(34,197,94,0.12) 0%, transparent 58%),
    linear-gradient(180deg, rgba(23,7,40,0.8) 0%, rgba(12,4,24,0.58) 42%, rgba(34,197,94,0.05) 100%);
}
.runner-area[data-zone="prod"] {
  background:
    radial-gradient(125% 95% at 16% -12%, rgba(239,68,68,0.36) 0%, transparent 62%),
    radial-gradient(100% 85% at 86% 0%, rgba(249,115,22,0.26) 0%, transparent 58%),
    linear-gradient(180deg, rgba(69,10,10,0.84) 0%, rgba(127,29,29,0.58) 44%, rgba(249,115,22,0.11) 100%);
}

/* Collectibles */
.runner-collectible {
  position: absolute;
  bottom: 4px;
  left: 0;
  z-index: 16;
  will-change: transform;
  pointer-events: none;
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}
.runner-collectible.collect-coin {
  box-shadow:
    0 0 0 1px rgba(2, 6, 23, 0.7),
    0 0 9px rgba(250, 204, 21, 0.38);
  border-radius: 50%;
}
.runner-collectible.collect-gem {
  box-shadow:
    0 0 0 1px rgba(2, 6, 23, 0.7),
    0 0 10px rgba(56, 189, 248, 0.4);
  border-radius: 50%;
}
.runner-collectible.collect-xp {
  box-shadow:
    0 0 0 1px rgba(2, 6, 23, 0.7),
    0 0 10px rgba(34, 197, 94, 0.42);
  border-radius: 50%;
}
.runner-coin-sprite {
  width: 20px;
  height: 20px;
  object-fit: cover;
  object-position: 0 0;
  filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.6));
  animation: coinSpin 1s linear infinite;
}
.runner-gem-sprite {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.74));
  animation: gemShimmer 1.1s ease-in-out infinite;
}
.runner-xp-sprite {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.78));
  animation: xpPulse 1.4s ease-in-out infinite;
}
@keyframes coinPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.4)) brightness(1); }
  50% { filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.8)) brightness(1.3); }
}
@keyframes gemPulse {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(6, 182, 212, 0.4)) brightness(1); }
  50% { filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.8)) brightness(1.4); }
}
@keyframes xpPulse {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.4)) brightness(1); }
  50% { filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.8)) brightness(1.4); }
}

/* Zone transition banner */
.runner-zone-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: color-mix(in srgb, var(--zone-color, var(--runner-zone-primary)) 72%, #fff);
  text-shadow: 0 0 16px color-mix(in srgb, var(--zone-accent, var(--runner-zone-accent)) 62%, transparent);
  border: 1px solid color-mix(in srgb, var(--zone-color, var(--runner-zone-primary)) 70%, transparent);
  background: linear-gradient(90deg, rgba(0,0,0,0.2), color-mix(in srgb, var(--zone-color, var(--runner-zone-primary)) 18%, transparent), rgba(0,0,0,0.2));
  box-shadow: inset 0 0 16px color-mix(in srgb, var(--zone-accent, var(--runner-zone-accent)) 20%, transparent), 0 0 20px rgba(0,0,0,0.35);
  border-radius: 6px;
  padding: 4px 12px;
  pointer-events: none;
  z-index: 18;
  white-space: nowrap;
  animation: zoneBannerIn 2s ease-out forwards;
}
@keyframes zoneBannerIn {
  0%   { opacity: 0; transform: translate(-50%, -50%) scaleX(0.4); letter-spacing: 10px; filter: blur(4px); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scaleX(1); letter-spacing: 3px; filter: blur(0); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) translateY(-8px); }
}
/* Particles */
.runner-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  animation: runner-particle-fly 0.45s ease-out forwards;
}
@keyframes runner-particle-fly {
  0%   { opacity: 0.9; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(0); }
}
/* Bonus popup */
.runner-bonus {
  position: absolute;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: bold;
  color: var(--green);
  z-index: 4;
  animation: runner-bonus-float 0.7s ease-out forwards;
}
@keyframes runner-bonus-float {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-28px); }
}
/* Screen shake */
@keyframes runner-shake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-4px, 2px); }
  30% { transform: translate(4px, -2px); }
  45% { transform: translate(-3px, 1px); }
  60% { transform: translate(3px, -1px); }
  75% { transform: translate(-1px, 1px); }
}
.runner-area.shake {
  animation: runner-shake 0.35s ease-out;
}
/* HUD */
.runner-hud {
  position: absolute;
  top: 3px;
  left: 96px;
  right: 10px;
  height: 54px;
  display: block;
  z-index: 24;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.runner-score {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  color: #f8fafc;
  opacity: 0.98;
  font-size: 13px;
  letter-spacing: 0.2px;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.35);
  transition: transform 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.runner-score-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  min-width: 98px;
  border-radius: 6px;
  padding: 3px 9px;
  border: 2px solid #8a6a2d;
  font-size: 12px;
  line-height: 1;
  background: linear-gradient(180deg, rgba(12, 18, 34, 0.94), rgba(4, 8, 22, 0.94));
  box-shadow:
    0 0 0 1px rgba(20, 14, 6, 0.9) inset,
    0 0 0 3px rgba(185, 145, 72, 0.12),
    0 8px 16px rgba(2, 6, 23, 0.48);
}
.runner-score-chip::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 3px;
  border: 1px solid rgba(226, 198, 142, 0.24);
  pointer-events: none;
}
.runner-score-chip::after,
.runner-coins-hud::after,
.runner-xp-hud::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(15, 23, 42, 0.7);
  background: rgba(148, 163, 184, 0.85);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.6);
}
.runner-score-chip.run {
  color: #f8fafc;
  border-color: #7e6e43;
}
.runner-score-chip.hi {
  color: #93c5fd;
}
.runner-score-chip.zone {
  color: #facc15;
  border-color: #9a6a24;
}
.runner-score-chip.zone::before {
  border-color: rgba(250, 204, 21, 0.35);
}
.runner-instructions {
  position: absolute;
  top: 29px;
  left: 0;
  color: #cbd5e1;
  opacity: 1;
  max-width: calc(100% - 338px);
  font-size: 10px;
  letter-spacing: 0.2px;
  padding: 3px 7px;
  border-radius: 6px;
  border: 2px solid #6f727d;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.9));
  box-shadow:
    0 0 0 1px rgba(10, 14, 26, 0.88) inset,
    0 0 0 3px rgba(148, 163, 184, 0.08),
    0 6px 14px rgba(2, 6, 23, 0.42);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 3s ease 1s;
}
.runner-instructions::before,
.runner-coins-hud::before,
.runner-xp-hud::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 3px;
  border: 1px solid rgba(226, 232, 240, 0.2);
  pointer-events: none;
}
.runner-instructions.fade {
  opacity: 0;
}
.runner-currency-row {
  position: absolute;
  top: 28px;
  right: 10px;
  display: inline-flex;
  align-items: stretch;
  gap: 5px;
  z-index: 24;
  pointer-events: none;
  justify-content: flex-end;
}
.runner-coins-hud,
.runner-xp-hud {
  position: relative;
  display: inline-grid;
  align-content: center;
  gap: 1px;
  min-height: 24px;
  min-width: 98px;
  padding: 3px 9px;
  border-radius: 6px;
  border: 2px solid #8a6a2d;
  background: linear-gradient(180deg, rgba(12, 18, 34, 0.94), rgba(4, 8, 22, 0.94));
  box-shadow:
    0 0 0 1px rgba(20, 14, 6, 0.9) inset,
    0 0 0 3px rgba(185, 145, 72, 0.12),
    0 8px 16px rgba(2, 6, 23, 0.48);
  opacity: 0.98;
}
.runner-coins-hud {
  color: var(--yellow);
  border-color: #9a6a24;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.45);
}
.runner-xp-hud {
  color: #22c55e;
  border-color: #2b8f5a;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}
.runner-exit-btn {
  position: absolute;
  top: 2px;
  left: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.runner-exit-btn:hover {
  border-color: var(--red);
  color: var(--red);
}
.runner-over {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  z-index: 235;
  padding: 16px;
  text-align: center;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  pointer-events: auto;
  cursor: default;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.5), rgba(2, 6, 23, 0.9));
  backdrop-filter: blur(6px) saturate(1.05);
  border-radius: 0;
  overflow: hidden;
}
.runner-over.entering {
  animation: runnerOverFadeIn 0.38s ease both;
}
.runner-over.entering .runner-over-card {
  animation: runnerOverCardIn 0.44s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes runnerOverFadeIn {
  from { background: rgba(2, 6, 23, 0.12); backdrop-filter: blur(0px); }
  to { background: linear-gradient(180deg, rgba(2, 6, 23, 0.5), rgba(2, 6, 23, 0.9)); backdrop-filter: blur(6px) saturate(1.05); }
}
@keyframes runnerOverCardIn {
  0% { opacity: 0; transform: translateY(14px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.runner-over-card {
  position: relative;
  width: min(940px, calc(100% - 16px));
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid #8a6a2d;
  background: linear-gradient(180deg, rgba(12, 18, 34, 0.97), rgba(4, 8, 22, 0.97));
  box-shadow:
    0 0 0 1px rgba(20, 14, 6, 0.9) inset,
    0 0 0 4px rgba(185, 145, 72, 0.12),
    0 22px 44px rgba(0, 0, 0, 0.58);
  overflow: hidden;
}
.runner-over-card::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 8px;
  border: 1px solid rgba(226, 198, 142, 0.2);
  pointer-events: none;
}
.runner-over-card::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(15, 23, 42, 0.7);
  background: rgba(148, 163, 184, 0.88);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.6);
}
.runner-over-win {
  border-color: rgba(52, 211, 153, 0.5);
}
.runner-over-header {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.runner-over-title {
  color: #f87171;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 2px;
  text-shadow: 0 0 16px rgba(248, 113, 113, 0.5);
}
.runner-over-score-panel {
  position: relative;
  width: min(320px, 100%);
  min-height: 68px;
  border-radius: 10px;
  border: 2px solid #7e6e43;
  background: linear-gradient(180deg, rgba(12, 18, 34, 0.94), rgba(4, 8, 22, 0.94));
  box-shadow:
    0 0 0 1px rgba(20, 14, 6, 0.9) inset,
    0 0 0 3px rgba(185, 145, 72, 0.1),
    0 10px 20px rgba(2, 6, 23, 0.5);
  display: grid;
  place-items: center;
  padding: 9px 12px 8px;
}
.runner-over-score-panel::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 6px;
  border: 1px solid rgba(226, 198, 142, 0.24);
  pointer-events: none;
}
.runner-over-score-label {
  font-size: 9px;
  letter-spacing: 1px;
  color: #94a3b8;
}
.runner-over-score-value {
  margin-top: 1px;
  font-size: 30px;
  letter-spacing: 1px;
  line-height: 1;
  color: #f8fafc;
  text-shadow: 0 0 12px rgba(148, 163, 184, 0.35);
}
.runner-over-economy {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.runner-over-reward {
  position: relative;
  min-height: 58px;
  border-radius: 8px;
  border: 2px solid #7e6e43;
  background: linear-gradient(180deg, rgba(12, 18, 34, 0.92), rgba(4, 8, 22, 0.92));
  box-shadow: 0 0 0 1px rgba(20, 14, 6, 0.84) inset;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 2px;
  padding: 6px 10px;
}
.runner-over-reward::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 5px;
  border: 1px solid rgba(226, 198, 142, 0.2);
  pointer-events: none;
}
.runner-over-reward.coin {
  border-color: #9a6a24;
}
.runner-over-reward.xp {
  border-color: #2b8f5a;
}
.runner-over-reward-label {
  font-size: 8px;
  letter-spacing: 0.9px;
  opacity: 0.85;
}
.runner-over-reward-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}
.runner-over-reward-total {
  font-size: 8px;
  letter-spacing: 0.8px;
  opacity: 0.8;
}
.runner-over-coin-line {
  color: var(--yellow);
}
.runner-over-xp-line {
  color: #22c55e;
}
.runner-xp-note {
  font-size: 10px;
  letter-spacing: 0.3px;
  color: #22c55e;
  opacity: 0.82;
}
.runner-over-info {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 310px);
  gap: 10px;
  align-items: start;
  min-height: 0;
}
.runner-over-left,
.runner-over-right {
  min-height: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.68);
  padding: 10px;
  overflow: auto;
}
.runner-over-left {
  text-align: left;
}
.runner-over-right {
  text-align: left;
}
.runner-over-right .runner-leaderboard {
  margin: 0;
  height: auto;
}
.runner-over-actions {
  margin-top: 3px;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: center;
}
.runner-over-btn {
  border: 1px solid rgba(148, 163, 184, 0.56);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-secondary);
  border-radius: 7px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.runner-over-btn.primary {
  border-color: #22c55e;
  color: #22c55e;
}
.runner-over-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Speed lines */
.runner-speed-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.35;
  pointer-events: none;
  animation: speedLineFade 0.3s linear forwards;
}
@keyframes speedLineFade {
  from { opacity: 0.35; transform: scaleX(1); }
  to { opacity: 0; transform: scaleX(0.2); }
}

/* Near-miss flash */
.runner-near-miss {
  position: absolute;
  color: var(--yellow);
  font-size: 12px;
  font-weight: bold;
  font-family: var(--font-mono);
  pointer-events: none;
  animation: nearMissFloat 0.4s ease-out forwards;
  text-shadow: 0 0 10px var(--yellow), 0 0 20px rgba(250,204,21,0.4);
  z-index: 4;
}
@keyframes nearMissFloat {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

/* Combo display */
.runner-combo {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: bold;
  pointer-events: none;
  z-index: 4;
  animation: comboPulse 0.3s ease-out;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px var(--green));
}
@keyframes comboPulse {
  0% { transform: translateX(-50%) scale(1.5); }
  100% { transform: translateX(-50%) scale(1); }
}

/* Power-ups */
.runner-powerup {
  position: absolute;
  bottom: 6px;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 8;
  animation: powerupGlow 0.8s ease-in-out infinite alternate;
}
.runner-powerup.shield { filter: drop-shadow(0 0 8px #60a5fa) drop-shadow(0 0 16px rgba(96,165,250,0.4)); }
.runner-powerup.magnet { filter: drop-shadow(0 0 8px #a855f7) drop-shadow(0 0 16px rgba(168,85,247,0.4)); }
.runner-powerup.slowmo { filter: drop-shadow(0 0 8px #34d399) drop-shadow(0 0 16px rgba(52,211,153,0.4)); }
@keyframes powerupGlow {
  from { opacity: 0.85; }
  to { opacity: 1; }
}

/* Power-up HUD indicator */
.runner-powerup-hud {
  position: absolute;
  top: 20px;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 4;
  display: none;
}
.runner-powerup-hud.active { display: block; }

/* Shield pulse on player */
.runner-player.shielded {
  filter: drop-shadow(0 0 10px #60a5fa) drop-shadow(0 0 22px rgba(96,165,250,0.4));
}

/* ═══════ PARALLAX BACKGROUNDS ═══════ */
.runner-parallax-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-repeat: repeat-x;
  background-position: bottom left;
  background-size: auto 100%;
  will-change: background-position, opacity, filter;
}

/* Layer 1 (farthest): atmospheric FX SVG */
.runner-parallax-layer.layer-1 {
  opacity: 0.36;
  background-size: auto 100%;
  background-repeat: repeat-x;
  background-position: bottom left;
}

/* Layer 2 (mid): far background — zone SVG */
.runner-parallax-layer.layer-2 {
  opacity: 0.72;
  filter: saturate(1.08) brightness(0.94) contrast(1.03);
}
/* Layer 3 (near): near background — zone SVG */
.runner-parallax-layer.layer-3 {
  opacity: 0.88;
  filter: saturate(1.12) brightness(0.98) drop-shadow(0 4px 10px rgba(0,0,0,0.32));
}
.runner-area[data-zone="office"] .runner-parallax-layer.layer-1 { opacity: 0.3; }
.runner-area[data-zone="cloud"] .runner-parallax-layer.layer-1 { opacity: 0.24; }
.runner-area[data-zone="darkweb"] .runner-parallax-layer.layer-1 { opacity: 0.42; }
.runner-area[data-zone="prod"] .runner-parallax-layer.layer-1 { opacity: 0.36; }

.runner-area[data-zone="office"] .runner-parallax-layer.layer-2 {
  opacity: 0.82;
  filter: saturate(1.02) brightness(1.06) contrast(1.01);
}
.runner-area[data-zone="office"] .runner-parallax-layer.layer-3 {
  opacity: 0.96;
  filter: saturate(0.98) brightness(1.05) drop-shadow(0 3px 8px rgba(15,23,42,0.18));
}
.runner-area[data-zone="cloud"] .runner-parallax-layer.layer-2 {
  opacity: 0.76;
  filter: saturate(1.1) brightness(0.98) contrast(1.04);
}
.runner-area[data-zone="cloud"] .runner-parallax-layer.layer-3 {
  opacity: 0.9;
  filter: saturate(1.14) brightness(1) drop-shadow(0 4px 10px rgba(8,47,73,0.3));
}
.runner-area[data-zone="darkweb"] .runner-parallax-layer.layer-2 {
  opacity: 0.74;
  filter: saturate(1.14) brightness(0.9) contrast(1.08);
}
.runner-area[data-zone="darkweb"] .runner-parallax-layer.layer-3 {
  opacity: 0.9;
  filter: saturate(1.2) brightness(0.95) drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}
.runner-area[data-zone="prod"] .runner-parallax-layer.layer-2 {
  opacity: 0.78;
  filter: saturate(1.22) brightness(0.92) contrast(1.1);
}
.runner-area[data-zone="prod"] .runner-parallax-layer.layer-3 {
  opacity: 0.92;
  filter: saturate(1.24) brightness(0.95) drop-shadow(0 4px 12px rgba(0,0,0,0.42));
}

/* Obstacle warning */
.runner-warning {
  position: absolute;
  right: 8px;
  bottom: 20px;
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: bold;
  pointer-events: none;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  animation: warningBlink 0.3s ease-in-out infinite alternate;
}
.runner-warning img {
  width: 14px;
  height: 10px;
  image-rendering: pixelated;
}
@keyframes warningBlink {
  from { opacity: 1; }
  to { opacity: 0.2; }
}

/* Death highlight */
.runner-obstacle.death-cause {
  animation: deathFlash 0.4s ease-out;
  filter: drop-shadow(0 0 12px #ef4444) drop-shadow(0 0 24px rgba(239,68,68,0.4));
}
@keyframes deathFlash {
  0% { filter: drop-shadow(0 0 20px #ef4444) drop-shadow(0 0 40px rgba(239,68,68,0.5)); }
  100% { filter: drop-shadow(0 0 6px #ef4444); }
}

/* Challenge HUD */
.runner-challenge {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 4;
  white-space: nowrap;
}
.runner-challenge-complete {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: bold;
  pointer-events: none;
  z-index: 4;
  text-shadow: 0 0 8px var(--green);
  animation: challengeComplete 1s ease-out forwards;
}
@keyframes challengeComplete {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

/* Leaderboard */
.runner-leaderboard {
  margin-top: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #e2e8f0;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 10px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.68);
}
.runner-leaderboard-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #e2e8f0;
}
.runner-leaderboard table {
  margin: 8px auto 0;
  width: 100%;
  border-collapse: collapse;
}
.runner-leaderboard td {
  padding: 3px 6px;
}
.runner-leaderboard .lb-rank { color: var(--yellow); }
.runner-leaderboard .lb-current { color: var(--green); font-weight: bold; }
.runner-leaderboard .lb-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}
.runner-leaderboard .lb-score {
  letter-spacing: 0.5px;
}

/* Dash mechanic */
.runner-player.dashing {
  filter: drop-shadow(0 0 12px var(--yellow)) drop-shadow(0 0 24px rgba(245,158,11,0.4)) brightness(1.3);
  filter: drop-shadow(0 0 8px var(--yellow)) brightness(1.4);
  image-rendering: pixelated;
}

/* Afterimage trail */
.runner-afterimage {
  position: absolute;
  background: var(--text-secondary);
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.3;
}

/* Ground gaps — see improved version below */

/* Achievement popup */
.runner-achievement-popup {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: bold;
  color: var(--yellow);
  text-shadow: 0 0 8px var(--yellow);
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
  animation: achievementPop 1.5s ease-out forwards;
}
@keyframes achievementPop {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.5); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.2); }
  30% { transform: translateX(-50%) translateY(0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* Achievements summary on game over */
.runner-achievements-summary {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
}
.runner-achievement-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--yellow);
  letter-spacing: 0.5px;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.08);
}

/* Run stats on game over */
.runner-run-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #cbd5e1;
  line-height: 1.2;
  margin-top: 1px;
}
.runner-run-stat-chip {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  color: #cbd5e1;
  letter-spacing: 0.4px;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.55);
}

/* Retry hint */
.runner-retry-hint {
  font-size: 11px;
  margin-top: 6px;
  color: var(--text-secondary);
  animation: retryPulse 1.5s ease-in-out infinite;
}
@keyframes retryPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Dash cooldown bar */
.runner-dash-bar {
  position: absolute;
  bottom: 1px;
  left: 50px;
  width: 34px;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  z-index: 4;
  overflow: hidden;
}
.runner-dash-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--yellow), #fb923c);
  opacity: 0.5;
  transition: width 0.1s linear;
  border-radius: 2px;
}
.runner-dash-bar.ready .runner-dash-fill {
  background: linear-gradient(90deg, var(--green), var(--cyan));
  opacity: 0.8;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* Mute button */
.runner-mute-btn {
  position: absolute;
  top: 2px;
  left: 28px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.runner-mute-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}
.runner-pause-btn {
  position: absolute;
  top: 2px;
  left: 50px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.runner-pause-btn:hover,
.runner-pause-btn.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
}
.runner-quick-shop-btn {
  position: absolute;
  top: 2px;
  left: 72px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.82);
  color: #020617;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.runner-quick-shop-btn:hover {
  background: #fff;
  box-shadow: 0 4px 10px rgba(2, 6, 23, 0.24);
}
.runner-quick-shop-btn .runner-shop-icon {
  width: 10px;
  height: 10px;
}

.runner-exit-btn[data-tip],
.runner-mute-btn[data-tip],
.runner-pause-btn[data-tip],
.runner-quick-shop-btn[data-tip] {
  position: absolute;
}
.runner-footer-shop-btn[data-tip] {
  position: relative;
}
.runner-exit-btn[data-tip]::after,
.runner-mute-btn[data-tip]::after,
.runner-pause-btn[data-tip]::after,
.runner-quick-shop-btn[data-tip]::after,
.runner-footer-shop-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%) translateY(-2px);
  min-width: 54px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, 0.82);
  background: rgba(248, 250, 252, 0.96);
  color: #020617;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2px;
  text-align: center;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 95;
}
.runner-exit-btn[data-tip]::before,
.runner-mute-btn[data-tip]::before,
.runner-pause-btn[data-tip]::before,
.runner-quick-shop-btn[data-tip]::before,
.runner-footer-shop-btn[data-tip]::before {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(100% + 1px);
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-bottom-color: rgba(248, 250, 252, 0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 94;
}
.runner-exit-btn[data-tip]:hover::after,
.runner-mute-btn[data-tip]:hover::after,
.runner-pause-btn[data-tip]:hover::after,
.runner-quick-shop-btn[data-tip]:hover::after,
.runner-footer-shop-btn[data-tip]:hover::after,
.runner-exit-btn[data-tip]:focus-visible::after,
.runner-mute-btn[data-tip]:focus-visible::after,
.runner-pause-btn[data-tip]:focus-visible::after,
.runner-quick-shop-btn[data-tip]:focus-visible::after,
.runner-footer-shop-btn[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.runner-exit-btn[data-tip]:hover::before,
.runner-mute-btn[data-tip]:hover::before,
.runner-pause-btn[data-tip]:hover::before,
.runner-quick-shop-btn[data-tip]:hover::before,
.runner-footer-shop-btn[data-tip]:hover::before,
.runner-exit-btn[data-tip]:focus-visible::before,
.runner-mute-btn[data-tip]:focus-visible::before,
.runner-pause-btn[data-tip]:focus-visible::before,
.runner-quick-shop-btn[data-tip]:focus-visible::before,
.runner-footer-shop-btn[data-tip]:focus-visible::before {
  opacity: 1;
}
.runner-footer-shop-btn[data-tip]::after {
  top: auto;
  bottom: calc(100% + 6px);
}
.runner-footer-shop-btn[data-tip]::before {
  top: auto;
  bottom: calc(100% - 1px);
  border-bottom-color: transparent;
  border-top-color: rgba(248, 250, 252, 0.96);
}

/* Mobile touch controls */
.runner-touch-controls {
  position: absolute;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 10;
}
.runner-touch-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: color-mix(in srgb, var(--bg-primary) 80%, transparent);
  color: var(--text-secondary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  backdrop-filter: blur(4px);
}
.runner-touch-btn:active {
  background: color-mix(in srgb, var(--text-secondary) 20%, transparent);
  border-color: var(--text-secondary);
}
.runner-touch-jump { border-color: var(--green); color: var(--green); }
.runner-touch-duck { border-color: var(--cyan); color: var(--cyan); }
.runner-touch-dash { border-color: var(--yellow); color: var(--yellow); }

/* Improved ground gaps */
.runner-gap {
  position: absolute;
  bottom: 0;
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 2px,
    var(--red) 2px,
    var(--red) 4px
  );
  opacity: 0.5;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}
.runner-gap.warming {
  opacity: 0.24;
  box-shadow: 0 1px 4px rgba(248,113,113,0.25);
}

/* Skin shop */
.runner-shop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  z-index: 245;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  backdrop-filter: blur(7px);
  font-family: var(--font-sans);
  color: var(--text-secondary);
}
.runner-shop-panel {
  width: min(1120px, 97vw);
  height: min(88vh, 780px);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  border: 2px solid rgba(148, 163, 184, 0.38);
  border-radius: 14px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.58);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.runner-shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: bold;
  flex-shrink: 0;
}
.runner-shop-header > span:first-child {
  font-family: var(--font-display);
  letter-spacing: 0.6px;
}
.runner-shop-coins { color: var(--yellow); }
.runner-shop-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.runner-shop-hint {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  opacity: 0.85;
}
.runner-shop-close {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.8);
  color: #020617;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  border-radius: 7px;
}
.runner-shop-resume {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.8);
  color: #020617;
  cursor: pointer;
  font-size: 11px;
  padding: 0 12px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.runner-shop-resume:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.24);
}
.runner-shop-close:hover {
  background: #fff;
  border-color: rgba(185, 28, 28, 0.95);
  color: #b91c1c;
}
.runner-skin-toolbar {
  padding: 10px 14px 4px;
  flex-shrink: 0;
}
.runner-skin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.runner-skin-filter {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(2, 6, 23, 0.36);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 4px 11px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
}
.runner-skin-filter:hover {
  border-color: rgba(250, 204, 21, 0.55);
  color: #fef3c7;
}
.runner-skin-filter.active {
  border-color: rgba(250, 204, 21, 0.9);
  background: rgba(250, 204, 21, 0.12);
  color: #fde68a;
}
.runner-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 14px;
  overflow-y: auto;
  flex: 1;
  align-content: start;
}
.runner-shop-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(148, 163, 184, 0.36);
  border-radius: 8px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
  font-size: 13px;
}
@media (max-width: 768px) {
  .runner-hud { top: 2px; left: 92px; right: 8px; font-size: 10px; height: 44px; }
  .runner-instructions { top: 23px; max-width: calc(100% - 182px); font-size: 7.5px; padding: 2px 5px; }
  .runner-score { gap: 3px; }
  .runner-score-chip,
  .runner-coins-hud,
  .runner-xp-hud { font-size: 8px; padding: 2px 6px; min-height: 16px; min-width: 74px; }
  .runner-currency-row { top: 22px; right: 8px; gap: 4px; }
  .runner-currency-label { font-size: 6.6px; letter-spacing: 0.55px; }
  .runner-currency-value { font-size: 10.5px; }
  .runner-over { padding: 8px; }
  .runner-over-card { width: min(640px, calc(100% - 6px)); max-height: calc(100vh - 16px); padding: 11px; gap: 8px; }
  .runner-over-title { font-size: 20px; }
  .runner-over-score-panel { min-height: 56px; }
  .runner-over-score-value { font-size: 22px; }
  .runner-over-economy { grid-template-columns: 1fr; gap: 7px; }
  .runner-over-reward-value { font-size: 16px; }
  .runner-over-info { grid-template-columns: 1fr; gap: 8px; }
  .runner-over-left, .runner-over-right { min-height: 0; max-height: 24vh; }
  .runner-over-btn { padding: 7px 12px; font-size: 10px; }
  .runner-powerup-hud { top: 50px; right: 8px; min-width: 118px; }
  .runner-cheater-badge { top: 2px; left: 94px; min-height: 16px; min-width: 68px; font-size: 7px; padding: 2px 6px; }
  .runner-touch-controls { right: 6px; gap: 8px; }
  .runner-shop-panel { width: 97vw; height: min(92vh, 820px); }
  .runner-shop-header { padding: 10px 12px; font-size: 13px; }
  .runner-shop-wallet { gap: 8px; font-size: 10px; }
  .runner-shop-hint { font-size: 8px; }
  .runner-shop-tabs { padding: 6px 8px 0; }
  .runner-shop-tabs button { font-size: 10px; padding: 6px 8px; }
  .runner-skin-toolbar { padding: 8px 8px 4px; }
  .runner-skin-filters { gap: 6px; }
  .runner-skin-filter { font-size: 8px; padding: 3px 8px; }
  .runner-shop-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px; }
  .runner-skin-card { padding: 8px 6px; gap: 4px; }
  .runner-skin-preview { width: 46px; height: 46px; }
  .runner-skin-name { font-size: 10px; }
  .runner-skin-ability { font-size: 8px; min-height: 20px; }
  .runner-rarity-tag { font-size: 7px; }
  .runner-skin-status { font-size: 8px; padding: 2px 6px; }
  .runner-shop-btn { font-size: 9px; padding: 5px 8px; }
  .runner-power-guide { margin: 8px; padding: 8px; }
  .runner-power-guide strong { font-size: 10px; }
  .runner-power-guide span { font-size: 8px; }
  .runner-power-shell { grid-template-columns: 1fr; gap: 8px; padding: 8px; }
  .runner-power-list-wrap { max-height: 36vh; }
  .runner-power-list-head { font-size: 8px; padding: 6px 8px; }
  .runner-power-list { gap: 6px; padding: 6px; }
  .runner-power-list-item { padding: 6px; gap: 3px 6px; grid-template-columns: 20px minmax(0,1fr) auto; }
  .runner-power-list-icon { width: 20px; height: 20px; }
  .runner-power-list-name { font-size: 9px; }
  .runner-power-list-meta { font-size: 7px; }
  .runner-power-list-level { font-size: 8px; }
  .runner-power-pip { width: 11px; height: 4px; }
  .runner-power-detail { padding: 8px; gap: 8px; }
  .runner-power-detail-icon { width: 30px; height: 30px; }
  .runner-power-detail-name { font-size: 13px; }
  .runner-power-detail-desc { font-size: 9px; }
  .runner-power-detail-usage { font-size: 9px; }
  .runner-power-detail-row { font-size: 9px; }
  .runner-power-detail-perk { font-size: 10px; }
  .runner-power-detail-next { font-size: 9px; }
  .runner-power-skin-bonus { font-size: 8px; }
  .runner-power-buy { min-width: 150px; }
  .runner-power-equip { min-width: 100px; }
  .runner-power-slot { min-width: 72px; font-size: 8px; padding: 5px 6px; }
  .runner-shop-resume { min-height: 24px; padding: 0 8px; font-size: 9px; }
  .runner-shop-close { width: 24px; height: 24px; font-size: 15px; }
  .runner-pause-btn { left: 50px; }
  .runner-quick-shop-btn { left: 72px; width: 18px; height: 18px; font-size: 9px; padding: 0; }
}
.runner-skin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.runner-skin-card:hover { border-color: var(--text-secondary); }
.runner-skin-card.equipped {
  border-color: var(--green);
  background: rgba(16,185,129,0.08);
}
.runner-skin-card.locked {
  border-color: rgba(255,255,255,0.05);
}
.runner-skin-card.locked:hover {
  border-color: var(--yellow);
  background: rgba(250,204,21,0.03);
}
.runner-skin-preview {
  width: 56px;
  height: 56px;
  image-rendering: pixelated;
  border-radius: 6px;
  transition: filter 0.3s;
}
.runner-skin-card.owned .runner-skin-preview,
.runner-skin-card.equipped .runner-skin-preview {
  cursor: pointer;
}
.runner-skin-card.owned .runner-skin-preview:hover,
.runner-skin-card.equipped .runner-skin-preview:hover {
  filter: drop-shadow(0 0 8px var(--rarity-color, #fff)) brightness(1.1);
}
.runner-skin-card.locked .runner-skin-preview {
  filter: brightness(0) drop-shadow(0 0 3px rgba(255,255,255,0.15));
}
.runner-skin-card.locked:hover .runner-skin-preview {
  filter: brightness(0) drop-shadow(0 0 6px var(--yellow));
}
.runner-skin-mystery {
  font-size: 22px;
  line-height: 56px;
  text-align: center;
  width: 56px;
  height: 56px;
  color: var(--text-muted);
  opacity: 0.4;
}
.runner-skin-name {
  font-size: 12px;
  text-transform: none;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.25;
  width: 100%;
}
.runner-skin-price {
  font-size: 10px;
  color: var(--yellow);
}
.runner-skin-status {
  display: block;
  width: 100%;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
}
.runner-skin-card.equipped .runner-skin-status {
  border-color: var(--green);
  color: var(--green);
}
.runner-skin-card.owned .runner-skin-status {
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}
.runner-shop-btn {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  margin-top: 4px;
  transition: background 0.2s;
}
.runner-shop-btn:hover { background: rgba(250,204,21,0.1); }
.runner-shop-btn.disabled {
  opacity: 0.38;
  pointer-events: none;
  border-color: rgba(255,255,255,0.14);
  color: var(--text-muted);
}
.runner-shop-wallet {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.runner-shop-xp { color: #22c55e; }
.runner-shop-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 8px 12px 0;
  gap: 6px;
}
.runner-shop-tabs button {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  cursor: pointer;
}
.runner-shop-tabs button.active {
  background: rgba(148,163,184,0.12);
  color: var(--text-secondary);
}
.runner-power-shell {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 14px;
  min-height: 0;
  flex: 1;
}
.runner-power-list-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid rgba(148,163,184,0.24);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.38);
}
.runner-power-list-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148,163,184,0.18);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}
.runner-power-list {
  overflow-y: auto;
  padding: 8px;
  display: grid;
  gap: 8px;
  min-height: 0;
}
.runner-power-list-item {
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  border: 1px solid rgba(148,163,184,0.26);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.48);
  color: var(--text-secondary);
  padding: 8px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
}
.runner-power-list-item:hover {
  border-color: rgba(250,204,21,0.55);
}
.runner-power-list-item.selected {
  border-color: rgba(56,189,248,0.75);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.28) inset;
  background: linear-gradient(180deg, rgba(8,47,73,0.45), rgba(2,6,23,0.58));
}
.runner-power-list-item.equipped {
  border-color: rgba(34,197,94,0.72);
}
.runner-power-list-icon {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  grid-column: 1;
  grid-row: 1 / span 2;
}
.runner-power-list-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
.runner-power-list-name {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}
.runner-power-list-meta {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.runner-power-list-level {
  grid-column: 3;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #67e8f9;
}
.runner-power-list-item .runner-power-pips {
  grid-column: 2 / span 2;
  grid-row: 2;
}
.runner-power-pips {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.runner-power-pip {
  width: 14px;
  height: 5px;
  border-radius: 999px;
  background: rgba(148,163,184,0.26);
  border: 1px solid rgba(148,163,184,0.28);
}
.runner-power-pip.on {
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  border-color: rgba(34,197,94,0.65);
  box-shadow: 0 0 8px rgba(34,197,94,0.35);
}
.runner-power-detail {
  border: 1px solid rgba(148,163,184,0.24);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.45);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.runner-power-detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.runner-power-detail-icon {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 8px rgba(56,189,248,0.35));
}
.runner-power-detail-title-wrap {
  min-width: 0;
}
.runner-power-detail-name {
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
}
.runner-power-detail-desc {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}
.runner-power-detail-usage {
  font-size: 12px;
  color: #67e8f9;
}
.runner-power-detail-usage strong {
  color: #bae6fd;
}
.runner-power-detail-levels {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.2);
  background: rgba(15,23,42,0.55);
}
.runner-power-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #cbd5e1;
}
.runner-power-detail-perk {
  font-size: 12px;
  color: #f8fafc;
  border-left: 3px solid rgba(56,189,248,0.65);
  padding-left: 8px;
}
.runner-power-detail-next {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(148,163,184,0.2);
  background: rgba(2, 6, 23, 0.48);
  border-radius: 8px;
  padding: 7px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.runner-power-detail-next span:first-child {
  color: var(--text-muted);
}
.runner-power-detail-next span:last-child {
  color: #facc15;
  text-align: right;
}
.runner-power-guide {
  margin: 10px 14px 4px;
  padding: 10px 12px;
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.42);
  display: grid;
  gap: 4px;
}
.runner-power-guide strong {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.runner-power-guide span {
  font-size: 10px;
  color: var(--text-muted);
}
.runner-power-guide-tip {
  color: #67e8f9 !important;
}
.runner-power-skin-bonus {
  margin-top: 1px;
  font-size: 10px;
  color: #fde047;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.runner-power-actions {
  margin-top: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.runner-power-buy {
  min-width: 220px;
}
.runner-power-equip {
  min-width: 130px;
}
.runner-power-slots {
  border-top: 1px solid var(--border);
  padding: 10px 14px 14px;
}
.runner-power-slots-title {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.runner-power-slots-row {
  display: flex;
  gap: 8px;
}
.runner-power-slot {
  border: 1px dashed var(--border);
  border-radius: 7px;
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 7px 8px;
  min-width: 95px;
  cursor: pointer;
}
.runner-power-slot.filled {
  border-style: solid;
  border-color: rgba(16,185,129,0.6);
  color: #34d399;
}

.runner-powerup-hud {
  top: 56px;
  right: 10px;
  display: none;
  min-width: 132px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148,163,184,0.26);
  border-radius: 7px;
  padding: 5px 7px;
  backdrop-filter: blur(4px);
}
.runner-powerup-hud.active {
  display: block;
}
.runner-powerup-hud-icon {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  vertical-align: middle;
  margin-right: 6px;
}
.runner-powerup-hud-text {
  display: inline-block;
  font-size: 8px;
  letter-spacing: 0.3px;
  vertical-align: middle;
}
.runner-powerup-hud-bar {
  margin-top: 4px;
  height: 3px;
  border-radius: 2px;
  background: rgba(148,163,184,0.25);
  overflow: hidden;
}
.runner-powerup-hud-fill {
  height: 100%;
  width: 100%;
  background: currentColor;
  transition: width 0.1s linear;
}

.runner-currency-label {
  display: block;
  font-size: 7.5px;
  letter-spacing: 0.7px;
  opacity: 0.82;
  line-height: 1;
  text-transform: uppercase;
}
.runner-currency-value {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.runner-paused-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 26;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 1.2px;
  color: #e2e8f0;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.6);
}
.runner-zone-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.runner-zone-banner-frame {
  width: 120px;
  height: 20px;
  image-rendering: pixelated;
  opacity: 0.58;
}
.runner-boss-wave {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(248,113,113,0.8);
  border-radius: 6px;
  background: rgba(127, 29, 29, 0.75);
  color: #fecaca;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
}
.runner-boss-wave img {
  width: 14px;
  height: 12px;
  image-rendering: pixelated;
}
.runner-area.boss-flash::after {
  opacity: 0.72;
  background: rgba(239, 68, 68, 0.25);
}
.runner-player.giant {
  filter: drop-shadow(0 0 12px rgba(250,204,21,0.65));
}
.runner-area.giant-mode {
  filter: saturate(1.15);
}
.runner-player.invulnerable {
  animation: runnerInvulBlink 0.12s steps(2) infinite;
}
@keyframes runnerInvulBlink {
  from { opacity: 1; }
  to { opacity: 0.45; }
}
.runner-powerup.jetpack { filter: drop-shadow(0 0 8px #fb923c) drop-shadow(0 0 16px rgba(251,146,60,0.4)); }
.runner-powerup.giant { filter: drop-shadow(0 0 8px #facc15) drop-shadow(0 0 16px rgba(250,204,21,0.4)); }
.runner-dash-bar.disabled .runner-dash-fill {
  background: rgba(148,163,184,0.4);
  opacity: 0.35;
}
.runner-coin-sprite {
  animation: coinSpin 1s linear infinite;
}
@keyframes coinSpin {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(250,204,21,0.4)); opacity: 1; }
  50% { filter: drop-shadow(0 0 10px rgba(250,204,21,0.8)); opacity: 0.92; }
}
.runner-gem-sprite {
  animation: gemShimmer 1.1s ease-in-out infinite;
}
@keyframes gemShimmer {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(56,189,248,0.45)); }
  50% { filter: drop-shadow(0 0 12px rgba(56,189,248,0.9)); }
}

@media (max-width: 768px) {
  .runner-power-grid { grid-template-columns: 1fr; }
}

/* Skin unlock celebration overlay */
.runner-unlock-overlay {
  position: fixed;
  inset: 0;
  top: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 260;
  animation: unlockFadeIn 0.3s ease-out;
  overflow: hidden;
}
@keyframes unlockFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.runner-unlock-spotlight {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250,204,21,0.25) 0%, transparent 70%);
  animation: spotlightPulse 1.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes spotlightPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}
.runner-unlock-skin {
  width: 160px;
  height: 160px;
  image-rendering: pixelated;
  animation: unlockBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 30px rgba(250,204,21,0.6));
  z-index: 1;
}
@keyframes unlockBounceIn {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}
.runner-unlock-title {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--yellow);
  margin-top: 18px;
  text-transform: uppercase;
  letter-spacing: 4px;
  animation: unlockTitleIn 0.5s 0.3s ease-out both;
  z-index: 1;
}
@keyframes unlockTitleIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.runner-unlock-name {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  margin-top: 8px;
  animation: unlockNameIn 0.5s 0.5s ease-out both;
  z-index: 1;
}
@keyframes unlockNameIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}
.runner-unlock-quote {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 12px;
  font-style: italic;
  max-width: 340px;
  text-align: center;
  animation: unlockQuoteIn 0.5s 0.8s ease-out both;
  z-index: 1;
}
@keyframes unlockQuoteIn {
  from { opacity: 0; }
  to { opacity: 0.8; }
}
.runner-unlock-dismiss {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 24px;
  opacity: 0;
  animation: unlockDismissIn 0.5s 1.5s ease-out forwards;
  z-index: 1;
}
@keyframes unlockDismissIn {
  from { opacity: 0; }
  to { opacity: 0.5; }
}
.runner-unlock-confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  z-index: 0;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(400px) rotate(720deg) scale(0.3); }
}
.runner-unlock-rarity {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 5px;
  margin-bottom: 10px;
  z-index: 1;
  animation: unlockTitleIn 0.3s 0.1s ease-out both;
}
.runner-unlock-ability {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  z-index: 1;
  animation: unlockQuoteIn 0.5s 1s ease-out both;
}

/* ══════════════════════════════════════════
   Unlock celebration — incremental by rarity
   ══════════════════════════════════════════ */

/* ── COMMON — quick, clean, no extras ── */
.unlock-common {
  animation: unlockFadeIn 0.2s ease-out;
}
.unlock-common .runner-unlock-skin {
  animation: unlockBounceIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.unlock-common .runner-unlock-title { animation: unlockTitleIn 0.4s 0.2s ease-out both; }
.unlock-common .runner-unlock-name { animation: unlockNameIn 0.4s 0.3s ease-out both; }
.unlock-common .runner-unlock-quote { animation: unlockQuoteIn 0.4s 0.5s ease-out both; }
.unlock-common .runner-unlock-ability { animation: unlockQuoteIn 0.4s 0.6s ease-out both; }
.unlock-common .runner-unlock-dismiss { animation: unlockDismissIn 0.5s 1s ease-out forwards; }

/* ── RARE — bigger bounce, brighter spotlight, more presence ── */
.unlock-rare .runner-unlock-spotlight {
  width: 480px;
  height: 480px;
}
.unlock-rare .runner-unlock-skin {
  animation: unlockBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 170px;
  height: 170px;
}
.unlock-rare .runner-unlock-title { animation: unlockTitleIn 0.5s 0.3s ease-out both; }
.unlock-rare .runner-unlock-name {
  animation: unlockNameIn 0.5s 0.5s ease-out both;
  font-size: 30px;
}
.unlock-rare .runner-unlock-dismiss { animation: unlockDismissIn 0.5s 1.5s ease-out forwards; }

/* ── EPIC — flash burst, bigger skin, dramatic stagger ── */
.unlock-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}
.epic-unlock-flash {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168,85,247,0.6) 0%, rgba(168,85,247,0.2) 45%, transparent 70%);
  animation: unlockFlashPulse 0.8s ease-out forwards;
}
@keyframes unlockFlashPulse {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.5); }
}
.unlock-epic {
  animation: unlockFadeIn 0.35s ease-out;
}
.unlock-epic .runner-unlock-spotlight {
  width: 550px;
  height: 550px;
  animation: spotlightPulse 1.2s ease-in-out infinite;
}
.unlock-epic .runner-unlock-skin {
  width: 180px;
  height: 180px;
  animation: unlockEpicSkinIn 0.7s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes unlockEpicSkinIn {
  0% { transform: scale(0) rotate(-25deg); opacity: 0; filter: brightness(2.5); }
  50% { transform: scale(1.15) rotate(5deg); opacity: 1; filter: brightness(1.3); }
  75% { transform: scale(0.96) rotate(-2deg); filter: brightness(1); }
  100% { transform: scale(1) rotate(0); filter: brightness(1); }
}
.unlock-epic .runner-unlock-rarity { animation: unlockTitleIn 0.4s 0.15s ease-out both; }
.unlock-epic .runner-unlock-title { animation: unlockTitleIn 0.5s 0.45s ease-out both; }
.unlock-epic .runner-unlock-name {
  animation: unlockNameIn 0.5s 0.65s ease-out both;
  font-size: 32px;
}
.unlock-epic .runner-unlock-quote { animation: unlockQuoteIn 0.5s 0.9s ease-out both; }
.unlock-epic .runner-unlock-ability { animation: unlockQuoteIn 0.5s 1.1s ease-out both; }
.unlock-epic .runner-unlock-dismiss { animation: unlockDismissIn 0.5s 2s ease-out forwards; }

/* ── LEGENDARY — golden explosion, screen shake, massive reveal ── */
.legendary-unlock-flash {
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(255,220,80,0.9) 0%, rgba(245,158,11,0.4) 30%, rgba(245,158,11,0.1) 55%, transparent 70%);
  animation: unlockFlashBurst 1.3s ease-out forwards;
}
@keyframes unlockFlashBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(0.6); }
  25% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.1); }
  50% { opacity: 0.4; transform: translate(-50%, -50%) scale(1.8); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(3.5); }
}
@keyframes unlockLegendaryShake {
  0%, 100% { transform: translateX(0); }
  12% { transform: translateX(-4px); }
  24% { transform: translateX(4px); }
  36% { transform: translateX(-3px); }
  48% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  72% { transform: translateX(1px); }
}
.unlock-legendary {
  animation: unlockFadeIn 0.5s ease-out, unlockLegendaryShake 0.5s 0.7s ease-out;
}
.unlock-legendary .runner-unlock-spotlight {
  width: 650px;
  height: 650px;
  animation: spotlightPulse 1s ease-in-out infinite;
}
.unlock-legendary .runner-unlock-skin {
  width: 200px;
  height: 200px;
  animation: unlockLegendarySkinIn 0.9s 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes unlockLegendarySkinIn {
  0% { transform: scale(0) rotate(180deg); opacity: 0; filter: brightness(4) drop-shadow(0 0 40px rgba(251,191,36,0.9)); }
  30% { transform: scale(1.25) rotate(-10deg); opacity: 1; filter: brightness(1.8) drop-shadow(0 0 30px rgba(251,191,36,0.7)); }
  50% { transform: scale(0.92) rotate(5deg); filter: brightness(1.2); }
  70% { transform: scale(1.06) rotate(-2deg); filter: brightness(1.05); }
  100% { transform: scale(1) rotate(0); filter: brightness(1); }
}
.unlock-legendary .runner-unlock-rarity {
  animation: unlockLegendaryRarityIn 0.6s 0.9s ease-out both;
}
@keyframes unlockLegendaryRarityIn {
  0% { opacity: 0; letter-spacing: 20px; }
  60% { opacity: 1; letter-spacing: 3px; }
  100% { opacity: 1; letter-spacing: 5px; }
}
.unlock-legendary .runner-unlock-title { animation: unlockTitleIn 0.5s 1.0s ease-out both; }
.unlock-legendary .runner-unlock-name {
  animation: unlockLegendaryNameIn 0.6s 1.2s ease-out both;
  font-size: 34px;
}
@keyframes unlockLegendaryNameIn {
  0% { opacity: 0; transform: scale(0.5); filter: brightness(3); }
  50% { opacity: 1; transform: scale(1.1); filter: brightness(1.4); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}
.unlock-legendary .runner-unlock-quote { animation: unlockQuoteIn 0.5s 1.5s ease-out both; }
.unlock-legendary .runner-unlock-ability { animation: unlockQuoteIn 0.5s 1.8s ease-out both; }
.unlock-legendary .runner-unlock-dismiss { animation: unlockDismissIn 0.5s 3s ease-out forwards; }

/* Legendary backdrop golden flash */
.unlock-legendary::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  animation: unlockBackdropGold 1.5s ease-out;
  pointer-events: none;
}
@keyframes unlockBackdropGold {
  0% { background: rgba(0,0,0,0.92); }
  8% { background: rgba(60,35,0,0.95); }
  20% { background: rgba(30,18,0,0.93); }
  100% { background: transparent; }
}

/* ── Unlock ring expansion ── */
.unlock-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  border: 3px solid var(--unlock-color, #fbbf24);
  transform: translate(-50%, -50%);
  animation: unlockRingExpand 1.2s 0.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
}
.unlock-ring-2 {
  border-width: 2px;
  animation: unlockRingExpand 1.5s 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  filter: blur(2px);
}
.epic-ring {
  border-color: #a855f7;
  animation: unlockRingExpand 1s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes unlockRingExpand {
  0% { width: 0; height: 0; opacity: 0.8; }
  50% { opacity: 0.5; }
  100% { width: 600px; height: 600px; opacity: 0; }
}

/* ── Trading Card Preview ── */
.runner-card-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 260;
  animation: unlockFadeIn 0.3s ease-out;
}
.runner-card-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}
.runner-trading-card {
  position: relative;
  width: 260px;
  padding: 3px;
  border-radius: 14px;
  z-index: 1;
  animation: cardBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cardBounceIn {
  0% { transform: scale(0) rotate(-8deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}

/* ── Rarity border themes ── */
.runner-trading-card.rarity-common {
  background: linear-gradient(160deg, #6b7280 0%, #374151 40%, #6b7280 100%);
}
.runner-trading-card.rarity-rare {
  background: linear-gradient(160deg, #3b82f6 0%, #1e3a5f 35%, #60a5fa 65%, #3b82f6 100%);
}
.runner-trading-card.rarity-epic {
  background: linear-gradient(160deg, #a855f7 0%, #4c1d95 30%, #c084fc 60%, #7c3aed 100%);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}
.runner-trading-card.rarity-legendary {
  background: linear-gradient(160deg, #f59e0b 0%, #92400e 25%, #fbbf24 50%, #f59e0b 75%, #92400e 100%);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.35), 0 0 60px rgba(245, 158, 11, 0.1);
  animation: cardBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), cardLegendaryShine 3s 0.6s linear infinite;
}
@keyframes cardLegendaryShine {
  0% { box-shadow: 0 0 30px rgba(245,158,11,0.35), 0 0 60px rgba(245,158,11,0.1); }
  50% { box-shadow: 0 0 40px rgba(245,158,11,0.5), 0 0 80px rgba(245,158,11,0.15); }
  100% { box-shadow: 0 0 30px rgba(245,158,11,0.35), 0 0 60px rgba(245,158,11,0.1); }
}

/* ── Rarity inner backgrounds ── */
.runner-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 20px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.rarity-common .runner-card-inner {
  background: linear-gradient(180deg, rgba(20, 24, 30, 0.97), rgba(10, 12, 16, 0.97));
}
.rarity-rare .runner-card-inner {
  background: linear-gradient(180deg, rgba(8, 18, 38, 0.97), rgba(2, 8, 24, 0.97));
}
.rarity-epic .runner-card-inner {
  background: linear-gradient(180deg, rgba(18, 8, 36, 0.97), rgba(6, 2, 20, 0.97));
}
.rarity-legendary .runner-card-inner {
  background: linear-gradient(180deg, rgba(28, 16, 4, 0.97), rgba(12, 6, 0, 0.97));
}

/* ── Rarity decorative overlays ── */
.runner-card-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(59, 130, 246, 0.03) 3px,
    rgba(59, 130, 246, 0.03) 4px
  );
  pointer-events: none;
  z-index: 0;
  border-radius: 12px;
}
.runner-card-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.03) 55%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: cardShimmer 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  border-radius: 12px;
}
@keyframes cardShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.runner-card-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  border-radius: 12px;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(251,191,36,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 20%, rgba(251,191,36,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 70%, rgba(251,191,36,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 60%, rgba(251,191,36,0.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 15% 80%, rgba(251,191,36,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 45%, rgba(251,191,36,0.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 90% 85%, rgba(251,191,36,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 15%, rgba(251,191,36,0.4) 0%, transparent 100%);
  animation: cardParticleFloat 4s ease-in-out infinite alternate;
}
@keyframes cardParticleFloat {
  0% { opacity: 0.5; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(-6px); }
}

/* ── Card elements (base styles) ── */
.runner-card-rarity {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 5px;
  margin-bottom: 12px;
  z-index: 1;
}
.rarity-legendary .runner-card-rarity {
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}
.rarity-epic .runner-card-rarity {
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}
.runner-card-spotlight {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  pointer-events: none;
}
.rarity-common .runner-card-spotlight {
  animation: spotlightPulse 2.5s ease-in-out infinite;
  opacity: 0.5;
}
.rarity-rare .runner-card-spotlight {
  animation: spotlightPulse 2s ease-in-out infinite;
  opacity: 0.7;
}
.rarity-epic .runner-card-spotlight {
  animation: spotlightPulse 1.5s ease-in-out infinite;
  opacity: 0.85;
}
.rarity-legendary .runner-card-spotlight {
  animation: spotlightPulse 1.2s ease-in-out infinite;
  width: 240px;
  height: 240px;
}
.runner-card-avatar {
  width: 120px;
  height: 120px;
  image-rendering: pixelated;
  z-index: 1;
}
.runner-card-divider {
  width: 80%;
  height: 1px;
  margin: 14px 0;
  z-index: 1;
  background: linear-gradient(90deg, transparent, var(--card-color), transparent);
}
.rarity-legendary .runner-card-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, #fbbf24, #f59e0b, #fbbf24, transparent);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}
.rarity-epic .runner-card-divider {
  box-shadow: 0 0 4px rgba(168, 85, 247, 0.3);
}
.runner-card-name {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  z-index: 1;
}
.rarity-legendary .runner-card-name {
  background: linear-gradient(90deg, #fbbf24, #fff, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.runner-card-quote {
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: italic;
  color: var(--text-secondary);
  opacity: 0.8;
  margin-top: 4px;
  text-align: center;
  max-width: 220px;
  z-index: 1;
}
.runner-card-power {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 14px;
  z-index: 1;
}
.runner-card-perk {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Card avatar + equip + dismiss ── */
.runner-card-avatar {
  animation: cardBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rarity-legendary .runner-card-avatar {
  animation: cardBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), cardLegendaryFloat 3s 0.7s ease-in-out infinite;
}
@keyframes cardLegendaryFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.runner-card-equip {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  background: transparent;
  border: 2px solid var(--card-color);
  border-radius: 8px;
  padding: 10px 36px;
  margin-top: 18px;
  cursor: pointer;
  z-index: 1;
  transition: background 0.2s, opacity 0.2s, box-shadow 0.2s;
}
.runner-card-equip:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px color-mix(in srgb, var(--card-color) 40%, transparent);
}
.runner-card-equip.equipped {
  color: var(--green);
  border-color: var(--green);
  opacity: 0.7;
  cursor: default;
  box-shadow: none;
}
.runner-card-dismiss {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 14px;
  opacity: 0;
  animation: unlockDismissIn 0.5s 1s ease-out forwards;
  z-index: 1;
}

@media (max-width: 768px) {
  .runner-trading-card { width: 220px; }
  .runner-card-inner { padding: 18px 14px 16px; }
  .runner-card-avatar { width: 90px; height: 90px; }
  .runner-card-rarity { font-size: 9px; letter-spacing: 3px; }
  .runner-card-name { font-size: 16px; }
  .runner-card-quote { font-size: 10px; }
  .runner-card-power { font-size: 10px; }
  .runner-card-equip { font-size: 12px; padding: 8px 28px; }
}

/* Rarity borders on shop cards */
.runner-skin-card.rarity-common { border-color: #9ca3af33; }
.runner-skin-card.rarity-rare { border-color: #3b82f633; }
.runner-skin-card.rarity-epic { border-color: #a855f733; }
.runner-skin-card.rarity-legendary { border-color: #f59e0b44; }
.runner-skin-card.rarity-legendary:not(.locked) {
  box-shadow: 0 0 8px rgba(245,158,11,0.15);
}
.runner-skin-card.equipped { border-color: var(--green) !important; }
.runner-rarity-tag {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}
.runner-skin-ability {
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  min-height: 28px;
  opacity: 0.9;
}

/* Daily deal badge */
.runner-deal-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  font-family: var(--font-mono);
  font-size: 8px;
  background: var(--yellow);
  color: #000;
  padding: 2px 6px;
  border-radius: 0 5px 0 4px;
  font-weight: bold;
  z-index: 2;
}
.runner-skin-card.daily-deal {
  position: relative;
  border-color: var(--yellow) !important;
  background: rgba(250,204,21,0.04);
}
.runner-skin-card.daily-deal .runner-skin-status s {
  opacity: 0.5;
  text-decoration: line-through;
}

/* Skin trail particles */
.runner-skin-trail {
  position: absolute;
  font-size: 8px;
  pointer-events: none;
  z-index: 2;
  animation: skinTrailFade 0.6s ease-out forwards;
}
@keyframes skinTrailFade {
  0% { opacity: 0.7; transform: translateX(0) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-20px) translateY(-8px) scale(0.4); }
}
/* Cheater badge (in-game HUD) */
.runner-cheater-badge {
  position: absolute;
  top: 2px;
  left: 96px;
  min-height: 18px;
  min-width: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: #fecaca;
  letter-spacing: 0.8px;
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.45);
  white-space: nowrap;
  border: 2px solid #9f1d1d;
  border-radius: 6px;
  padding: 3px 8px;
  z-index: 24;
  background: linear-gradient(180deg, rgba(69, 10, 10, 0.94), rgba(31, 6, 6, 0.94));
  box-shadow:
    0 0 0 1px rgba(45, 6, 6, 0.92) inset,
    0 0 0 3px rgba(248, 113, 113, 0.1),
    0 8px 16px rgba(2, 6, 23, 0.48);
  animation: cheaterPulse 1.6s ease-in-out infinite;
  pointer-events: none;
}
.runner-cheater-badge::before {
  content: 'CHEATER RUN';
}
.runner-cheater-badge::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(28, 7, 7, 0.88);
  background: rgba(248, 113, 113, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
@keyframes cheaterPulse {
  0%, 100% { opacity: 0.82; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
}
/* Cheater line on game over */
.runner-cheater-go {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fecaca;
  background: linear-gradient(180deg, rgba(69, 10, 10, 0.92), rgba(31, 6, 6, 0.92));
  border: 2px solid #9f1d1d;
  border-radius: 6px;
  padding: 2px 9px;
  margin-top: 2px;
  box-shadow:
    0 0 0 1px rgba(45, 6, 6, 0.88) inset,
    0 0 0 3px rgba(248, 113, 113, 0.08);
  animation: cheaterPulse 1.5s ease-in-out infinite;
}
.runner-cheater-go::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(28, 7, 7, 0.88);
  background: rgba(248, 113, 113, 0.9);
}
/* Cheater mark on leaderboard scores */
.lb-cheater {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 14px;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.36);
  color: #fecaca;
  font-size: 7px;
  letter-spacing: 0.7px;
  line-height: 1;
}
.lb-cheater-row .lb-score {
  color: #fca5a5;
}

/* Gap absorption animation */
.runner-gap.absorbing {
  opacity: 1;
  height: 12px;
  animation: runner-gap-absorb 0.12s ease-in-out infinite alternate;
}
@keyframes runner-gap-absorb {
  from { box-shadow: 0 0 10px rgba(239,68,68,0.6), inset 0 0 8px rgba(0,0,0,0.8); }
  to { box-shadow: 0 0 25px rgba(239,68,68,1), 0 0 40px rgba(239,68,68,0.5), inset 0 0 12px rgba(0,0,0,1); }
}

/* Moving obstacles */
.runner-obstacle.moving {
  animation: runner-moving-pulse 0.8s ease-in-out infinite;
}
@keyframes runner-moving-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.4); }
}

/* Kill screen */
.runner-area.kill-screen {
  animation: runner-glitch 0.15s steps(2) infinite;
}
@keyframes runner-glitch {
  0% { transform: translate(0, 0) skewX(0deg); filter: hue-rotate(0deg); }
  25% { transform: translate(-3px, 1px) skewX(-1deg); filter: hue-rotate(90deg); }
  50% { transform: translate(2px, -1px) skewX(1deg); filter: hue-rotate(180deg); }
  75% { transform: translate(-1px, 2px) skewX(-0.5deg); filter: hue-rotate(270deg); }
  100% { transform: translate(1px, -1px) skewX(0.5deg); filter: hue-rotate(360deg); }
}
.runner-kill-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 10;
  font-family: monospace;
  font-weight: bold;
  font-size: 20px;
  color: #fff;
  text-shadow: 2px 0 #f87171, -2px 0 #60a5fa, 0 2px #34d399;
  animation: runner-kill-flicker 0.12s steps(1) infinite;
}
@keyframes runner-kill-flicker {
  0%, 40% { opacity: 1; }
  41%, 43% { opacity: 0; }
  44%, 70% { opacity: 1; }
  71%, 72% { opacity: 0.3; }
  73%, 100% { opacity: 1; }
}
.runner-kill-score {
  font-size: 36px;
  background: linear-gradient(90deg, #f87171, #facc15, #34d399, #60a5fa, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: runner-kill-score-glow 0.3s ease-in-out infinite alternate;
}
@keyframes runner-kill-score-glow {
  from { filter: drop-shadow(0 0 4px #fff); transform: scale(1); }
  to { filter: drop-shadow(0 0 12px #facc15); transform: scale(1.1); }
}

/* ═══════════════════════════════════════════
   TERMINAL MODE
═══════════════════════════════════════════ */
#terminal-mode {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--terminal-bg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
#terminal-mode.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.2rem;
  background: #1a1a28;
  border-bottom: 1px solid var(--border);
  -webkit-app-region: drag;
}
.terminal-dots {
  display: flex;
  gap: 8px;
}
.terminal-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.2s;
}
.terminal-dot:hover { opacity: 0.7; }
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }
.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.terminal-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.terminal-exit-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.terminal-exit-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
}
.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-thumb { background: var(--border); }

.terminal-line { margin-bottom: 0.15rem; white-space: pre-wrap; word-break: break-word; }
.terminal-line.output { color: var(--text-secondary); }
.terminal-line.success { color: var(--terminal-green); }
.terminal-line.error { color: var(--red); }
.terminal-line.info { color: var(--cyan); }
.terminal-line.warning { color: var(--yellow); }
.terminal-line.muted { color: var(--text-muted); }
.terminal-line.accent { color: var(--accent-glow); }
.terminal-line.pink { color: var(--pink); }

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 0.2rem;
}
.terminal-prompt {
  color: var(--terminal-prompt);
  white-space: nowrap;
  user-select: none;
}
.terminal-prompt .user { color: var(--terminal-green); }
.terminal-prompt .at { color: var(--text-muted); }
.terminal-prompt .host { color: var(--cyan); }
.terminal-prompt .path { color: var(--accent-glow); }
.terminal-prompt .symbol { color: var(--pink); }
#terminal-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  caret-color: var(--terminal-green);
  padding-left: 0.5rem;
}

/* MATRIX CANVAS */
#matrix-canvas {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #000;
}
#matrix-canvas.active {
  display: block;
}

/* TERMINAL SPINNER */
@keyframes term-spin {
  0% { content: '⠋'; }
  10% { content: '⠙'; }
  20% { content: '⠹'; }
  30% { content: '⠸'; }
  40% { content: '⠼'; }
  50% { content: '⠴'; }
  60% { content: '⠦'; }
  70% { content: '⠧'; }
  80% { content: '⠇'; }
  90% { content: '⠏'; }
}
.term-spinner::before {
  display: inline-block;
  animation: term-spin-frames 0.8s steps(1) infinite;
  color: var(--terminal-green);
}
@keyframes term-spin-frames {
  0% { content: '⠋'; }
  10% { content: '⠙'; }
  20% { content: '⠹'; }
  30% { content: '⠸'; }
  40% { content: '⠼'; }
  50% { content: '⠴'; }
  60% { content: '⠦'; }
  70% { content: '⠧'; }
  80% { content: '⠇'; }
  90% { content: '⠏'; }
}

/* PROGRESS BAR */
.term-progress {
  color: var(--terminal-green);
  font-family: var(--font-mono);
}
.term-progress .bar-fill { color: var(--terminal-green); }
.term-progress .bar-empty { color: var(--text-muted); }

/* BOOT OK TAG */
.boot-ok { color: #22c55e; font-weight: bold; }
.boot-fail { color: #ef4444; font-weight: bold; }

/* SL LOCOMOTIVE */
.sl-container {
  overflow: hidden;
  white-space: pre;
  line-height: 1.15;
  color: var(--text-secondary);
}

/* LOLCAT RAINBOW */
.lolcat { font-weight: bold; }

/* HTOP STYLE */
.htop-bar-used { color: var(--terminal-green); }
.htop-bar-empty { color: var(--text-muted); }

/* HOLLYWOOD */
.hollywood-line {
  color: var(--terminal-green);
  opacity: 0.9;
}

/* SCROLLING REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Hero is always above-fold — animate via CSS only, no JS dependency */
.hero > .reveal {
  opacity: 1;
  transform: none;
  animation: heroFadeIn 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
}

/* ASCII ART */
.ascii-art {
  color: var(--accent-glow);
  line-height: 1.2;
  font-size: 0.65rem;
}

/* TABLE */
.term-table {
  color: var(--text-secondary);
}
.term-table .header { color: var(--cyan); font-weight: bold; }
.term-table .key { color: var(--terminal-green); }

/* ═══════════════════════════════════════════
   RESPONSIVE — Tablet
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-links { position: static; transform: none; }
  .nav-links a { font-size: 0.7rem; padding: 0.3rem 0.4rem; }
  .exp-item { grid-template-columns: 120px 1fr; gap: 1.5rem; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
}

/* RESPONSIVE — Mobile */
@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .terminal-toggle { display: none !important; }
  .nav-divider { display: none !important; }
  .nav-hamburger { display: flex; }
  .mobile-nav { display: flex; }
  nav { padding: 0 1rem; width: calc(100% - 16px); top: 8px; }

  section { padding: 4rem 1.2rem; }
  .hero {
    padding: 5rem 1.2rem 3rem;
    min-height: auto;
  }
  .hero h1 { letter-spacing: -1px; }

  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo { margin: 0 auto; }
  .about-stats { gap: 1.5rem; }

  .skills-grid { grid-template-columns: 1fr; }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .exp-date { padding-top: 0; }

  .projects-grid { grid-template-columns: 1fr; }

  .cert-item {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }

  .contact-links { gap: 1rem; }

  .blog-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* RESPONSIVE — Small phones */
@media (max-width: 400px) {
  .hero h1 { font-size: 2rem; }
  .hero-sub, .hero p { font-size: 0.9rem; }
  .about-stats { flex-wrap: wrap; gap: 1.5rem 2rem; }
  .hero-cta { gap: 0.75rem; }
  .btn { padding: 0.65rem 1.2rem; font-size: 0.8rem; }
}

/* RESPONSIVE — Terminal on tablet */
@media (max-width: 768px) {
  .terminal-body {
    padding: 1rem;
    font-size: 0.78rem;
    line-height: 1.6;
  }
  #terminal-input { font-size: 0.78rem; }
  .terminal-exit-btn { font-size: 0.65rem; padding: 0.25rem 0.6rem; }
  .terminal-bar { padding: 0.6rem 0.8rem; }
}

/* RESPONSIVE — Terminal on phones */
@media (max-width: 480px) {
  .terminal-body {
    padding: 0.5rem;
    font-size: 0.62rem;
    line-height: 1.5;
  }
  #terminal-input { font-size: 0.62rem; }
  .terminal-title { font-size: 0.65rem; }
  .terminal-bar { padding: 0.5rem 0.6rem; }
  .terminal-exit-btn span { display: none; }
  .terminal-dot { width: 10px; height: 10px; }
}

/* ═══════════════════════════════════════════
   PREFERS-REDUCED-MOTION
═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  #bg-canvas {
    display: none;
  }
  .mario-mushroom {
    display: none;
  }
}

/* ═══════════════════════════════════════════
   PRINT STYLESHEET
═══════════════════════════════════════════ */
@media print {
  :root {
    --bg-primary: #fff;
    --bg-secondary: #fff;
    --bg-tertiary: #f5f5f5;
    --text-primary: #000;
    --text-secondary: #333;
    --text-muted: #666;
    --accent: #b45309;
    --border: #ddd;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  #bg-canvas,
  .noise,
  #terminal-mode,
  .terminal-toggle,
  .nav-icon-btn,
  .theme-switch,
  .nav-divider,
  .nav-hamburger,
  .mobile-nav,
  .hero-cta .btn-ghost:last-child,
  .mario-mushroom,
  .footer-avatar-wrap,
  .runner-footer-shop-btn,
  .blog-coming-soon {
    display: none !important;
  }

  nav {
    position: static;
    transform: none;
    width: auto;
    max-width: none;
    border-radius: 0;
    background: none;
    backdrop-filter: none;
    border: none;
    border-bottom: 2px solid #000;
    box-shadow: none;
    padding: 0.5rem 0;
  }

  .nav-links {
    position: static;
    transform: none;
  }

  .nav-links a:not([href="#about"]):not([href="#skills"]):not([href="#experience"]):not([href="#projects"]):not([href="#contact"]) {
    display: none;
  }

  section {
    padding: 1.5rem 0;
    break-inside: avoid;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0 1rem;
  }

  .project-card,
  .blog-card,
  .testimonial-card,
  .cert-item {
    break-inside: avoid;
    border-color: #ccc;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  nav a[href]::after,
  .hero-cta a[href]::after,
  .contact-link::after {
    content: "";
  }

  footer {
    border-top: 1px solid #ccc;
    padding: 1rem 0;
  }
}
