/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Custom scrollbar — thin, dark, blends with UI */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }
::-webkit-scrollbar-corner { background: transparent; }

:root {
  --bg-primary: #0A0A0F;
  --bg-card: #141419;
  --bg-card-hover: #1A1A21;
  --bg-elevated: #1E1E26;
  --bg-input: #1A1A21;

  --text-primary: #F0F0F5;
  --text-secondary: #8E8E9A;
  --text-muted: #5A5A66;
  --text-dim: #3A3A44;

  --accent-gold: #D4A012;
  --accent-gold-soft: rgba(212, 160, 18, 0.12);
  --accent-blue: #4A9EFF;
  --accent-green: #34D399;
  --accent-green-soft: rgba(52, 211, 153, 0.12);
  --accent-red: #EF4444;
  --accent-red-soft: rgba(239, 68, 68, 0.12);
  --accent-purple: #A78BFA;

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================================
   MOBILE SHELL (390px iPhone frame)
   ======================================== */
.phone-frame {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ========================================
   BOTTOM NAVIGATION
   ======================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 calc(8px + var(--safe-bottom));
  z-index: 100;
}
/* Nav notch removed — bubble handles the active indicator */
/* Floating active bubble */
.nav-bubble {
  position: absolute;
  top: -22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
  transition: left 0.4s cubic-bezier(0.35, 0, 0.15, 1);
  animation: navBubbleGlow 3s ease-in-out infinite;
}
.nav-bubble::before,
.nav-bubble::after {
  content: '✦';
  position: absolute;
  font-size: 10px;
  color: var(--accent-gold);
  opacity: 0;
  animation: navSparkle 2s ease-in-out infinite;
  pointer-events: none;
}
.nav-bubble::before {
  top: -6px; right: -4px;
  animation-delay: 0s;
}
.nav-bubble::after {
  bottom: -4px; left: -6px;
  font-size: 8px;
  animation-delay: 1s;
}
@keyframes navSparkle {
  0%, 100% { opacity: 0; transform: scale(0.5) translateY(0); }
  30% { opacity: 1; transform: scale(1.2) translateY(-4px); }
  60% { opacity: 0.6; transform: scale(0.9) translateY(-2px); }
}
@keyframes navBubbleGlow {
  0%, 100% { box-shadow: 0 4px 16px rgba(212, 160, 18, 0.4), 0 0 0 4px rgba(10, 10, 15, 0.92); }
  50% { box-shadow: 0 4px 20px rgba(212, 160, 18, 0.6), 0 0 12px rgba(212, 160, 18, 0.3), 0 0 0 4px rgba(10, 10, 15, 0.92); }
}
.nav-bubble svg {
  width: 22px;
  height: 22px;
  color: #0A0A0F;
  stroke: #0A0A0F;
}
.nav-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  cursor: pointer;
  transition: color 0.3s, opacity 0.3s;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0;
  position: relative;
  z-index: 3;
}
.nav-item.active { color: transparent; }
.nav-item.active svg { opacity: 0; }
.nav-item svg { width: 22px; height: 22px; transition: opacity 0.3s; }

/* ========================================
   SCREENS
   ======================================== */
.screen {
  display: none;
  padding-bottom: 80px;
  animation: fadeIn 0.25s ease;
  height: 100vh;
  overflow-y: auto;
}
.screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   HEADER
   ======================================== */
.screen-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 50;
}
.screen-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.screen-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* Kalshi balance pill */
.kalshi-balance-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.kalshi-balance-pill:not(.connected) {
  background: linear-gradient(135deg, rgba(96,165,250,0.15), rgba(96,165,250,0.08));
  border: 1px solid rgba(96,165,250,0.3);
  color: #60A5FA;
  animation: kalshiPulse 2.5s ease-in-out infinite;
}
.kalshi-balance-pill:not(.connected):active { transform: scale(0.96); }
@keyframes kalshiPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(96,165,250,0.15); }
  50% { box-shadow: 0 0 0 4px rgba(96,165,250,0.08); }
}
.kalshi-balance-pill.connected {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
}
.kalshi-balance-pill.connected:active { transform: scale(0.96); }
.global-kalshi-pill {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 90;
  margin-left: 0;
}
@media (min-width: 431px) {
  .global-kalshi-pill {
    right: calc(50% - 215px + 20px);
  }
}
.kalshi-bal-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  font-style: italic;
  flex-shrink: 0;
}
.kalshi-balance-pill:not(.connected) .kalshi-bal-icon {
  background: linear-gradient(135deg, #60A5FA, #3B82F6);
  color: white;
}
.kalshi-balance-pill.connected .kalshi-bal-icon {
  background: linear-gradient(135deg, #4ADE80, #22C55E);
  color: white;
}
.kalshi-bal-text {
  line-height: 1;
  white-space: nowrap;
}

/* Confirm Modal (reusable danger/confirm dialog) */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
}
.confirm-modal-overlay.open { display: flex; }
.confirm-modal {
  width: 90%;
  max-width: 400px;
  background: linear-gradient(168deg, rgba(32, 34, 46, 0.98) 0%, rgba(16, 17, 24, 0.99) 100%);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 20px;
  padding: 28px 24px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(239,68,68,0.08);
  animation: fadeIn 0.25s ease;
}
.confirm-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(239,68,68,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 16px;
}
.confirm-modal-title {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 12px;
}
.confirm-modal-body {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 20px;
}
.confirm-modal-body ul {
  text-align: left;
  margin: 10px 0;
  padding-left: 20px;
}
.confirm-modal-body li {
  margin-bottom: 4px;
  color: var(--text-secondary);
}
.confirm-modal-input-wrap {
  margin-bottom: 20px;
}
.confirm-modal-input-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.confirm-modal-input {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-mono);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.confirm-modal-input:focus {
  border-color: var(--accent-red);
}
.confirm-modal-actions {
  display: flex;
  gap: 10px;
}
.confirm-modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}
.confirm-modal-btn:hover { opacity: 0.85; }
.confirm-modal-btn-cancel {
  background: var(--card-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.confirm-modal-btn-danger {
  background: var(--accent-red);
  color: #fff;
}
.confirm-modal-btn-danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Kalshi Connect Modal */
.kalshi-connect-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}
.kalshi-connect-overlay.open { display: flex; }
.kalshi-connect-modal {
  width: 90%;
  max-width: 380px;
  background: linear-gradient(168deg, rgba(32, 34, 46, 0.98) 0%, rgba(16, 17, 24, 0.99) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 28px 24px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: fadeIn 0.25s ease;
}
.kalshi-connect-close {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 16px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
}
.kalshi-connect-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  color: white;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}
.kalshi-connect-title {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.kalshi-connect-desc {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin: 0 0 20px;
  line-height: 1.5;
}
.kalshi-input-group {
  margin-bottom: 14px;
}
.kalshi-input-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}
.kalshi-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.kalshi-input:focus {
  border-color: rgba(96,165,250,0.5);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.1);
}
.kalshi-input::placeholder {
  color: rgba(255,255,255,0.2);
}
.kalshi-help-link {
  display: inline-block;
  font-size: 12px;
  color: #60A5FA;
  text-decoration: none;
  margin-bottom: 18px;
}
.kalshi-connect-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
.kalshi-connect-btn:active { transform: scale(0.98); }
.kalshi-connected-info { text-align: center; }
.kalshi-connected-balance {
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.15);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.kalshi-connected-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.kalshi-connected-val {
  font-size: 28px;
  font-weight: 900;
  color: #4ADE80;
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
  text-shadow: 0 0 20px rgba(74,222,128,0.2);
}
.kalshi-connected-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 18px;
}
.kalshi-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 6px rgba(74,222,128,0.5);
  animation: pulse 2s ease-in-out infinite;
}
.kalshi-disconnect-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid rgba(248,113,113,0.25);
  background: rgba(248,113,113,0.08);
  color: #F87171;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.kalshi-disconnect-btn:active { transform: scale(0.97); }

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.header-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.header-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }

/* ========================================
   SECTION HEADINGS
   ======================================== */
