/* PULSE - Figma Design System ported to vanilla CSS
   Tokens from Design AR Glasses Prediction Game /src/app/App.tsx + TokenSheet
   Goal: smooth AR glasses UX, minimal distraction, 600x600 WebView, 480x480 safe zone
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --pulse-bg-900: #0A0A0A;
  --pulse-bg-800: #141414;
  --pulse-bg-700: #1E1E1E;
  --pulse-text-100: #FFFFFF;
  --pulse-text-400: #8A8A8A;
  --pulse-text-300: #AAAAAA;
  --pulse-lime: #C6FF00;
  --pulse-lime-dim: rgba(198,255,0,0.12);
  --pulse-lime-border: rgba(198,255,0,0.30);
  --pulse-lime-glow: rgba(198,255,0,0.35);
  --pulse-cyan: #00F5FF;
  --pulse-cyan-dim: rgba(0,245,255,0.12);
  --pulse-cyan-border: rgba(0,245,255,0.25);
  --pulse-success: #00E676;
  --pulse-danger: #FF4D4D;
  --pulse-danger-dim: rgba(255,77,77,0.12);
  --pulse-yellow: #FFD600;
  --pulse-yellow-dim: rgba(255,214,0,0.15);
  --pulse-border: #222222;
  --pulse-border-light: rgba(255,255,255,0.06);
  --pulse-radius-card: 16px;
  --pulse-radius-pill: 999px;
  --pulse-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --pulse-font-mono: 'JetBrains Mono', monospace;
  --pulse-min-tap: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--pulse-font-sans);
  background: #080808;
  color: var(--pulse-text-100);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

/* 600x600 AR HUD frame - from Figma Frame component */
.app-600 {
  width: 600px;
  height: 600px;
  background: var(--pulse-bg-900);
  border-radius: 28px;
  border: 2px solid var(--pulse-lime);
  box-shadow: 0 0 0 1px rgba(198,255,0,0.1), 0 24px 64px rgba(0,0,0,0.8), 0 0 120px rgba(198,255,0,0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: var(--pulse-font-sans);
}

/* Safe zone indicator - 480x480 centered dashed, from Figma Frame */
.app-600::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 60px;
  width: 480px;
  height: 480px;
  border: 1px dashed rgba(198,255,0,0.08);
  border-radius: 16px;
  pointer-events: none;
  z-index: 0;
}

/* Header - matches Figma ScreenPicker header */
.hud-header {
  padding: 14px 16px 12px;
  background: rgba(10,10,10,0.95);
  border-bottom: 1px solid var(--pulse-border);
  position: relative;
  z-index: 2;
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--pulse-text-100);
  line-height: 1;
}
.subtitle {
  display: none; /* Figma hides subtitle for minimal */
}
.header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--pulse-radius-pill);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--pulse-font-mono);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.connection-status.mock {
  background: rgba(0,245,255,0.10);
  color: var(--pulse-cyan);
  border-color: rgba(0,245,255,0.20);
}
.connection-status.live {
  background: rgba(0,230,118,0.12);
  color: var(--pulse-success);
  border-color: rgba(0,230,118,0.25);
}
.connection-status.polling { background: rgba(255,214,0,0.10); color: var(--pulse-yellow); border-color: rgba(255,214,0,0.20); }
.connection-status.connecting { background: rgba(255,214,0,0.10); color: var(--pulse-yellow); border-color: rgba(255,214,0,0.20); }
.connection-status.disconnected { background: var(--pulse-danger-dim); color: var(--pulse-danger); border-color: rgba(255,77,77,0.2); }

.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--pulse-radius-pill);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--pulse-font-mono);
  background: var(--pulse-lime-dim);
  color: var(--pulse-lime);
  border: 1px solid var(--pulse-lime-border);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.balance-chip:hover { background: rgba(198,255,0,0.20); transform: scale(1.02); }
.balance-chip:active { transform: scale(0.98); }
.balance-chip #header-balance { font-weight: 800; }

/* Screens */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
  padding: 0;
}
.screen.hidden { display: none !important; }
.screen-header {
  padding: 0 0 10px 0;
  border-bottom: none;
}
.screen-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pulse-text-400);
  font-family: var(--pulse-font-mono);
}
.screen-hint {
  font-size: 11px;
  color: var(--pulse-text-400);
  margin-top: 4px;
  font-family: var(--pulse-font-mono);
}

