* { box-sizing: border-box; }

/* Global Button Reset */
button {
  border: none;
  outline: none;
  font-family: inherit;
}

:root {
  --bg: #0b0f19;
  --card-bg: #151d30;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #22304d;
}

body {
  margin: 0;
  padding: 1rem 0.75rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

body {
  margin: 0;
  padding: 1rem 0.75rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* Text Selection */
canvas, button, .nav-pill, .badge-sep, .btn-cancel, select, .dev-tools-drawer summary {
  user-select: none;
  -webkit-user-select: none;
}
body, p, span, h1, h2, h3, h4, h5, h6, .telemetry, .telemetry div, .trigger-label, .trigger-label span, .trigger-label strong, .bench-label, .bench-val, .diagnostic-msg, .footer-brand, .footer-nav, .footer-trust, .crawler-section, .crawler-section p, .crawler-section li, .crawler-section code, .crawler-section pre, .hero-section, .hero-subtitle, .about-main, .about-main p, .about-main li {
  user-select: text !important;
  -webkit-user-select: text !important;
}
::selection {
  background: rgba(56, 189, 248, 0.3);
  color: #ffffff;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: calc(100% + 2rem);
  margin: -2rem -1rem 1.25rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e293b;
  padding: 0 1.5rem;
}
.navbar-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.3px;
}
.navbar-brand span { color: var(--accent); }
.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}
.nav-links {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.nav-pill {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.nav-pill:hover {
  color: var(--text);
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.25);
}
.nav-pill.active {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
}

/* Legacy header (subpages) */
header { text-align: center; margin-bottom: 0.4rem; }
header h1 { margin: 0; font-size: 1.9rem; font-weight: 800; color: var(--text); }
header h1 span { color: var(--accent); }
.subtitle { color: var(--text-muted); margin-top: 0.25rem; font-size: 0.88rem; }

/* Hero Card */
.hero-card {
  background: linear-gradient(180deg, #161f36 0%, #0d1527 100%);
  border: 1px solid #2a3b5c;
  border-radius: 20px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 30px -10px rgba(56, 189, 248, 0.15);
  padding: 3rem 2rem;
  max-width: 580px;
  width: 100%;
  margin: 2.5rem auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* Radar Icon */
.radar-icon {
  position: relative;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.radar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.5);
  animation: radarPulse 2s ease-out infinite;
}
.radar-ring-2 { animation-delay: 0.7s; }
@keyframes radarPulse {
  0% { transform: scale(0.55); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
.gamepad-icon {
  width: 42px;
  height: 42px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

/* Hero Text */
.hero-heading {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.hero-subtext {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.55;
  max-width: 400px;
}

/* CTA Button */
.cta-button {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  color: #ffffff;
  padding: 0.75rem 1.75rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  outline: none;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6);
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
}
.cta-button:active { transform: translateY(0); }

/* Badge Ribbon */
.badge-ribbon {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  max-width: 580px;
  width: 100%;
  margin: -1.5rem auto 1rem;
}
.badge-pill {
  background: #151d30;
  border: 1px solid #22304d;
  font-size: 0.8rem;
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  color: #94a3b8;
  white-space: nowrap;
}
.badge-sep {
  color: #334155;
  font-size: 0.7rem;
  user-select: none;
}

/* Dev Tools Drawer */
.dev-tools-drawer {
  background: rgba(56, 189, 248, 0.06);
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 0;
  margin-bottom: 0.5rem;
  max-width: 920px;
  width: 100%;
  font-size: 0.75rem;
}
.dev-tools-drawer summary {
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  font-weight: 700;
  color: var(--accent);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dev-tools-drawer summary::-webkit-details-marker { display: none; }
.dev-tools-drawer summary::after {
  content: "+";
  font-size: 1rem;
  transition: transform 0.2s;
  margin-left: auto;
}
.dev-tools-drawer[open] summary::after { transform: rotate(45deg); }
.dev-tools-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0 0.75rem 0.5rem;
}
.dev-tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.dev-tools-row .slider-group { display: flex; align-items: center; gap: 0.25rem; }
.dev-tools-row .slider-group label { font-size: 0.7rem; color: var(--text-muted); }
.dev-tools-row .slider-group input[type="range"] { width: 80px; accent-color: var(--accent); }
.dev-tools-row .slider-group span { font-size: 0.7rem; color: var(--text-muted); font-family: monospace; }
.dev-hint {
  color: var(--text-muted);
  font-size: 0.65rem;
  margin-left: auto;
}

/* Action Button */
.action-button {
  display: block;
  margin: 0.5rem auto 1rem;
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  color: #fff;
  padding: 0.55rem 1.5rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  outline: none;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
}
.action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.5);
}
.action-button:active { transform: translateY(0); }

/* Dev Tools Toggle Button (in topbar) */
.dev-tools-toggle {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  color: #94a3b8;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.dev-tools-toggle:hover {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: translateY(-1px);
}
.dev-tools-toggle.active {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}
.dev-tools-toggle.active:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
}

button {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}
button:hover { background: var(--border); border-color: var(--accent); }
button.btn-primary { background: var(--accent); color: #0b0f19; border: none; }
button.btn-primary:hover { opacity: 0.9; }
button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Waiting State */
#waiting-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  text-align: center;
  gap: 1.25rem;
  padding: 2rem 1rem;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

/* Active Content State */
#active-content {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Connection Badge */
.connection-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  color: var(--text);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}
.waiting-text { font-weight: 600; }
.waiting-subtext {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0;
  max-width: 480px;
  line-height: 1.5;
}
.sim-toggle-link {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sim-toggle-link:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--accent);
  color: var(--text);
}

/* Waiting State Controller Silhouette */
.waiting-silhouette {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 320px;
}
.waiting-silhouette svg {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
}

/* Compact Topbar (Active State) */
.compact-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
  margin-bottom: 0.5rem;
  max-width: 920px;
  width: 100%;
  font-size: 0.8rem;
}
.comp-brand {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}
.comp-brand span { color: var(--accent); }
.comp-device {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.comp-device .controller-name { font-weight: 600; color: var(--text); }
.comp-device .connection-slot { color: var(--text-muted); font-size: 0.75rem; }
.comp-device .polling-tier { display: flex; align-items: center; gap: 0.3rem; }
.comp-device .polling-tier .latency-val { color: var(--text-muted); font-family: monospace; font-size: 0.7rem; }
.comp-device .tier-badge { font-size: 0.6rem; padding: 0.15rem 0.45rem; }

/* Dashboard */
.dashboard {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 1rem !important;
  max-width: 920px !important;
  width: 100% !important;
  margin: 0.5rem auto !important;
}
.stick-card {
  flex: 1 1 360px !important;
  max-width: 400px !important;
  background: #151d30 !important;
  border: 1px solid #22304d !important;
  border-radius: 12px !important;
  padding: 0.9rem !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.35);
  position: relative;
}
.card-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  margin-bottom: 0.25rem;
}
.card-title { font-size: 1rem; font-weight: 700; margin: 0; }
.grade-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.grade-a { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.grade-b { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.grade-c { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

/* Canvas */
.canvas-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  margin: 0.2rem 0;
  touch-action: none;
}
canvas {
  background: #0d1322;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: block;
  cursor: crosshair;
}

/* Override Hint */
.override-hint {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed var(--accent);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.05);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.override-hint.active { opacity: 1; }

/* Benchmark Panel */
.benchmark-panel {
  width: 100%;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem;
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.bench-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
}
.bench-label { color: var(--text-muted); }
.bench-val { font-weight: 700; font-family: monospace; }

/* Telemetry - High Contrast & Legible */
.telemetry {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
  margin-top: 0.4rem;
  font-family: 'SF Mono', Consolas, Monaco, monospace;
  font-size: 0.95rem;
  line-height: 1.4;
}
.telemetry div {
  padding: 0.25rem;
}
.telemetry div span {
  display: block;
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.15rem;
}
.telemetry div strong {
  display: block;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'SF Mono', Consolas, Monaco, monospace;
}

.diagnostic-msg {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
  min-height: 1.6rem;
  line-height: 1.4;
}

/* Triggers - Compact & Legible */
.trigger-section {
  width: 100%;
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.trigger-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #cbd5e1;
  font-weight: 500;
}
.trigger-label strong {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'SF Mono', Consolas, Monaco, monospace;
}
.trigger-track {
  position: relative;
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: visible;
}
.trigger-fill {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--border), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.1s ease;
}
.trigger-fill.l2 { background: linear-gradient(90deg, var(--border), #10b981); }
.trigger-fill.r2 { background: linear-gradient(90deg, var(--border), #f59e0b); }
.trigger-knob {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--text);
}

/* Rumble - Compact */
.rumble-section {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.2rem;
  width: 100%;
}
.rumble-section button { flex: 1; padding: 0.35rem 0.5rem; font-size: 0.7rem; }
.rumble-section button.rumble-left { border-color: #10b981; }
.rumble-section button.rumble-right { border-color: var(--warning); }
.rumble-section button:disabled { opacity: 0.4; cursor: not-allowed; }
@keyframes rumbleShake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  12% { transform: translateX(-2px) rotate(-0.3deg); }
  25% { transform: translateX(1px) rotate(0.3deg); }
  37% { transform: translateX(-1px) rotate(-0.2deg); }
  50% { transform: translateX(1px) rotate(0.2deg); }
  62% { transform: translateX(-1px) rotate(-0.1deg); }
  75% { transform: translateX(1px) rotate(0.1deg); }
  87% { transform: translateX(-1px) rotate(0deg); }
}
.rumble-active { animation: rumbleShake 0.12s ease-in-out 3; }

/* Dev Tools Inputs (in drawer) */
.dev-tools-body input[type="range"] {
  width: 80px;
  accent-color: var(--accent);
}
.dev-tools-body .slider-group { display: flex; align-items: center; gap: 0.25rem; }

/* Controller SVG */
.controller-section,
.controller-svg-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.controller-svg,
svg.controller-faceplate {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
}
.controller-svg .btn-base {
  transition: all 0.08s ease;
  cursor: pointer;
}
.controller-svg .btn-base.pressed {
  filter: drop-shadow(0 0 8px var(--accent));
  opacity: 1;
}
.controller-svg .btn-base.inactive { opacity: 0.35; }

/* Button Matrix */
.button-matrix {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.8rem;
}
.button-matrix button {
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  min-width: 60px;
}

/* Report Modal */
.report-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.report-modal.active { opacity: 1; visibility: visible; }
.report-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
}
.report-canvas-wrap { text-align: center; margin: 1rem 0; }
.report-canvas-wrap canvas {
  background: #0d1322;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 100%;
}
.report-actions { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1rem; }

/* Modal Close Controls */
.modal-header {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}
.modal-close-btn {
  position: absolute;
  right: 0.5rem;
  top: -0.25rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.btn-cancel {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-cancel:hover {
  background: #334155;
  color: #ffffff;
}

/* Footer — High-Authority E-E-A-T */
.site-footer {
  width: 100%;
  max-width: 960px;
  margin: 3rem auto 0;
  padding: 2.5rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, #0b0f19 100%);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand h3 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}
.footer-brand h3 span { color: var(--accent); }
.footer-brand p { margin: 0.25rem 0; color: var(--text-muted); font-size: 0.9rem; }
.footer-tagline { color: var(--accent) !important; font-weight: 600; font-size: 0.85rem !important; }
.footer-nav h4 { margin: 0 0 0.75rem; font-size: 0.85rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin: 0.5rem 0; }
.footer-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; transition: color 0.15s; }
.footer-nav a:hover { color: var(--accent); }
.footer-trust h4 { margin: 0 0 0.75rem; font-size: 0.85rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }
.footer-trust ul { list-style: none; padding: 0; margin: 0; }
.footer-trust li { margin: 0.5rem 0; color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; }
.footer-trust strong { color: var(--text); }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.footer-bottom .copyright { margin: 0 0 0.25rem; }
.footer-bottom .attribution { margin: 0; font-family: monospace; font-size: 0.75rem; color: #475569; }

/* Legacy Footer (subpages without .site-footer) */
footer {
  width: 100%;
  max-width: 960px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer .share-text {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-family: monospace;
  font-size: 0.8rem;
  word-break: break-all;
}
.share-buttons { display: flex; gap: 0.5rem; justify-content: center; }
.share-buttons button {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.share-buttons .btn-reddit { border-color: #ff4500; color: #ff4500; }
.share-buttons .btn-discord { border-color: #5865f2; color: #5865f2; }
.share-buttons .btn-twitter { border-color: #1da1f2; color: #1da1f2; }

/* Recommendations */
.recommendations-section {
  width: 100%;
  max-width: 960px;
  margin: 1.5rem auto;
  padding: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}
.rec-header {
  text-align: center;
  margin-bottom: 0.75rem;
}
.rec-header h2 { margin: 0; font-size: 1.3rem; color: var(--text); }
.rec-header p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.25rem; }
.rec-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.rec-card {
  background: rgba(11, 15, 25, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.rec-card .rec-card-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.rec-card .rec-card-body {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.rec-card ul { margin: 0.3rem 0; padding-left: 1.2rem; }
.rec-card ul li { margin: 0.2rem 0; }
.rec-card .rec-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.3rem;
}
.rec-card .rec-actions button {
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
}
.rec-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.rec-badge-a { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.rec-badge-b { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.rec-badge-c { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* Controller Variants */
.controller-variant-ps5 .btn-base.inactive { opacity: 0.4; filter: hue-rotate(-10deg) saturate(1.2); }
.controller-variant-xbox .btn-base.inactive { opacity: 0.4; }
.controller-variant-switch .btn-base.inactive { opacity: 0.4; filter: hue-rotate(120deg); }

/* --- Crawler Content Sections --- */
.crawler-section {
  width: 100%;
  max-width: 960px;
  margin: 2rem auto;
  background: linear-gradient(180deg, #151d30 0%, #111827 100%);
  border: 1px solid #22304d;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}
.crawler-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.3rem;
  color: var(--text);
  border-bottom: 2px solid rgba(56, 189, 248, 0.2);
  padding-bottom: 0.6rem;
  letter-spacing: -0.2px;
}
.crawler-section h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.1px;
}
.crawler-section p, .crawler-section li {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.9rem;
}
.crawler-section p { margin: 0.5rem 0; }
.crawler-section strong { color: var(--text); }
.crawler-section ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0;
}
.crawler-section ul li { margin: 0.3rem 0; }
.crawler-section code, .crawler-section p[style*="monospace"] {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
}

/* Deadzone Reference Table */
.deadzone-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.88rem;
}
.deadzone-table th, .deadzone-table td {
  padding: 0.5rem 0.75rem;
  text-align: center;
  border: 1px solid var(--border);
}
.deadzone-table th {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.deadzone-table td { color: var(--text-muted); }
.deadzone-table td.highlight { color: var(--text); }

/* FAQ Accordion */
.faq-accordion { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.faq-item {
  border: 1px solid #22304d;
  border-radius: 12px;
  background: rgba(11, 15, 25, 0.5);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item:hover { border-color: #2e4270; }
.faq-item.open { border-color: rgba(56, 189, 248, 0.35); }
.faq-question {
  font-weight: 700;
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  font-size: 0.92rem;
  transition: color 0.15s ease;
}
.faq-question:hover { color: var(--accent); }
.faq-question::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: transform 0.25s ease, color 0.15s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-question.active::after { content: "−"; color: var(--accent); transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  padding: 0 1.1rem;
}
.faq-answer p {
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  padding: 0 0 0.9rem;
  font-size: 0.88rem;
}

/* About Page Styles */
.about-main {
  width: 100%;
  max-width: 960px;
  padding: 1rem 0 3rem;
}
.hero-section {
  text-align: center;
  padding: 2rem 1rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #151d30 0%, #0d1527 100%);
  border: 1px solid #2a3b5c;
  border-radius: 20px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 30px -10px rgba(56, 189, 248, 0.15);
}
.hero-section h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}
.hero-section h1 span { color: var(--accent); }
.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.trust-badges .badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.about-main .crawler-section {
  margin: 1.5rem 0;
}
.about-main .crawler-section h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(56, 189, 248, 0.2);
}
.about-main .crawler-section h3 {
  font-size: 1.1rem;
  color: var(--accent);
  margin-top: 1.5rem;
}
.about-main .crawler-section pre {
  background: #0d1322;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}
.about-main .crawler-section pre code {
  background: transparent;
  border: none;
  color: var(--accent);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
}
.about-main .crawler-section code:not(pre code) {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  color: var(--accent);
}
.about-main .crawler-section ul li { margin: 0.4rem 0; }
.about-main .crawler-section ol { padding-left: 1.5rem; }
.about-main .crawler-section ol li { margin: 0.4rem 0; }
.about-main .crawler-section table { font-size: 0.85rem; }
.about-main .crawler-section table th,
.about-main .crawler-section table td { padding: 0.6rem 0.85rem; }
.about-main .crawler-section strong { color: var(--text); }

/* Responsive */
@media (max-width: 768px) {
  body { padding: 0.75rem 0.5rem; }
  h1 { font-size: 1.6rem; }
  .navbar {
    width: calc(100% + 1rem);
    margin: -0.75rem -0.5rem 0.75rem;
    padding: 0 0.75rem;
  }
  .navbar-inner { height: auto; padding: 0.5rem 0; flex-wrap: wrap; gap: 0.4rem; }
  .nav-links { flex-wrap: wrap; gap: 0.3rem; }
  .nav-pill { font-size: 0.7rem; padding: 0.25rem 0.55rem; }
  .hero-card { padding: 1.5rem 1rem; margin: 1rem auto; }
  .hero-heading { font-size: 1.25rem; }
  .hero-subtext { font-size: 0.85rem; }
  .badge-ribbon { margin: -0.5rem auto 0.75rem; }
  .badge-pill { font-size: 0.7rem; padding: 0.25rem 0.6rem; }
  .compact-topbar { padding: 0.3rem 0.5rem; font-size: 0.7rem; }
  .comp-brand { font-size: 0.9rem; }
  .comp-device .controller-name { font-size: 0.75rem; }
  .comp-device .connection-slot { font-size: 0.65rem; }
  .comp-device .polling-tier .latency-val { font-size: 0.6rem; }
  .comp-device .tier-badge { font-size: 0.55rem; }
  .dashboard {
    flex-direction: column !important;
    gap: 0.75rem;
    align-items: center !important;
  }
  .stick-card { min-width: 100%; max-width: 100%; padding: 0.75rem !important; }
  .canvas-wrap { width: 170px; height: 170px; }
  .card-title { font-size: 0.9rem; }
  .bench-row { font-size: 0.75rem; }
  .telemetry {
    font-size: 0.85rem;
    padding: 0.4rem;
  }
  .telemetry div span { font-size: 0.65rem; }
  .telemetry div strong { font-size: 0.9rem; }
  .diagnostic-msg { font-size: 0.75rem; min-height: 1.4rem; }
  .trigger-track { height: 6px; }
  .trigger-knob { width: 10px; height: 10px; }
  .rumble-section button { padding: 0.3rem 0.4rem; font-size: 0.65rem; }
  .dev-tools-drawer { font-size: 0.7rem; }
  .dev-tools-row .slider-group input[type="range"] { width: 60px; }
  .action-button { padding: 0.5rem 1.2rem; font-size: 0.8rem; }
  .crawler-section { padding: 1rem; }
}