.section-heading {
  padding: 20px 20px 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-subtext {
  padding: 0 20px 12px;
  font-size: 13px;
  color: var(--text-muted);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Protection panel status pulse */
@keyframes protStatusPulse {
  0%, 100% { box-shadow: 0 0 30px var(--prot-glow-color, rgba(52,211,153,0.08)), 0 2px 8px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 40px var(--prot-glow-color, rgba(52,211,153,0.14)), 0 2px 8px rgba(0,0,0,0.3); }
}

/* PnL hero subtle glow */
@keyframes pnlGlow {
  0%, 100% { text-shadow: 0 0 20px var(--pnl-glow-color, rgba(52,211,153,0.15)); }
  50% { text-shadow: 0 0 35px var(--pnl-glow-color, rgba(52,211,153,0.25)); }
}

/* ========================================
   MARKET LIST (Non-sports)
   ======================================== */
.market-list {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Detail View, Chart, Scoreboard, Non-sport, Contracts, Players sections removed */

/* Active bot indicator glow + sparkle */
@keyframes activeBotGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(167, 139, 250, 0.15), inset 0 0 4px rgba(167, 139, 250, 0.03); border-color: rgba(167, 139, 250, 0.2); }
  50% { box-shadow: 0 0 22px rgba(167, 139, 250, 0.35), inset 0 0 10px rgba(167, 139, 250, 0.08); border-color: rgba(167, 139, 250, 0.45); }
}
.active-bot-indicator {
  animation: activeBotGlow 2s ease-in-out infinite;
  background: linear-gradient(168deg, rgba(167, 139, 250, 0.1) 0%, rgba(40, 30, 60, 0.6) 30%, rgba(16, 17, 24, 0.98) 100%) !important;
}
.active-bot-indicator::before {
  content: '';
  position: absolute;
  top: -3px;
  right: 30px;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.9), transparent 70%);
  border-radius: 50%;
  animation: sparkleSpin 3s linear infinite;
  pointer-events: none;
}
.active-bot-indicator::after {
  content: '✦';
  position: absolute;
  bottom: -2px;
  right: 14px;
  font-size: 8px;
  color: var(--accent-purple);
  animation: sparkleSpin 2.5s linear infinite reverse;
  pointer-events: none;
}

/* Kept: sparkleSpin used by FAB and Arena */
@keyframes sparkleSpin {
  0% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  20% { opacity: 1; transform: scale(1.2) rotate(72deg); }
  40% { opacity: 0.6; transform: scale(0.8) rotate(144deg); }
  60% { opacity: 1; transform: scale(1.1) rotate(216deg); }
  80% { opacity: 0.4; transform: scale(0.7) rotate(288deg); }
  100% { opacity: 0; transform: scale(0.5) rotate(360deg); }
}



/* ========================================
   FLOATING ACTION BUTTON (FAB)
   ======================================== */
.fab-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 90;
  display: none;
}
.fab-container.visible { display: block; }

.fab-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: none;
  color: #1a1a00;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(212, 160, 18, 0.3);
  transition: all 0.2s;
  position: relative;
  z-index: 92;
  animation: fabSparkle 2.5s ease-in-out infinite;
  overflow: visible;
}
.fab-btn::before,
.fab-btn::after {
  content: '✦';
  position: absolute;
  color: var(--accent-gold);
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgba(212, 160, 18, 0.6));
}
.fab-btn::before {
  top: -5px;
  right: -3px;
  font-size: 11px;
  animation: sparkleSpin 1.8s ease-in-out infinite;
}
.fab-btn::after {
  bottom: -4px;
  left: -2px;
  font-size: 8px;
  animation: sparkleSpin 2.2s ease-in-out 0.6s infinite;
}
.fab-btn.open::before,
.fab-btn.open::after { display: none; }
.fab-btn.open { animation: none; }

/* Toast notification */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 390px;
  width: calc(100% - 40px);
  padding: 14px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-sans);
  text-align: center;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 12px rgba(212, 160, 18, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; }

@keyframes fabSparkle {
  0%, 100% { box-shadow: 0 4px 16px rgba(212, 160, 18, 0.25); }
  25% { box-shadow: 0 4px 24px rgba(212, 160, 18, 0.5), 0 0 8px rgba(212, 160, 18, 0.2); }
  50% { box-shadow: 0 4px 32px rgba(212, 160, 18, 0.6), 0 0 16px rgba(212, 160, 18, 0.3); }
  75% { box-shadow: 0 4px 24px rgba(212, 160, 18, 0.45), 0 0 8px rgba(212, 160, 18, 0.15); }
}
.fab-btn:hover { transform: scale(1.05); box-shadow: 0 6px 28px rgba(212, 160, 18, 0.4); }
.fab-btn:active { transform: scale(0.95); }
.fab-btn svg { transition: transform 0.25s ease; }
.fab-btn.open svg { transform: rotate(45deg); }

/* FAB Menu */
.fab-menu {
  position: absolute;
  bottom: 62px;
  right: 0;
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 6px;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: all 0.2s ease;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.fab-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.fab-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  color: var(--text-primary);
}
.fab-menu-item:hover { background: var(--bg-elevated); }
.fab-menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fab-menu-icon.assistant { background: rgba(167, 139, 250, 0.15); color: var(--accent-purple); }
.fab-menu-icon.compare { background: rgba(74, 158, 255, 0.15); color: var(--accent-blue); }
.fab-menu-icon.alert { background: rgba(212, 160, 18, 0.15); color: var(--accent-gold); }
.fab-menu-icon.analyze { background: rgba(52, 211, 153, 0.15); color: var(--accent-green); }
.fab-menu-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.fab-menu-label {
  font-size: 14px;
  font-weight: 600;
}
.fab-menu-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}
.fab-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 10px;
}
/* Selection badge on FAB */
.fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  border: 2px solid var(--bg-primary);
}
.fab-badge.visible { display: flex; }

/* FAB Overlay */
.fab-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 89;
}
.fab-overlay.open { display: block; }

/* ========================================
   COMPARISON PANEL (slide-up sheet)
   ======================================== */
.compare-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  max-height: 85vh;
  background: var(--bg-card);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  border: 1px solid var(--border-hover);
  border-bottom: none;
  z-index: 200;
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
}
.compare-sheet.open {
  transform: translateX(-50%) translateY(0);
}
.compare-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--text-dim);
  margin: 10px auto 0;
}
.compare-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.compare-sheet-title {
  font-size: 16px;
  font-weight: 700;
}
.compare-sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.compare-sheet-body {
  padding: 16px 20px 32px;
}

/* Analyze Options Selection */
.analyze-option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.analyze-option-item:hover { border-color: var(--border-hover); }
.analyze-option-item:has(input:checked) {
  border-color: var(--accent-gold);
  background: rgba(212, 160, 18, 0.06);
}
.analyze-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  accent-color: var(--accent-gold);
  cursor: pointer;
  flex-shrink: 0;
}
.analyze-option-info { flex: 1; min-width: 0; }
.analyze-option-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.analyze-option-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.analyze-option-pct {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.analyze-option-pct.green { color: var(--accent-green); }
.analyze-option-pct.red { color: var(--accent-red); }
.analyze-option-pct.gold { color: var(--accent-gold); }

.analyze-run-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-gold);
  color: #000;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s;
}
.analyze-run-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.analyze-run-btn:not(:disabled):hover { filter: brightness(1.1); }

.analyze-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s;
}
.analyze-clear-btn:hover { border-color: var(--accent-red); color: var(--accent-red); }

/* Analyze Chat */
.analyze-chat {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.analyze-chat-messages {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 10px;
}
.analyze-chat-messages .assistant-msg {
  margin-bottom: 8px;
}
.analyze-chat-messages .assistant-msg.bot {
  background: var(--bg-elevated);
  border-radius: 12px 12px 12px 4px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.analyze-chat-messages .assistant-msg.user {
  background: var(--accent-gold);
  color: #000;
  border-radius: 12px 12px 4px 12px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-left: 40px;
  text-align: right;
}

/* Comparison grid */
.compare-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.compare-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.compare-grid.cols-1 { grid-template-columns: 1fr; }
.compare-col {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 14px;
}
.compare-col-header {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.compare-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}
.compare-row-label {
  font-size: 12px;
  color: var(--text-secondary);
}
.compare-row-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}
.compare-row-val.green { color: var(--accent-green); }
.compare-row-val.gold { color: var(--accent-gold); }
.compare-row-val.red { color: var(--accent-red); }
/* AI Summary in comparison */
.ai-summary {
  background: rgba(167, 139, 250, 0.06);
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: var(--radius-md);
  padding: 14px;
}
.ai-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-purple);
}
.ai-summary-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ========================================
   ASSISTANT CHAT PANEL
   ======================================== */