/* Picker - Figma card style */
.picker-screen-inner { padding: 0 16px 12px; display: flex; flex-direction: column; height: 100%; }
#picker-screen .screen-header { padding: 10px 16px 8px; }
.picker-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 8px 0;
}
.picker-list.hidden { display: none; }
.picker-row {
  background: var(--pulse-bg-800);
  border: 1px solid var(--pulse-border);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease-out;
  position: relative;
}
.picker-row:hover {
  border-color: rgba(198,255,0,0.35);
  background: #1A1A1A;
  transform: translateY(-1px);
}
.picker-row:focus {
  outline: none;
  border-color: rgba(198,255,0,0.45);
  background: #1E1E1E;
  box-shadow: 0 0 0 2px rgba(198,255,0,0.18);
}
.picker-row:focus-visible {
  border-color: var(--pulse-lime);
  box-shadow: 0 0 0 2px rgba(198,255,0,0.30), 0 0 20px rgba(198,255,0,0.15);
}
.picker-row:active { transform: scale(0.98); }

/* Debug D-pad for localhost testing — simulates wristband swipe */
#dpad-debug {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(10,10,10,0.92);
  border: 1px solid rgba(198,255,0,0.25);
  border-radius: 14px;
  padding: 8px;
  backdrop-filter: blur(8px);
}
#dpad-debug .dpad-row { display: flex; gap: 4px; }
#dpad-debug button {
  width: 44px; height: 36px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--pulse-text-100);
  border-radius: 10px;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
}
#dpad-debug button:hover { background: rgba(198,255,0,0.15); border-color: rgba(198,255,0,0.35); }
#dpad-debug button:active { transform: scale(0.95); }
#dpad-debug .dpad-label {
  font-size: 9px; color: var(--pulse-text-400); font-family: var(--pulse-font-mono);
  letter-spacing: 0.08em; margin-bottom: 2px;
}
.picker-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.sport-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--pulse-radius-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--pulse-cyan-dim);
  color: var(--pulse-cyan);
  border: 1px solid var(--pulse-cyan-border);
  font-family: var(--pulse-font-mono);
  width: fit-content;
}
.sport-tag .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--pulse-cyan); display: inline-block;
}
.picker-volume {
  font-size: 11px;
  color: var(--pulse-text-400);
  font-family: var(--pulse-font-mono);
}
.picker-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--pulse-text-100);
  line-height: 1.25;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.picker-hint {
  font-size: 11px;
  color: var(--pulse-text-400);
  font-family: var(--pulse-font-mono);
}
.picker-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  gap: 14px;
}
.picker-state.hidden { display: none; }
.skeleton-row {
  width: 100%; height: 92px;
  background: linear-gradient(90deg, #1A1A1A 25%, #222 50%, #1A1A1A 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
  border-radius: 16px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.empty-icon { font-size: 28px; color: var(--pulse-text-400); opacity: 0.5; }
.empty-text { font-size: 13px; color: var(--pulse-text-400); text-align: center; }
.error-text { font-size: 13px; color: var(--pulse-danger); }
.outcome-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.outcome-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--pulse-radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.07);
  color: var(--pulse-text-100);
  border: 1px solid var(--pulse-border);
}
.outcome-chip.ai-pick {
  background: rgba(198,255,0,0.15);
  color: var(--pulse-lime);
  border-color: rgba(198,255,0,0.40);
}
.outcome-chip .star { color: var(--pulse-lime); font-size: 10px; }

/* Duel header - Figma style */
.duel-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--pulse-border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20,20,20,0.6);
  backdrop-filter: blur(8px);
}
.icon-button {
  background: transparent;
  border: 1px solid var(--pulse-border);
  color: var(--pulse-text-400);
  width: 32px; height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}
.icon-button:hover { border-color: var(--pulse-text-400); color: var(--pulse-text-100); }
.duel-title-wrap { flex: 1; min-width: 0; }
.duel-market-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--pulse-text-100); }
.duel-volume { font-size: 11px; color: var(--pulse-text-400); font-family: var(--pulse-font-mono); text-align: right; }

/* HUD sections - Figma card */
.hud {
  flex: 1;
  padding: 10px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.hud-section {
  background: var(--pulse-bg-800);
  border: 1px solid var(--pulse-border);
  border-radius: 16px;
  padding: 12px;
}
.section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--pulse-text-400);
  margin-bottom: 10px;
  font-family: var(--pulse-font-mono);
}

/* Odds */
.odds-container { display: flex; flex-direction: column; gap: 6px; }
.odds-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.odds-item.outcome-ai {
  background: rgba(198,255,0,0.07);
  border-color: rgba(198,255,0,0.25);
}
.outcome-label { flex: 1; font-size: 13px; font-weight: 600; color: var(--pulse-text-100); display: flex; align-items: center; gap: 6px; }
.ai-star {
  font-size: 10px; font-weight: 700; color: var(--pulse-lime);
  background: rgba(198,255,0,0.15); padding: 1px 5px; border-radius: 20px;
  border: 1px solid rgba(198,255,0,0.30);
}
.outcome-price { font-size: 13px; font-weight: 700; width: 42px; text-align: center; color: var(--pulse-text-100); }
.outcome-price.ai { color: var(--pulse-lime); }
.odds-decimal { font-size: 11px; color: var(--pulse-text-400); font-family: var(--pulse-font-mono); width: 48px; text-align: right; }
.outcome-drift {
  font-size: 11px; width: 64px; text-align: right; font-family: var(--pulse-font-mono);
}
.outcome-drift.drift-up { color: var(--pulse-success); }
.outcome-drift.drift-down { color: var(--pulse-danger); }
.market-drift {
  font-size: 11px; margin-top: 10px; text-align: center;
  color: var(--pulse-text-400); font-family: var(--pulse-font-mono);
}

/* AI card - lime accent from Figma */
.ai-prediction {
  display: flex; align-items: flex-start; justify-content: space-between;
  background: rgba(198,255,0,0.04);
  border: 1px solid rgba(198,255,0,0.20);
  border-radius: 12px;
  padding: 12px;
}
.ai-prediction-main { flex: 1; }
.ai-call { font-size: 20px; font-weight: 900; color: var(--pulse-lime); line-height: 1.1; letter-spacing: -0.02em; }
.ai-confidence { font-size: 12px; font-weight: 700; color: var(--pulse-lime); margin-top: 4px; font-family: var(--pulse-font-mono); }
.ai-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  background: rgba(198,255,0,0.15); color: var(--pulse-lime);
  padding: 3px 8px; border-radius: 20px; border: 1px solid rgba(198,255,0,0.30);
}
.ai-reasoning {
  font-size: 11px; color: var(--pulse-text-400); line-height: 1.4;
  margin-top: 10px; font-style: normal;
}