.assistant-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  height: 75vh;
  background: var(--bg-card);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  border: 1px solid var(--border-hover);
  border-bottom: none;
  z-index: 200;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
}
.assistant-sheet.open {
  transform: translateX(-50%) translateY(0);
}
.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.assistant-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
}
.assistant-msg.bot {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  align-self: flex-start;
  color: var(--text-secondary);
}
.assistant-msg.typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 20px;
}
.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}
.assistant-msg.user {
  background: var(--accent-purple);
  color: white;
  align-self: flex-end;
}
.assistant-input-bar {
  padding: 12px 16px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.assistant-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  resize: none;
  overflow-y: auto;
  max-height: 80px;
  line-height: 1.4;
}
.assistant-input:focus { border-color: var(--accent-purple); }
.assistant-input::placeholder { color: var(--text-muted); }
.assistant-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-purple);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* ========================================
   ALERT SETUP SHEET
   ======================================== */
.alert-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  background: var(--bg-card);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  border: 1px solid var(--border-hover);
  border-bottom: none;
  z-index: 200;
  transition: transform 0.3s ease;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
}
.alert-sheet.open {
  transform: translateX(-50%) translateY(0);
}
.alert-option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.alert-option-row:last-child { border-bottom: none; }
.alert-option-label {
  font-size: 14px;
  font-weight: 500;
}
.alert-option-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}
.toggle-switch.on {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
}
.toggle-switch.on::after {
  transform: translateX(20px);
}
.alert-price-input {
  width: 70px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  text-align: center;
  outline: none;
}
.alert-price-input:focus { border-color: var(--accent-gold); }
.alert-save-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--accent-gold);
  color: #1a1a00;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  margin-top: 16px;
}

/* ========================================
   PORTFOLIO SCREEN
   ======================================== */
.portfolio-summary {
  padding: 0 20px 20px;
}
.portfolio-balance {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.portfolio-change {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.portfolio-change.up { color: var(--accent-green); }
.portfolio-change.down { color: var(--accent-red); }

.portfolio-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 20px 20px;
}
.pstat {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 14px;
}
.pstat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 6px;
}
.pstat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
}

.position-card {
  margin: 0 20px 8px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 14px 16px;
}
.position-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.position-market {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.position-side {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.position-side.yes { background: var(--accent-green-soft); color: var(--accent-green); }
.position-side.no { background: var(--accent-red-soft); color: var(--accent-red); }
.position-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.position-cost {
  font-size: 13px;
  color: var(--text-secondary);
}
.position-pnl {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
}
.position-pnl.up { color: var(--accent-green); }
.position-pnl.down { color: var(--accent-red); }

/* ========================================
   HISTORY ITEMS
   ======================================== */
.history-list {
  padding: 0 20px;
}
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }
.history-label {
  font-size: 14px;
  font-weight: 500;
}
.history-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.history-amount {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}
.history-contracts {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========================================
   EMPTY STATES / AUTOPILOT
   ======================================== */
.empty-state {
  padding: 60px 40px;
  text-align: center;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.empty-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.empty-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========================================
   TOOLTIP
   ======================================== */
.tooltip-wrap { position: relative; }
.tooltip-content {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  width: 200px;
  z-index: 200;
  pointer-events: none;
}
.tooltip-wrap:hover .tooltip-content { display: block; }

/* ========================================
   SEARCH SCREEN
   ======================================== */
/* Profile screen */
.profile-header-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(168deg, rgba(32, 34, 46, 0.95) 0%, rgba(16, 17, 24, 0.98) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), #F5C842);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #1a1500;
  flex-shrink: 0;
}
.profile-identity { min-width: 0; }
.profile-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.profile-role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
}
.profile-role-badge.admin {
  background: rgba(255,193,7,0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(255,193,7,0.3);
}
.profile-email {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}
.profile-member-since {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-top: 4px;
  font-family: var(--font-mono);
}
.profile-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.profile-kalshi-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}
.profile-kalshi-card:active { transform: scale(0.98); }
.profile-kalshi-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-kalshi-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  font-style: italic;
  color: white;
}
.profile-kalshi-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.profile-kalshi-status {
  font-size: 11px;
  color: #4ADE80;
  font-family: var(--font-mono);
  margin-top: 1px;
}
.profile-kalshi-status.disconnected { color: rgba(255,255,255,0.35); }
.profile-kalshi-right { text-align: right; }
.profile-kalshi-bal {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.profile-kalshi-sync {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  margin-top: 1px;
}
.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.profile-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.profile-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.profile-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}
.profile-stat-val.green { color: #4ADE80; }
.profile-menu {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:active { background: rgba(255,255,255,0.03); }
.profile-menu-icon { font-size: 18px; flex-shrink: 0; }
.profile-menu-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.profile-menu-arrow {
  font-size: 18px;
  color: rgba(255,255,255,0.2);
  font-weight: 300;
}
.profile-signout-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid rgba(248,113,113,0.2);
  background: rgba(248,113,113,0.06);
  color: #F87171;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}
.profile-signout-btn:active { transform: scale(0.98); }
.profile-version {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  font-family: var(--font-mono);
  padding-bottom: 24px;
}

/* Settings detail panel */
.settings-detail {
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  z-index: 60;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: 80px;
}
.settings-detail.active {
  display: flex;
}
.settings-detail-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 12px;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10;
}
.settings-back {
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.settings-detail-title {
  font-size: 18px;
  font-weight: 700;
}
.settings-detail-body {
  padding: 8px 20px;
}
.settings-group {
  margin-bottom: 24px;
}
.settings-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child {
  border-bottom: none;
}
.settings-row-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-row-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.settings-row-desc {
  font-size: 11px;
  color: var(--text-secondary);
}
/* Toggle switch */
.settings-toggle {
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: rgba(255,255,255,0.12);
  cursor: pointer;
  position: relative;
  transition: background 0.3s;
  flex-shrink: 0;
}
.settings-toggle.on {
  background: var(--accent-green);
}
.settings-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: transform 0.3s;
}
.settings-toggle.on::after {
  transform: translateX(18px);
}
/* Settings select pill */
.settings-select {
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-family: var(--font-mono);
  cursor: pointer;
  flex-shrink: 0;
}
.settings-info-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 8px 0;
}
.settings-info-text a {
  color: var(--accent-blue);
  text-decoration: none;
}
.settings-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.settings-link-row .profile-menu-arrow {
  color: var(--text-muted);
  font-size: 18px;
}

/* FAQ / Help screen */
.faq-ai-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(212,160,18,0.1) 0%, rgba(212,160,18,0.03) 100%);
  border: 1px solid rgba(212,160,18,0.2);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 24px;
}
.faq-ai-card:active { transform: scale(0.98); }
.faq-ai-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-gold), #F5C842);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.faq-ai-content { flex: 1; min-width: 0; }
.faq-ai-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.faq-ai-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.4;
}
.faq-ai-arrow {
  font-size: 22px;
  color: rgba(212,160,18,0.5);
  font-weight: 300;
  flex-shrink: 0;
}
.faq-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}
.faq-tutorial-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}
.faq-tutorial-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.faq-tutorial-card:active { background: rgba(255,255,255,0.04); }
.faq-tutorial-icon { font-size: 20px; flex-shrink: 0; }
.faq-tutorial-info { flex: 1; min-width: 0; }
.faq-tutorial-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.faq-tutorial-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}
.faq-tutorial-arrow {
  font-size: 20px;
  color: rgba(255,255,255,0.15);
  font-weight: 300;
  flex-shrink: 0;
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 100px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}
.faq-chevron {
  font-size: 20px;
  color: rgba(255,255,255,0.2);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
}
.faq-item.open .faq-chevron { transform: rotate(90deg); color: var(--accent-gold); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  padding: 0 16px;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 16px 14px;
}

/* FAQ Chat Panel */
.faq-chat-panel {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 100vh;
  background: var(--bg-primary);
  z-index: 300;
  display: none;
  flex-direction: column;
}
.faq-chat-panel.open {
  display: flex;
}
.faq-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.faq-chat-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}
.faq-chat-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.faq-chat-status {
  font-size: 10px;
  color: #4ADE80;
  font-family: var(--font-mono);
  font-weight: 600;
  margin-left: auto;
}
.faq-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq-chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.faq-chat-msg.user {
  flex-direction: row-reverse;
}
.faq-chat-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), #F5C842);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.faq-chat-msg.user .faq-chat-avatar {
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  font-size: 12px;
  font-weight: 700;
  color: white;
}
.faq-chat-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
  max-width: 80%;
}
.faq-chat-msg.user .faq-chat-bubble {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.25);
  color: var(--text-primary);
}
.faq-chat-bubble .typing-dots {
  display: inline-flex;
  gap: 4px;
}
.faq-chat-bubble .typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  animation: typingBounce 1.4s ease-in-out infinite;
}
.faq-chat-bubble .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.faq-chat-bubble .typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}
.faq-chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.faq-chat-input {
  flex: 1;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
}
.faq-chat-input:focus { border-color: rgba(212,160,18,0.4); }
.faq-chat-input::placeholder { color: var(--text-muted); }
.faq-chat-send {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent-gold), #D4A012);
  color: #1a1500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.faq-chat-send:active { transform: scale(0.94); }

/* Tutorial Detail Panel */
.faq-tutorial-panel {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 100vh;
  background: var(--bg-primary);
  z-index: 300;
  display: none;
  flex-direction: column;
  overflow-y: auto;
}
.faq-tutorial-panel.open { display: flex; }
.faq-tutorial-detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 5;
}
.faq-tutorial-detail-body {
  padding: 20px 16px 100px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
}
.faq-tutorial-detail-body h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.faq-tutorial-detail-body .tutorial-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 20px;
  font-family: var(--font-mono);
}
.faq-tutorial-detail-body .tutorial-step {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}
.faq-tutorial-detail-body .tutorial-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), #D4A012);
  color: #1a1500;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}
.faq-tutorial-detail-body .tutorial-step-content {
  flex: 1;
}
.faq-tutorial-detail-body .tutorial-step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.faq-tutorial-detail-body .tutorial-step-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}
.faq-tutorial-detail-body .tutorial-tip {
  background: rgba(212,160,18,0.08);
  border: 1px solid rgba(212,160,18,0.15);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin: 16px 0;
  line-height: 1.5;
}
.faq-tutorial-detail-body .tutorial-tip strong {
  color: var(--accent-gold);
}

/* Sub tabs */
.sub-tabs {
  display: flex;
  gap: 6px;
  padding: 0 20px 14px;
}

/* ========================================
   AUTOPILOT ARENA
   ======================================== */
.arena-header {
  padding: 4px 16px 8px;
  position: sticky;
  top: var(--ap-header-height, 57px);
  z-index: 49;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.arena-hero-card {
  background: var(--bg-card);
  border: 1px solid rgba(212, 160, 18, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
}
.arena-hero-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(212, 160, 18, 0.08), transparent 70%);
  pointer-events: none;
}
.arena-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.arena-hero-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--accent-gold), #F5C842);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.arena-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--accent-green-soft);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.arena-live-badge .pulse-ring {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  position: relative;
  flex-shrink: 0;
}
.arena-live-badge .pulse-ring::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-green);
  animation: pulseRing 2s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}
.arena-stats-row {
  display: flex;
  gap: 0;
}
.arena-stat-cell {
  flex: 1;
  text-align: center;
  padding: 0 4px;
  position: relative;
}
.arena-stat-cell:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: var(--border);
}
.arena-stat-num {
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1.2;
}
.arena-stat-num.green { color: var(--accent-green); }
.arena-stat-num.gold { color: var(--accent-gold); }
.arena-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* Detail stats card */
.arena-detail-stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 8px;
}
.arena-stats-bar {
  padding: 0 16px 6px;
}
.arena-detail .arena-stats-bar {
  position: sticky;
  top: var(--ap-detail-header-height, 52px);
  z-index: 49;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 4px 16px 6px;
}
.arena-stat {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.arena-stat strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Category Cards */
.arena-categories {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.arena-cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}
.arena-cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.arena-cat-card:active {
  transform: scale(0.98);
}
.arena-cat-card.active-cat {
  border-color: rgba(52, 211, 153, 0.3);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.06) 0%, var(--bg-card) 60%);
  animation: activeCatPulse 3s ease-in-out infinite;
}
@keyframes activeCatPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
  50% { box-shadow: 0 0 20px -4px rgba(52, 211, 153, 0.15); }
}

/* Rank badge */
.arena-rank {
  width: 36px;
  min-width: 36px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.arena-rank-num {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.arena-rank-num.gold { color: #FFD700; }
.arena-rank-num.silver { color: #C0C0C0; }
.arena-rank-num.bronze { color: #CD7F32; }
.arena-rank-move {
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 600;
}
.arena-rank-move.up { color: var(--accent-green); }
.arena-rank-move.down { color: var(--accent-red); }
.arena-rank-move.flat { color: var(--text-dim); }

/* Category info */
.arena-cat-info {
  flex: 1;
  min-width: 0;
}
.arena-cat-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arena-cat-bot {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stats on right side */
.arena-cat-stats {
  text-align: right;
  min-width: 80px;
}
.arena-cat-velocity {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-green);
  font-family: var(--font-mono);
}
.arena-cat-roi {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.arena-cat-velocity.negative { color: var(--accent-red); }

/* Training badge */
.arena-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.arena-badge.ready {
  background: var(--accent-green-soft);
  color: var(--accent-green);
}
.arena-badge.training {
  background: rgba(251, 191, 36, 0.12);
  color: #FBBF24;
}
.arena-badge.active-badge {
  background: var(--accent-green-soft);
  color: var(--accent-green);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Training progress bar */
.arena-train-progress {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.arena-train-fill {
  height: 100%;
  background: linear-gradient(90deg, #FBBF24, #F59E0B);
  border-radius: 2px;
  transition: width 1s ease;
}

/* Sticky #1 category on main arena */
.arena-cat-leader-sticky {
  position: sticky;
  top: var(--ap-leader-top, 170px);
  z-index: 47;
  padding: 4px 16px 4px;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.arena-cat-card.rank-leader {
  border-color: rgba(255, 215, 0, 0.25);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.06) 0%, var(--bg-card) 50%);
  animation: leaderSparkle 2s ease-in-out infinite;
  overflow: visible;
}
.arena-cat-card.rank-leader::after {
  content: '';
  position: absolute;
  top: -2px;
  right: 24px;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.9), transparent 70%);
  border-radius: 50%;
  animation: sparkleSpin 3s linear infinite;
  pointer-events: none;
}

/* Category Detail View */
.arena-detail {
  display: none;
  padding-bottom: 80px;
  animation: fadeIn 0.25s ease;
}
.arena-detail.active { display: block; }

.arena-detail-header {
  padding: 0 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: var(--ap-header-height, 57px);
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 50;
}
.arena-detail-nav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 8px;
}
.arena-detail-nav-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arena-back-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  flex-shrink: 0;
}
.arena-detail-hero {
  background: var(--bg-card);
  border: 1px solid rgba(212, 160, 18, 0.15);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.arena-detail-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 160, 18, 0.25), transparent);
}
.arena-detail-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.arena-detail-hero-title {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-gold), #F5C842);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.arena-detail-hero-badge {
  flex-shrink: 0;
  margin-left: 8px;
}
.arena-detail-hero-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.arena-detail-hero-stat {
  flex: 1;
  text-align: center;
}
.arena-detail-hero-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}
.arena-detail-hero-stat-val.green { color: #4ADE80; }
.arena-detail-hero-stat-val.gold { color: var(--accent-gold); }
.arena-detail-hero-stat-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.35);
  margin-top: 3px;
  font-family: var(--font-mono);
}