/* Duel actions - Figma PillButton */
.duel-actions {
  background: transparent; border: none; padding: 0;
}
.duel-buttons { display: flex; gap: 8px; margin-bottom: 12px; }
.duel-button {
  flex: 1; min-height: var(--pulse-min-tap);
  padding: 14px 8px;
  border-radius: var(--pulse-radius-pill);
  border: 2px solid;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-weight: 700; transition: all 0.2s ease-out;
  background: transparent;
}
.duel-button:active { transform: scale(0.98); }
.duel-button.selected { transform: scale(1.02); }
.duel-button.ride { border-color: var(--pulse-lime); color: var(--pulse-lime); }
.duel-button.ride.selected { background: var(--pulse-lime); color: var(--pulse-bg-900); }
.duel-button.fade { border-color: var(--pulse-cyan); color: var(--pulse-cyan); }
.duel-button.fade.selected { background: var(--pulse-cyan); color: var(--pulse-bg-900); }
.button-icon { font-size: 16px; }
.button-label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.button-sub { font-size: 10px; font-weight: 500; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.button-payout { font-size: 10px; margin-top: 4px; background: rgba(0,0,0,0.25); padding: 2px 8px; border-radius: 20px; font-family: var(--pulse-font-mono); }

.stake-controls { display: flex; flex-direction: column; gap: 8px; }
.stake-label {
  font-size: 11px; color: var(--pulse-text-400); font-family: var(--pulse-font-mono);
  display: flex; justify-content: space-between; align-items: center;
}
.key-hint { font-size: 9px; opacity: 0.5; display: none; } /* hide for minimal */
.stake-buttons { display: flex; gap: 6px; }
.stake-button {
  min-width: 40px; padding: 6px 12px;
  background: rgba(255,255,255,0.07); color: var(--pulse-text-400);
  border: 1px solid var(--pulse-border); border-radius: var(--pulse-radius-pill);
  font-size: 13px; font-weight: 700; font-family: var(--pulse-font-mono);
  cursor: pointer; transition: all 0.2s;
}
.stake-button.active {
  background: var(--pulse-lime); color: var(--pulse-bg-900);
  border: 2px solid var(--pulse-lime); transform: scale(1.04);
}
.lock-button {
  width: 100%; min-height: var(--pulse-min-tap);
  padding: 14px; background: var(--pulse-lime); color: var(--pulse-bg-900);
  border: none; border-radius: var(--pulse-radius-pill);
  font-weight: 800; font-size: 13px; letter-spacing: 0.04em;
  cursor: pointer; transition: transform 0.15s, opacity 0.15s;
}
.lock-button:disabled { opacity: 0.35; cursor: not-allowed; background: rgba(198,255,0,0.25); color: rgba(10,10,10,0.5); }
.lock-button:active { transform: scale(0.98); }
.duel-status-text {
  font-size: 10px; color: rgba(138,138,138,0.45); text-align: center;
  font-family: var(--pulse-font-mono); margin-top: 8px;
}

/* Locked screen - Figma ScreenLocked */
.locked-screen-inner { padding: 14px 16px 12px; display: flex; flex-direction: column; height: 100%; gap: 10px; }
.locked-card { background: var(--pulse-bg-800); border: 1px solid var(--pulse-border); border-radius: 16px; padding: 12px; }
.locked-status-block {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--pulse-bg-800); border: 1px solid var(--pulse-border); border-radius: 16px; padding: 24px;
}
.locked-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pulse-lime); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.92); } }
.locked-spin { font-size: 24px; color: var(--pulse-cyan); animation: spin 1.2s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.locked-headline { font-weight: 700; font-size: 15px; color: var(--pulse-lime); }
.locked-headline.resolving { color: var(--pulse-cyan); }
.locked-sub { font-size: 11px; color: var(--pulse-text-400); font-family: var(--pulse-font-mono); }

/* Result - Figma ScreenResult polished */
.result-content {
  padding: 14px 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.result-header-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 2px;
}
.result-icon {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900; flex-shrink: 0;
}
.result-icon.win { background: rgba(198,255,0,0.15); color: var(--pulse-lime); border: 1px solid rgba(198,255,0,0.30); }
.result-icon.loss { background: var(--pulse-danger-dim); color: var(--pulse-danger); border: 1px solid rgba(255,77,77,0.25); }
.result-icon.void { background: rgba(255,255,255,0.08); color: var(--pulse-text-100); border: 1px solid var(--pulse-border); }
.result-icon.yellow { background: var(--pulse-yellow-dim); color: var(--pulse-yellow); border: 1px solid rgba(255,214,0,0.35); }

.result-text { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--pulse-text-100); }
.result-points { font-size: 12px; color: var(--pulse-text-400); font-family: var(--pulse-font-mono); margin-top: 2px; }
.result-details {
  background: var(--pulse-bg-800); border: 1px solid var(--pulse-border); border-radius: 16px;
  padding: 12px; display: grid; grid-template-columns: 70px 1fr; gap: 8px 12px;
}
.detail-row { display: contents; }
.detail-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pulse-text-400); font-weight: 600; }
.detail-value { font-size: 11px; font-weight: 600; color: var(--pulse-text-100); }
.detail-row.small { grid-column: 1 / -1; margin-top: 4px; }
.detail-row.small .detail-value { font-size: 10px; color: rgba(138,138,138,0.45); font-family: var(--pulse-font-mono); font-weight: 400; }