/* Bot leaderboard */
.arena-bot-list {
  padding: 8px 16px 90px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.arena-bot-card {
  background: linear-gradient(168deg, rgba(32, 34, 46, 0.95) 0%, rgba(16, 17, 24, 0.98) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 11px 13px 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
  cursor: pointer;
}
/* Collapsed bot cards — stats hidden */
.arena-bot-card.bot-collapsed {
  padding-bottom: 10px;
}
.arena-bot-card.bot-collapsed .bot-divider,
.arena-bot-card.bot-collapsed .bot-stats-grid {
  display: none;
}
.arena-bot-card.bot-collapsed .bot-top-row {
  margin-bottom: 0;
}
/* Expand hint — subtle centered pill */
.bot-expand-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.bot-expand-hint .hint-bar {
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s ease, width 0.3s ease;
}
.arena-bot-card:not(.bot-collapsed) .bot-expand-hint .hint-bar {
  width: 20px;
  background: rgba(255,255,255,0.08);
}
.arena-bot-card.rank-1 .bot-expand-hint {
  display: none;
}
.arena-bot-card .bot-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.arena-bot-card .bot-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1) 20%, rgba(255,255,255,0.1) 80%, transparent);
  margin-bottom: 8px;
}
.arena-bot-card .bot-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
}
.arena-bot-card .bot-stat-cell {
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 7px 6px 6px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.arena-bot-card .bot-stat-cell::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
.arena-bot-card .bot-stat-label {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 3px;
  font-family: var(--font-mono);
}
.arena-bot-card .bot-stat-val {
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.95);
  letter-spacing: -0.02em;
}
.arena-bot-card .bot-stat-val.green { color: #4ADE80; text-shadow: 0 0 12px rgba(74,222,128,0.25); }
.arena-bot-card .bot-stat-val.purple { color: #C084FC; text-shadow: 0 0 12px rgba(192,132,252,0.2); }
.arena-bot-card .bot-stat-val.blue { color: #60A5FA; text-shadow: 0 0 12px rgba(96,165,250,0.2); }
.arena-bot-card .bot-stat-val.dim { color: var(--text-dim); }
.arena-bot-card .bot-winbar-track {
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.arena-bot-card .bot-winbar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #22C55E, #4ADE80);
  transition: width 0.6s ease;
  box-shadow: 0 0 6px rgba(74,222,128,0.4);
}
/* Sticky #1 bot container */
.arena-leader-sticky {
  position: sticky;
  top: var(--ap-detail-leader-top, 110px);
  z-index: 49;
  padding: 4px 16px 2px;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.arena-bot-card.rank-1 {
  border-color: rgba(255, 215, 0, 0.3);
  background: linear-gradient(168deg, rgba(255, 215, 0, 0.08) 0%, rgba(45, 40, 20, 0.9) 30%, rgba(16, 17, 24, 0.98) 100%);
  animation: leaderSparkle 2s ease-in-out infinite;
  overflow: visible;
}
.arena-bot-card.rank-1 .bot-stat-cell {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.07) 0%, rgba(255, 215, 0, 0.02) 100%);
  border-color: rgba(255, 215, 0, 0.12);
}
.arena-bot-card.rank-1 .bot-divider {
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.15) 20%, rgba(255, 215, 0, 0.15) 80%, transparent);
}
@keyframes leaderSparkle {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 215, 0, 0.15), inset 0 0 4px rgba(255, 215, 0, 0.03); }
  50% { box-shadow: 0 0 18px rgba(255, 215, 0, 0.3), inset 0 0 8px rgba(255, 215, 0, 0.06); }
}
.arena-bot-card.rank-1::before {
  content: '';
  position: absolute;
  top: -3px;
  right: 30px;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.9), transparent 70%);
  border-radius: 50%;
  animation: sparkleSpin 3s linear infinite;
  pointer-events: none;
}
.arena-bot-card.rank-1::after {
  content: '👑';
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: 14px;
}
/* Compact bot list rows (non-leader) */
.bot-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  background: linear-gradient(168deg, rgba(32, 34, 46, 0.7) 0%, rgba(16, 17, 24, 0.8) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.bot-list-row:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}
.bot-list-row:active {
  transform: scale(0.99);
}
.bot-list-row.bot-list-leader {
  border-color: rgba(255, 215, 0, 0.3);
  background: linear-gradient(168deg, rgba(255, 215, 0, 0.08) 0%, rgba(45, 40, 20, 0.9) 30%, rgba(16, 17, 24, 0.98) 100%);
  animation: leaderSparkle 2s ease-in-out infinite;
  position: relative;
  overflow: visible;
}
.bot-list-row.bot-list-leader::before {
  content: '';
  position: absolute;
  top: -3px;
  right: 30px;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.9), transparent 70%);
  border-radius: 50%;
  animation: sparkleSpin 3s linear infinite;
  pointer-events: none;
}
.bot-list-row.bot-list-leader::after {
  content: '👑';
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: 14px;
}

.arena-bot-card.bot-live {
  border-color: rgba(52, 211, 153, 0.3);
}
/* Category cards using bot-card format */
.arena-cat-card-new .bot-name {
  font-size: 14px;
}
.arena-cat-card-new .velocity-val {
  font-size: 15px;
}
.arena-cat-card-new .velocity-label {
  display: none;
}
.arena-cat-card-new .velocity-dollar {
  font-size: 11px;
}
.velocity-hr-suffix {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.5;
}
.arena-cat-card-new.active-cat {
  border-color: rgba(52, 211, 153, 0.3);
  background: linear-gradient(168deg, rgba(52, 211, 153, 0.06) 0%, rgba(16, 17, 24, 0.98) 100%);
}
.arena-cat-card-new .arena-train-progress {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.arena-cat-card-new .arena-train-fill {
  height: 100%;
  background: linear-gradient(90deg, #FBBF24, #F59E0B);
  border-radius: 2px;
  transition: width 1s ease;
}

.bot-rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.bot-rank-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
}
.bot-rank-num.gold {
  background: linear-gradient(135deg, rgba(255,215,0,0.25), rgba(255,180,0,0.1));
  border-color: rgba(255,215,0,0.4);
  color: #FFD700;
  box-shadow: 0 0 12px rgba(255,215,0,0.15);
  text-shadow: 0 0 8px rgba(255,215,0,0.3);
}
.bot-rank-num.silver {
  background: linear-gradient(135deg, rgba(192,192,192,0.2), rgba(192,192,192,0.08));
  border-color: rgba(192,192,192,0.3);
  color: #D4D4D4;
  box-shadow: 0 0 8px rgba(192,192,192,0.08);
}
.bot-rank-num.bronze {
  background: linear-gradient(135deg, rgba(205,127,50,0.2), rgba(205,127,50,0.08));
  border-color: rgba(205,127,50,0.3);
  color: #E0924B;
  box-shadow: 0 0 8px rgba(205,127,50,0.08);
}
.bot-rank-move {
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 800;
  display: flex;
  align-items: center;
  line-height: 1;
}
.bot-rank-move.up { color: #4ADE80; }
.bot-rank-move.down { color: #F87171; }
.bot-rank-move.flat { color: var(--text-dim); font-size: 7px; }

.bot-info {
  min-width: 0;
  flex: 1;
}
.bot-name {
  font-size: 13px;
  font-weight: 800;
  color: #F5F5F5;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  min-width: 0;
}
.bot-name .arena-badge {
  flex-shrink: 0;
}
.bot-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.bot-name .live-tag {
  font-size: 7px;
  background: rgba(74, 222, 128, 0.15);
  color: #4ADE80;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(74, 222, 128, 0.25);
  font-weight: 800;
  letter-spacing: 0.08em;
  animation: pulse 2s ease-in-out infinite;
}
.bot-algo-tag {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.05);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.07);
  display: inline-block;
  margin-top: 4px;
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bot-top-velocity {
  margin-left: auto;
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.bot-top-velocity .velocity-val {
  font-size: 17px;
  font-weight: 900;
  color: #4ADE80;
  font-family: var(--font-mono);
  line-height: 1;
  letter-spacing: -0.03em;
}
.bot-top-velocity .velocity-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bot-top-velocity .velocity-label {
  font-size: 9px;
  color: rgba(74,222,128,0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(74,222,128,0.08);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(74,222,128,0.12);
  line-height: 1.2;
}
.bot-top-velocity .velocity-dollar {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.01em;
}
/* Legacy stats classes kept for compatibility */
.bot-stats { display: none; }
.bot-velocity, .bot-roi, .bot-reality { display: none; }

/* Activate button area */
.arena-activate-area {
  padding: 12px 16px 20px;
  text-align: center;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 200;
  display: none;
}
.arena-activate-area.visible {
  display: block;
}
#myBotActionArea.visible {
  z-index: 250;
}
.arena-activate-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.arena-activate-btn.ready-btn {
  background: linear-gradient(135deg, var(--accent-green), #2EB886);
  color: #000;
  position: relative;
  overflow: visible;
  animation: activateBtnSparkle 2s ease-in-out infinite;
}
@keyframes activateBtnSparkle {
  0%, 100% { box-shadow: 0 0 8px rgba(52, 211, 153, 0.3), 0 0 2px rgba(52, 211, 153, 0.1) inset; }
  50% { box-shadow: 0 0 24px rgba(52, 211, 153, 0.5), 0 0 6px rgba(52, 211, 153, 0.2) inset; }
}
.arena-activate-btn.ready-btn::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 20%;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), transparent 70%);
  border-radius: 50%;
  animation: sparkleSpin 3s linear infinite;
  pointer-events: none;
}
.arena-activate-btn.ready-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 25%;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent 70%);
  border-radius: 50%;
  animation: sparkleSpin 2.5s linear infinite reverse;
  pointer-events: none;
}
.arena-activate-btn.ready-btn:active { transform: scale(0.97); }
.arena-activate-btn.training-btn {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: not-allowed;
  border: 1px solid var(--border);
}
.arena-activate-btn.deactivate-btn {
  background: var(--accent-red-soft);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.arena-training-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  font-family: var(--font-mono);
}