.fadeWin-badge {
  font-size: 11px; font-weight: 800; padding: 6px 12px; border-radius: 20px;
  background: var(--pulse-yellow-dim); color: var(--pulse-yellow);
  border: 1px solid rgba(255,214,0,0.35); width: fit-content;
}
.fadeWin-badge.hidden { display: none; }
.result-actions { display: flex; gap: 8px; margin-top: 6px; }
.primary-button {
  flex: 1; min-height: var(--pulse-min-tap); padding: 12px;
  background: var(--pulse-lime); color: var(--pulse-bg-900);
  border: none; border-radius: var(--pulse-radius-pill);
  font-weight: 800; font-size: 13px; cursor: pointer; transition: transform 0.15s;
}
.primary-button:active { transform: scale(0.98); }
.secondary-button {
  padding: 10px 16px; min-height: 44px;
  background: transparent; color: var(--pulse-text-400);
  border: 1.5px solid var(--pulse-border); border-radius: var(--pulse-radius-pill);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.secondary-button:hover { border-color: #3A3A3A; color: var(--pulse-text-100); }

/* History - Figma recent duels */
.duel-history {
  margin-top: 10px; padding: 12px; border-top: 1px solid var(--pulse-border);
  background: rgba(0,0,0,0.2); max-height: 150px; overflow-y: auto;
  border-radius: 0 0 16px 16px;
}
.history-list { display: flex; flex-direction: column; gap: 6px; font-size: 11px; }
.history-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; background: #1A1A1A; border-radius: 8px;
  border-left: 3px solid #333;
}
.history-item.win { border-left-color: var(--pulse-lime); }
.history-item.loss { border-left-color: var(--pulse-danger); }
.history-item.void { border-left-color: var(--pulse-text-400); opacity: 0.6; }
.h-id { font-family: var(--pulse-font-mono); color: var(--pulse-text-400); font-size: 10px; }
.h-action {
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 6px;
  background: #2A2A2A; text-transform: uppercase;
}
.h-action.RIDE, .h-action.ride { background: rgba(198,255,0,0.12); color: var(--pulse-lime); }
.h-action.FADE, .h-action.fade { background: var(--pulse-cyan-dim); color: var(--pulse-cyan); }
.h-market { flex: 1; color: var(--pulse-text-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-result { font-weight: 800; font-family: var(--pulse-font-mono); }
.h-result.positive { color: var(--pulse-success); }
.h-result.negative { color: var(--pulse-danger); }
.h-fade { font-size: 9px; background: var(--pulse-yellow-dim); color: var(--pulse-yellow); padding: 2px 6px; border-radius: 8px; font-weight: 800; }

/* Ledger screen - Figma ScreenLedger */
.ledger-screen-inner { padding: 14px 16px 12px; display: flex; flex-direction: column; height: 100%; gap: 10px; }
.ledger-balance-card {
  border-radius: 16px; padding: 20px; text-align: center;
  background: rgba(198,255,0,0.05); border: 1px solid rgba(198,255,0,0.20);
}
.ledger-balance-value { font-size: 44px; font-weight: 900; color: var(--pulse-lime); letter-spacing: -0.04em; line-height: 1; }
.ledger-balance-value .unit { font-size: 18px; font-weight: 600; color: var(--pulse-text-400); margin-left: 4px; }
.ledger-stats { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--pulse-text-400); font-family: var(--pulse-font-mono); margin-top: 8px; text-transform: uppercase; }
.ledger-list-card {
  flex: 1; overflow-y: auto; background: var(--pulse-bg-800); border: 1px solid var(--pulse-border); border-radius: 16px; padding: 12px;
}
.ledger-tx-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--pulse-border);
  border-radius: 8px;
}
.ledger-tx-row:last-child { border-bottom: none; }
.ledger-tx-row:focus { outline: none; background: rgba(198,255,0,0.08); }
.ledger-tx-row:focus-visible { outline: 1px solid rgba(198,255,0,0.35); }
.tx-type {
  font-size: 9px; font-weight: 800; padding: 3px 7px; border-radius: 6px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.tx-type.WIN, .tx-type.FADE-WIN { background: rgba(0,230,118,0.12); color: var(--pulse-success); }
.tx-type.LOSS { background: var(--pulse-danger-dim); color: var(--pulse-danger); }
.tx-type.STAKE { background: rgba(255,255,255,0.07); color: var(--pulse-text-400); }
.tx-label { flex: 1; font-size: 12px; color: var(--pulse-text-100); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-net { font-size: 12px; font-weight: 700; font-family: var(--pulse-font-mono); }
.tx-net.pos { color: var(--pulse-success); }
.tx-net.neg { color: var(--pulse-danger); }
.tx-time { font-size: 10px; color: var(--pulse-text-400); font-family: var(--pulse-font-mono); }

/* Footer minimal */
.hud-footer {
  padding: 8px 12px; font-size: 8px; color: rgba(138,138,138,0.35);
  text-align: center; border-top: 1px solid rgba(34,34,34,0.6);
  line-height: 1.4; font-family: var(--pulse-font-mono);
  display: flex; justify-content: space-between;
}

/* Utilities */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

/* Responsive */
@media (max-width: 650px) {
  body { padding: 0; }
  .app-600 { width: 100vw; height: 100vh; border-radius: 0; border: none; }
}