/* Bot trade history & detail */
.bot-trade-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.bot-trade-row.win { border-left: 3px solid var(--accent-green); }
.bot-trade-row.loss { border-left: 3px solid var(--accent-red); }
.bot-trade-pnl { font-size: 14px; font-weight: 700; font-family: var(--font-mono); }
.bot-trade-pnl.positive { color: var(--accent-green); }
.bot-trade-pnl.negative { color: var(--accent-red); }
.bot-trade-reason {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}
.bot-trade-reason.take-profit { background: rgba(52, 211, 153, 0.15); color: var(--accent-green); }
.bot-trade-reason.stop-loss { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.bot-trade-reason.time-stop { background: rgba(212, 160, 18, 0.15); color: var(--accent-gold); }
.bot-trade-reason.settlement { background: rgba(74, 158, 255, 0.15); color: var(--accent-blue); }
.bot-position-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 8px;
}
.bot-detail-stats-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 8px;
  margin: 0 16px;
}

/* Activation bottom sheet */
.arena-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  display: none;
  opacity: 0;
  transition: opacity 0.25s;
}
.arena-sheet-overlay.open {
  display: block;
  opacity: 1;
}
.arena-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 20px 36px;
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
  pointer-events: none;
}
.arena-sheet.open {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.arena-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--text-dim);
  border-radius: 2px;
  margin: 0 auto 20px;
}
/* Desktop: center the sheet as a modal instead of bottom sheet */
body.device-desktop .arena-sheet {
  bottom: auto;
  top: 50%;
  transform: translateX(-50%) translateY(-50%) scale(0.95);
  opacity: 0;
  border-radius: var(--radius-xl);
  max-width: 420px;
  padding: 28px 24px 28px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s;
}
body.device-desktop .arena-sheet.open {
  transform: translateX(-50%) translateY(-50%) scale(1);
  opacity: 1;
}
body.device-desktop .arena-sheet-handle { display: none; }
body.device-tablet .arena-sheet {
  bottom: auto;
  top: 50%;
  transform: translateX(-50%) translateY(-50%) scale(0.95);
  opacity: 0;
  border-radius: var(--radius-xl);
  max-width: 400px;
  padding: 28px 24px 28px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s;
}
body.device-tablet .arena-sheet.open {
  transform: translateX(-50%) translateY(-50%) scale(1);
  opacity: 1;
}
body.device-tablet .arena-sheet-handle { display: none; }
.arena-sheet-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.arena-sheet-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 24px;
}
.arena-sheet-bot-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.arena-sheet-bot-name {
  font-size: 14px;
  font-weight: 600;
}
.arena-sheet-bot-stat {
  font-size: 13px;
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-weight: 600;
}

.arena-field {
  margin-bottom: 20px;
}
.arena-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.arena-field-value {
  font-family: var(--font-mono);
  color: var(--accent-gold);
  font-weight: 600;
}
.arena-budget-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 20px;
  font-family: var(--font-mono);
  font-weight: 700;
  outline: none;
  transition: border-color 0.2s;
}
.arena-budget-input:focus {
  border-color: var(--accent-gold);
}
.arena-budget-input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 14px;
}

/* Reinvestment slider */
.arena-slider-wrap {
  position: relative;
  padding: 8px 0;
}
.arena-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--accent-gold) 0%, var(--accent-gold) var(--val, 50%), var(--bg-card) var(--val, 50%));
  outline: none;
}
.arena-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(212, 160, 18, 0.4);
}
.arena-reinvest-explain {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 8px;
  line-height: 1.5;
}

.arena-confirm-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-gold), #C4940F);
  color: #000;
  margin-top: 8px;
  transition: all 0.2s;
}
.arena-confirm-btn:active { transform: scale(0.97); }

/* Rank transition animation for reordering */
.arena-cat-card, .arena-bot-card {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
}
.arena-cat-card.shifting-up, .arena-cat-card-new.shifting-up {
  animation: shiftUp 0.5s ease;
}
.arena-cat-card.shifting-down, .arena-cat-card-new.shifting-down {
  animation: shiftDown 0.5s ease;
}
@keyframes shiftUp {
  0% { transform: translateY(10px); opacity: 0.7; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes shiftDown {
  0% { transform: translateY(-10px); opacity: 0.7; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ========================================
   LOGIN SCREEN
   ======================================== */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-screen.hidden { display: none; }
.login-back-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.login-back-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.login-logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 4px;
}
.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.login-form {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s;
}
.login-input::placeholder {
  color: var(--text-muted);
}
.login-input:focus {
  border-color: var(--accent-gold);
}
.login-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent-gold);
  color: #000;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-sans);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.2s;
}
.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.login-error {
  color: #ff4d4d;
  font-size: 13px;
  text-align: center;
  min-height: 18px;
}
.skeleton { background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.06) 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: skeleton-pulse 1.5s ease-in-out infinite; border-radius: 8px; }
@keyframes skeleton-pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { height: 140px; margin-bottom: 10px; border-radius: 14px; }
.skeleton-card-sm { height: 80px; margin-bottom: 10px; border-radius: 14px; }
.empty-state { text-align: center; color: rgba(255,255,255,0.3); padding: 40px 20px; font-size: 13px; }

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

/* Offline banner */
.offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: var(--accent-red, #f44336); color: #fff;
  text-align: center; padding: 6px 12px; font-size: 12px; font-weight: 600;
  transition: transform 0.3s ease;
}
.offline-banner.hidden { transform: translateY(-100%); }

/* Prototype badge for simulated features */
.prototype-badge {
  display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px;
  background: rgba(255,193,7,0.15); color: #ffc107;
}

/* ========================================
   DEVICE LAYOUT RADIO GROUP (Settings)
   ======================================== */
.device-radio-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.device-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
}
.device-radio:hover { background: rgba(255,255,255,0.04); }
.device-radio-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.15s;
}
.device-radio.selected .device-radio-dot {
  border-color: var(--accent-gold);
}
.device-radio.selected .device-radio-dot::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-gold);
}
.device-radio-info { flex: 1; }

/* ========================================
   DESKTOP SIDEBAR
   ======================================== */
.desktop-sidebar {
  display: none; /* hidden by default, shown in desktop mode */
  position: fixed;
  left: 0; top: 0;
  width: 240px;
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  flex-direction: column;
  z-index: 200;
  padding: 0;
}
.sidebar-logo {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-gold);
  padding: 24px 24px 20px;
  letter-spacing: -0.5px;
}
.sidebar-nav-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}
.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.sidebar-nav-item.active {
  background: rgba(255,193,7,0.1);
  color: var(--accent-gold);
  position: relative;
  overflow: visible;
}
.sidebar-nav-item.active::before,
.sidebar-nav-item.active::after {
  content: '✦';
  position: absolute;
  font-size: 8px;
  color: var(--accent-gold);
  pointer-events: none;
}
.sidebar-nav-item.active::before {
  top: 4px;
  right: 8px;
  animation: sparkleSpin 2.4s ease-in-out infinite;
}
.sidebar-nav-item.active::after {
  bottom: 4px;
  right: 20px;
  font-size: 6px;
  animation: sparkleSpin 3s ease-in-out 0.8s infinite;
}
.sidebar-nav-item svg {
  flex-shrink: 0;
  stroke: currentColor;
}
/* Admin sidebar divider */
.sidebar-admin-divider {
  padding: 16px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  opacity: 0.6;
}
.sidebar-admin-item.active {
  background: rgba(255,193,7,0.1);
  color: var(--accent-gold);
}
/* Admin Panel styles */
.admin-overview-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.admin-stat {
  background: var(--card-bg);
  padding: 16px 12px;
  text-align: center;
}
.admin-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.admin-stat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-top: 4px;
}
/* Admin health chips */
.admin-health-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.admin-health-chip {
  flex: 1 1 0;
  min-width: 80px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  text-align: center;
}
.admin-health-chip-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.admin-health-chip-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-top: 2px;
}
/* Admin quick actions */
.admin-quick-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.admin-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.admin-action-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--accent-gold);
}
.admin-action-btn svg { stroke: var(--accent-gold); flex-shrink: 0; }
/* Admin refresh button */
.admin-refresh-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.15s, border-color 0.15s;
  margin-left: auto;
}
.admin-refresh-btn:hover { color: var(--accent-gold); border-color: var(--accent-gold); }
/* Admin menu meta (count badges) */
.profile-menu-meta {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-left: auto;
  margin-right: 8px;
}
/* Admin user rows */
.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.admin-user-row:last-child { border-bottom: none; }
.admin-user-row:hover { background: rgba(255,255,255,0.03); }
.admin-user-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.admin-user-cat { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.admin-user-row-right { text-align: right; }
.admin-user-bal { font-size: 14px; font-weight: 700; color: var(--text-primary); font-family: var(--font-mono); }
.admin-user-pnl { font-size: 12px; font-family: var(--font-mono); margin-top: 2px; }
/* Admin category rows */
.admin-cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.admin-cat-row:last-child { border-bottom: none; }
.admin-cat-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.admin-cat-meta { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.admin-cat-row-right { text-align: right; }
/* Admin alert rows */
.admin-alert-row {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-alert-row:last-child { border-bottom: none; }
/* Admin system grid */
.admin-system-grid {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.admin-system-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.admin-system-row:last-child { border-bottom: none; }
.admin-system-key {
  font-size: 13px;
  color: var(--text-secondary);
}
.admin-system-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
/* Admin notes */
.admin-note-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.admin-note-row:last-child { border-bottom: none; }
.admin-note-content { flex: 1; min-width: 0; }
.admin-note-text { font-size: 13px; color: var(--text-primary); line-height: 1.4; }
.admin-note-meta { font-size: 10px; color: var(--text-secondary); margin-top: 4px; }
.admin-note-delete {
  background: none; border: none; color: var(--text-secondary); cursor: pointer;
  font-size: 12px; padding: 2px 4px; opacity: 0.4; transition: opacity 0.15s;
  flex-shrink: 0;
}
.admin-note-delete:hover { opacity: 1; color: var(--accent-red); }
/* Admin filter tabs */
.admin-filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.admin-filter-tab {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.admin-filter-tab:hover { background: rgba(255,255,255,0.04); }
.admin-filter-tab.active {
  background: rgba(255,193,7,0.1);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
.admin-filter-count {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.7;
  margin-left: 2px;
}
/* Admin compact table */
.admin-table-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.admin-table-row {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.1s;
}
.admin-table-row:hover { background: rgba(255,255,255,0.03); }
.admin-table-row:last-child { border-bottom: none; }
.admin-table-username {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.admin-table-email {
  font-size: 10px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-plan-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.sidebar-footer {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--border);
}
.sidebar-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.15s;
}
.sidebar-balance:hover { background: rgba(255,255,255,0.07); }
.sidebar-balance-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--accent-blue);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.sidebar-balance-text {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.sidebar-version {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 12px;
}

/* ========================================
   DEVICE MODE: PHONE (default — no changes needed)
   ======================================== */
/* .device-phone uses the default 430px phone-frame layout */

/* ========================================
   DEVICE MODE: TABLET
   ======================================== */
body.device-tablet .phone-frame {
  max-width: 768px;
}
body.device-tablet .bottom-nav {
  max-width: 768px;
}
body.device-tablet .global-kalshi-pill {
  right: calc(50% - 384px + 20px);
}
/* Wider content padding */
body.device-tablet .screen {
  padding-left: 8px;
  padding-right: 8px;
}

/* ========================================
   DEVICE MODE: DESKTOP
   ======================================== */
body.device-desktop .desktop-sidebar {
  display: flex;
}
body.device-desktop .phone-frame {
  max-width: none;
  margin-left: 240px; /* offset by sidebar width */
  margin-right: 0;
}
body.device-desktop .bottom-nav {
  display: none !important;
}
body.device-desktop .screen {
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 24px; /* no bottom nav, reduce padding */
}
body.device-desktop .global-kalshi-pill {
  /* Align with the right edge of the 960px content area.
     Content center = 240px + (100vw - 240px)/2 = 120px + 50vw
     Content right edge = 120px + 50vw + 480px = 50vw + 600px
     From right: 100vw - (50vw + 600px) = 50vw - 600px
     Plus 20px inset */
  right: max(20px, calc(50vw - 580px));
}
/* Sticky action bar on tablet — full width edge to edge */
body.device-tablet .arena-activate-area {
  max-width: none;
  left: 0;
  transform: none;
  width: 100vw;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}
/* Sticky action bar (Stop Bot / Reactivate) spans content width on desktop */
body.device-desktop .arena-activate-area {
  max-width: none;
  left: 240px; /* start after sidebar */
  transform: none;
  width: calc(100% - 240px);
}
body.device-desktop .arena-activate-area .arena-activate-btn,
body.device-desktop .arena-activate-area button {
  max-width: 960px;
  margin: 0 auto;
  display: block;
}
/* Settings detail panel adapts to desktop width */
body.device-desktop .settings-detail {
  max-width: 960px;
  margin: 0 auto;
}
/* Arena detail adapts */
body.device-desktop .arena-detail {
  max-width: 960px;
  margin: 0 auto;
}
/* Screen headers can be wider */
body.device-desktop .screen-header {
  max-width: 960px;
  margin: 0 auto;
}

/* ========================================
   LANDING PAGE
   ======================================== */
:root {
  --font-display: 'Outfit', 'DM Sans', -apple-system, sans-serif;
  --lp-gold: #f5c542;
  --lp-gold-dim: rgba(245, 197, 66, 0.12);
  --lp-green: #4ade80;
  --lp-green-dim: rgba(74, 222, 128, 0.12);
}

.landing-page {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: #0d0d0d;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ---- NAV ---- */
.lp-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lp-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lp-nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--lp-gold);
  letter-spacing: -0.02em;
}
.lp-nav-links {
  display: flex;
  gap: 32px;
}
.lp-nav-link {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.lp-nav-link:hover { color: #fff; }
.lp-nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.lp-nav-signin {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  font-family: var(--font-sans);
  transition: color 0.2s;
}
.lp-nav-signin:hover { color: #fff; }
.lp-nav-cta {
  background: var(--lp-gold);
  color: #000;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: transform 0.15s, box-shadow 0.15s;
}
.lp-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245, 197, 66, 0.3);
}
.lp-mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 4px;
}
.lp-mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 24px 20px;
  gap: 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.lp-mobile-menu.open { display: flex; }
.lp-mobile-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 0;
}
.lp-mobile-menu-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* ---- CONTAINERS ---- */
.lp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.lp-section {
  padding: 100px 0;
}
.lp-section-dark {
  background: #111114;
}

/* ---- FADE-IN ---- */
.lp-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.lp-fade-in.lp-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- HERO ---- */
.lp-hero {
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lp-hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(245, 197, 66, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.lp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 197, 66, 0.08);
  border: 1px solid rgba(245, 197, 66, 0.2);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--lp-gold);
  margin-bottom: 32px;
}
.lp-hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lp-green);
  animation: lpPulse 2s ease-in-out infinite;
}
@keyframes lpPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}
.lp-hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 24px;
}
.lp-gold { color: var(--lp-gold); }
.lp-green { color: var(--lp-green); }
.lp-hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255,255,255,0.5);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.lp-hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}
.lp-btn-primary {
  background: var(--lp-gold);
  color: #000;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 16px 36px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: transform 0.15s, box-shadow 0.15s;
}
.lp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245, 197, 66, 0.35);
}
.lp-btn-lg {
  padding: 18px 48px;
  font-size: 18px;
  border-radius: 14px;
}
.lp-btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 16px 36px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-sans);
  transition: border-color 0.2s, color 0.2s;
}
.lp-btn-ghost:hover {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

/* Hero Ticker */
.lp-hero-ticker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.lp-ticker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.lp-ticker-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.lp-ticker-label {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lp-ticker-sep {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.1);
}

/* ---- SECTION TITLES ---- */
.lp-section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: #fff;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.lp-section-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.45);
  text-align: center;
  max-width: 550px;
  margin: 0 auto 56px;
  line-height: 1.5;
}

/* ---- HOW IT WORKS ---- */
.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.lp-step {
  background: #141419;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  transition: border-color 0.3s, transform 0.3s;
}
.lp-step:hover {
  border-color: rgba(245, 197, 66, 0.2);
  transform: translateY(-4px);
}
.lp-step-num {
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  color: rgba(255,255,255,0.04);
  line-height: 1;
}
.lp-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--lp-gold-dim);
  border-radius: 16px;
  margin-bottom: 24px;
  color: var(--lp-gold);
}
.lp-step-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.lp-step-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}

/* ---- BOT ARENA GRID ---- */
.lp-arena-header {
  margin-bottom: 48px;
}
.lp-arena-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.lp-arena-card {
  background: #18181e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.3s, transform 0.3s;
}
.lp-arena-card:hover {
  border-color: rgba(245, 197, 66, 0.2);
  transform: translateY(-3px);
}
.lp-arena-card:first-child {
  border-color: rgba(245, 197, 66, 0.25);
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.06) 0%, #18181e 60%);
}
.lp-arena-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.lp-arena-cat {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.lp-arena-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.lp-arena-badge-hot {
  background: var(--lp-gold-dim);
  color: var(--lp-gold);
}
.lp-arena-rank {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
}
.lp-arena-roi {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--lp-green);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.lp-arena-period {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.3);
}
.lp-arena-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 16px;
}
.lp-arena-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.lp-arena-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--lp-gold), var(--lp-green));
  border-radius: 2px;
  transition: width 1.2s ease;
}

/* ---- WHY PREVAYO ---- */
.lp-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.lp-feature {
  background: #141419;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 40px 32px;
  transition: border-color 0.3s, transform 0.3s;
}
.lp-feature:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-3px);
}
.lp-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  margin-bottom: 20px;
}
.lp-feature-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.lp-feature-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}

/* ---- PRICING ---- */
.lp-pricing-card {
  max-width: 480px;
  margin: 0 auto;
  background: #18181e;
  border: 1px solid rgba(245, 197, 66, 0.2);
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lp-pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lp-gold), var(--lp-green));
}
.lp-pricing-header {
  margin-bottom: 32px;
}
.lp-pricing-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--lp-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.lp-pricing-price {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}
.lp-pricing-period {
  font-size: 20px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
}
.lp-pricing-plus {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}
.lp-pricing-note {
  color: var(--lp-green);
  font-weight: 600;
}
.lp-pricing-list {
  list-style: none;
  text-align: left;
  margin-bottom: 36px;
}
.lp-pricing-list li {
  padding: 10px 0;
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: relative;
  padding-left: 28px;
}
.lp-pricing-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.5 4.5L6 12L2.5 8.5' stroke='%234ade80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}
.lp-pricing-cta {
  width: 100%;
}

/* ---- FAQ ---- */
.lp-faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.lp-faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lp-faq-q {
  padding: 24px 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lp-faq-q::-webkit-details-marker { display: none; }
.lp-faq-q::after {
  content: '+';
  font-size: 22px;
  color: rgba(255,255,255,0.3);
  font-weight: 400;
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}
details[open] .lp-faq-q::after {
  transform: rotate(45deg);
}
.lp-faq-a {
  padding: 0 0 24px;
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
}

/* ---- FINAL CTA ---- */
.lp-section-cta {
  text-align: center;
  background: linear-gradient(180deg, #0d0d0d 0%, #111114 50%, #0d0d0d 100%);
  padding: 120px 0;
}
.lp-cta-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.lp-cta-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 40px;
}

/* ---- FOOTER ---- */
.lp-footer {
  background: #0a0a0a;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 0 32px;
}
.lp-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.lp-footer-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--lp-gold);
}
.lp-footer-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  margin-top: 4px;
}
.lp-footer-links {
  display: flex;
  gap: 24px;
}
.lp-footer-link {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.lp-footer-link:hover { color: #fff; }
.lp-footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.2);
  width: 100%;
  text-align: center;
  margin-top: 16px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .lp-arena-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .lp-nav-links,
  .lp-nav-actions {
    display: none;
  }
  .lp-mobile-menu-btn {
    display: block;
  }
  .lp-hero {
    padding: 120px 0 80px;
  }
  .lp-section {
    padding: 72px 0;
  }
  .lp-steps {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
  .lp-arena-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
  .lp-features {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
  .lp-pricing-card {
    padding: 36px 24px;
  }
  .lp-hero-ticker {
    gap: 20px;
  }
  .lp-ticker-sep {
    display: none;
  }
  .lp-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .lp-footer-brand { text-align: center; }
  .lp-section-cta {
    padding: 80px 0;
  }
}

.switch-cat-option:hover:not([disabled]) { background: rgba(255,255,255,0.08) !important; border-color: rgba(167,139,250,0.4) !important; }

/* ═══ ONBOARDING WIZARD ═══ */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.onboarding-overlay.open { display: flex; }

.onboarding-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}
.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s, transform 0.3s;
}
.onboarding-dot.active {
  background: var(--accent-gold);
  transform: scale(1.25);
}
.onboarding-dot.done {
  background: var(--accent-green);
}

.onboarding-track {
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  padding: 0 20px;
  box-sizing: border-box;
}
.onboarding-slides {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.onboarding-slide {
  min-width: 100%;
  padding: 0 4px;
  box-sizing: border-box;
}

.onboarding-card {
  background: linear-gradient(168deg, rgba(32, 34, 46, 0.98) 0%, rgba(16, 17, 24, 0.99) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 32px 28px;
  text-align: center;
}
.onboarding-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
}
.onboarding-icon svg { width: 24px; height: 24px; }
.onboarding-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.3;
}
.onboarding-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}
.onboarding-input-group {
  margin-bottom: 14px;
  text-align: left;
}
.onboarding-input-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.onboarding-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}
.onboarding-input:focus { border-color: var(--accent-gold); }
.onboarding-help-link {
  display: block;
  font-size: 12px;
  color: var(--accent-gold);
  text-decoration: none;
  margin: -4px 0 16px;
  text-align: left;
}
.onboarding-help-link:hover { text-decoration: underline; }
.onboarding-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  font-family: var(--font-sans);
}
.onboarding-btn:active { transform: scale(0.98); }
.onboarding-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.onboarding-btn-primary {
  background: var(--accent-gold);
  color: #000;
}
.onboarding-btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  margin-top: 10px;
}

/* Bot selection cards */
.onboarding-bots {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  text-align: left;
}
.onboarding-bot-card {
  padding: 16px;
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: rgba(255,255,255,0.02);
}
.onboarding-bot-card:hover { background: rgba(255,255,255,0.04); }
.onboarding-bot-card.selected {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.06);
}
.onboarding-bot-descriptor {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.onboarding-bot-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 8px;
}
.onboarding-bot-stats {
  font-size: 11px;
  color: var(--text-muted);
}

/* Amount input */
.onboarding-amount-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 12px;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}
.onboarding-amount-wrap:focus-within { border-color: var(--accent-gold); }
.onboarding-amount-prefix {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 4px;
}
.onboarding-amount-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  padding: 12px 0;
  outline: none;
  font-family: var(--font-sans);
}
.onboarding-amount-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: left;
  margin-bottom: 16px;
}

/* Safety badges */
.onboarding-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  text-align: left;
}
.onboarding-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.onboarding-badge-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.onboarding-badge-icon svg { width: 10px; height: 10px; }

/* Risk checkbox */
.onboarding-risk {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  text-align: left;
}
.onboarding-risk label {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.4;
}

/* Confirmation */
.onboarding-check-anim {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: onbPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes onbPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.onboarding-status-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
  margin: 16px 0 20px;
  font-size: 13px;
  color: var(--text-secondary);
}
.onboarding-status-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}
.onboarding-status-label { color: var(--text-muted); }
.onboarding-status-value { color: var(--text-primary); font-weight: 600; }
.onboarding-activity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.onboarding-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: onbPulse 2s ease-in-out infinite;
}
@keyframes onbPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Skip / Dismiss / Control footer */
.onboarding-skip {
  margin-top: 20px;
  display: flex;
  gap: 16px;
  justify-content: center;
}
.onboarding-skip-link {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-sans);
  padding: 0;
}
.onboarding-skip-link:hover { color: var(--text-secondary); text-decoration: underline; }
.onboarding-control-footer {
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

