/* ═══════════════════════════════════════════════════════════
   Hermex Control Interface — Royal Blue / Cobalt + Spray Grain
   Street Art Graffiti Aesthetic — Dreamy, Misty, Cool
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg-void: #0a1628;
  --bg-deep: #0e1e38;
  --bg-cobalt: #122448;
  --bg-glass: rgba(14, 30, 56, 0.6);
  --bg-glass-hover: rgba(20, 42, 78, 0.7);
  --bg-card: rgba(16, 34, 62, 0.5);
  --border-glass: rgba(120, 160, 220, 0.1);
  --border-glow: rgba(140, 180, 240, 0.18);
  --border-hover: rgba(180, 210, 255, 0.3);
  --text-primary: #eaf0ff;
  --text-secondary: #a0b4d0;
  --text-dim: #506888;
  --accent: #5b9aff;
  --accent-bright: #80b4ff;
  --accent-soft: rgba(91, 154, 255, 0.15);
  --white-glow: rgba(220, 235, 255, 0.9);
  --cyan: #64d8ff;
  --cyan-dim: rgba(100, 216, 255, 0.1);
  --green: #5aedc2;
  --green-dim: rgba(90, 237, 194, 0.1);
  --amber: #ffc46b;
  --amber-dim: rgba(255, 196, 107, 0.1);
  --red: #ff6b8a;
  --red-dim: rgba(255, 107, 138, 0.08);
  --purple: #b8a0ff;
  --glow-accent: 0 0 20px rgba(91, 154, 255, 0.12), 0 0 60px rgba(91, 154, 255, 0.04);
  --glow-card: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 40px rgba(91, 154, 255, 0.03);
  --blur: blur(24px) saturate(1.2);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --font: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg-void);
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
  position: relative;
}

/* ──── Spray Grain Canvas (behind everything) ──── */
#matrixCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Grain noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.45;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ASCII art floating background layer */
.ascii-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.03;
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.3;
  color: var(--accent-bright);
  white-space: pre;
  animation: asciiDrift 60s linear infinite;
}
@keyframes asciiDrift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* ──── Scrollbar ──── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(91,154,255,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(91,154,255,0.35); }

/* ══════════════ TOP BAR ══════════════ */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  background: var(--bg-glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border-glass);
  height: 46px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.top-left { display: flex; align-items: center; gap: 10px; }

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.nav-icon:hover {
  color: var(--white-glow);
  border-color: var(--border-hover);
  background: var(--bg-glass-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(91,154,255,0.15);
}

.top-right { display: flex; align-items: center; gap: 8px; }

.clock {
  font-size: 13px;
  font-weight: 600;
  color: var(--white-glow);
  margin-right: 12px;
  text-shadow: 0 0 15px rgba(91,154,255,0.3);
}

/* ──── Buttons ──── */
.btn {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  padding: 5px 16px;
  border: 1px solid var(--border-glow);
  border-radius: 22px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.8px;
}
.btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-glass-hover);
  box-shadow: 0 0 20px rgba(91,154,255,0.12);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

.btn-accent {
  background: linear-gradient(135deg, rgba(91,154,255,0.25), rgba(100,216,255,0.15));
  color: var(--white-glow);
  border-color: rgba(91,154,255,0.35);
  text-shadow: 0 0 10px rgba(91,154,255,0.3);
}
.btn-danger { color: var(--red); border-color: rgba(255,107,138,0.2); }
.btn-danger:hover { border-color: var(--red); box-shadow: 0 0 20px rgba(255,107,138,0.1); }
.btn-small { font-size: 9px; padding: 3px 12px; border-radius: 16px; }

/* ══════════════ MAIN LAYOUT ══════════════ */
.main-layout {
  display: grid;
  grid-template-columns: 230px 1fr 270px;
  gap: 6px;
  height: calc(100vh - 46px);
  padding: 8px;
  position: relative;
  z-index: 5;
}

/* ──── Panels (Glass + Rounded) ──── */
.panel {
  background: var(--bg-glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  margin: 3px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--glow-card);
  position: relative;
}
.panel::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91,154,255,0.15), transparent);
  border-radius: 1px;
}
.panel:hover {
  border-color: var(--border-glow);
  box-shadow: var(--glow-card), 0 0 40px rgba(91,154,255,0.04);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  font-size: 9px;
  font-weight: 700;
  color: var(--white-glow);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(91,154,255,0.06), transparent);
  border-bottom: 1px solid var(--border-glass);
}

.header-badges { display: flex; gap: 6px; }

/* ──── Badges ──── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 8px;
  font-weight: 600;
  padding: 2px 10px;
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  background: var(--bg-card);
}
.badge.green {
  color: var(--green);
  border-color: rgba(90,237,194,0.2);
  background: var(--green-dim);
}
.badge.accent {
  color: var(--cyan);
  border-color: rgba(100,216,255,0.2);
  background: var(--cyan-dim);
}

/* ──── Tabs ──── */
.tab {
  font-family: var(--font);
  font-size: 9px;
  font-weight: 600;
  padding: 4px 14px;
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.3s;
}
.tab.active {
  color: var(--white-glow);
  border-color: rgba(91,154,255,0.35);
  background: var(--accent-soft);
  box-shadow: 0 0 15px rgba(91,154,255,0.08);
}
.tab:hover:not(.active) { color: var(--text-secondary); border-color: var(--border-glow); }

/* ──── Dots ──── */
.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
}
.dot.green {
  background: var(--green);
  box-shadow: 0 0 8px var(--green), 0 0 18px rgba(90,237,194,0.25);
  animation: dotPulse 2.5s ease-in-out infinite;
}
.dot.yellow {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: dotPulse 3s ease-in-out infinite;
}
.dot.cyan { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.dot.red {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  animation: dotPulse 1.8s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ══════════════ LEFT SIDEBAR ══════════════ */
.sidebar-left {
  overflow-y: auto;
  padding: 2px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-panel {
  text-align: center;
  padding: 22px 14px 18px;
  background: linear-gradient(180deg, rgba(91,154,255,0.06), var(--bg-glass));
}
.avatar-wrap { position: relative; display: inline-block; margin-bottom: 12px; }
.avatar {
  width: 70px; height: 70px;
  border-radius: 22px;
  border: 2px solid rgba(91,154,255,0.3);
  box-shadow: 0 0 20px rgba(91,154,255,0.1);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.5s;
}
.avatar:hover {
  transform: translateY(-10px) scale(1.06);
  box-shadow: 0 16px 50px rgba(91,154,255,0.3), 0 0 60px rgba(91,154,255,0.12);
  border-color: rgba(91,154,255,0.6);
}
.live-badge {
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 700;
  color: var(--green);
  background: var(--bg-deep);
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid rgba(90,237,194,0.3);
  letter-spacing: 1.5px;
  animation: livePulse 2.5s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(90,237,194,0.15); }
  50% { opacity: 0.65; box-shadow: 0 0 18px rgba(90,237,194,0.3); }
}
.profile-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--white-glow);
  margin-top: 4px;
  text-shadow: 0 0 20px rgba(91,154,255,0.3);
  letter-spacing: 2px;
}
.profile-sub { font-size: 9px; color: var(--text-dim); margin-bottom: 8px; }

/* Panel header icons */
.ph-icon {
  margin-right: 4px;
  opacity: 0.6;
}

.quick-links { padding: 8px 14px; display: flex; flex-direction: column; gap: 4px; }
.qlink {
  color: var(--accent-bright);
  text-decoration: none;
  font-size: 10px;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  transition: all 0.25s;
}
.qlink:hover {
  background: var(--accent-soft);
  color: var(--white-glow);
  transform: translateX(4px);
}

.info-grid { padding: 8px 14px; }
.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--text-secondary);
  padding: 3px 0;
}
.fc-key { color: var(--accent-bright); font-weight: 600; flex-shrink: 0; }

.session-list { padding: 6px 8px; }
.session-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s;
  border: 1px solid transparent;
}
.session-item:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass);
  transform: translateX(3px);
}
.session-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.session-title { font-size: 10px; color: var(--text-primary); line-height: 1.4; }
.session-sub { font-size: 8px; color: var(--text-dim); margin-top: 2px; }

/* ══════════════ CENTER AREA ══════════════ */
.center-area {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 2px;
}

/* ──── System Overview Strip ──── */
.system-strip { flex-shrink: 0; }
.strip-row {
  display: flex;
  gap: 4px;
  padding: 10px 12px;
  align-items: stretch;
}
.strip-card {
  flex: 1;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--border-glass);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}
.strip-card:hover {
  background: rgba(91,154,255,0.05);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(91,154,255,0.1);
}
.strip-top {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
}
.strip-icon {
  font-size: 10px;
  opacity: 0.45;
  transition: opacity 0.3s;
}
.strip-card:hover .strip-icon { opacity: 1; }
.cpu-icon { color: var(--cyan); }
.mem-icon { color: var(--amber); }
.disk-icon { color: var(--purple); }
.up-icon { color: var(--green); }
.req-icon { color: var(--accent-bright); }
.prop-icon { color: var(--cyan); }
.llm-icon { color: var(--green); }
.strip-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}
.strip-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--white-glow);
  line-height: 1.1;
  margin-bottom: 2px;
  text-shadow: 0 0 18px rgba(91,154,255,0.2);
}
.strip-value.uptime { font-size: 15px; }
.strip-sub {
  font-size: 7px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.strip-bar {
  height: 3px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}
.strip-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.strip-fill::after {
  content: '';
  position: absolute;
  right: -1px; top: -3px; bottom: -3px;
  width: 6px;
  border-radius: 50%;
  filter: blur(3px);
}
.strip-fill.cpu {
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  box-shadow: 0 0 10px rgba(91,154,255,0.35);
}
.strip-fill.cpu::after { background: var(--cyan); }
.strip-fill.mem {
  background: linear-gradient(90deg, var(--amber), #ff9f40);
  box-shadow: 0 0 10px rgba(255,196,107,0.3);
}
.strip-fill.mem::after { background: var(--amber); }
.strip-fill.disk {
  background: linear-gradient(90deg, var(--purple), var(--accent-bright));
  box-shadow: 0 0 10px rgba(184,160,255,0.25);
}
.strip-fill.disk::after { background: var(--purple); }
.strip-divider {
  width: 1px;
  background: var(--border-glass);
  margin: 4px 4px;
  flex-shrink: 0;
}

/* Terminal */
.terminal-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.terminal-body {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
  background: rgba(0,0,0,0.2);
  border-radius: 0 0 var(--radius) var(--radius);
}
.ascii-art {
  color: var(--accent-bright);
  font-size: 9px;
  line-height: 1.15;
  margin-bottom: 14px;
  text-shadow: 0 0 20px rgba(91,154,255,0.5), 0 0 50px rgba(91,154,255,0.2);
  white-space: pre;
  overflow-x: auto;
  animation: asciiBreath 5s ease-in-out infinite;
}
@keyframes asciiBreath {
  0%, 100% { filter: brightness(1); opacity: 0.9; }
  50% { filter: brightness(1.2); opacity: 1; }
}
.term-info { margin-bottom: 14px; }
.term-label {
  font-size: 10px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 6px;
  display: block;
}
.term-section { margin-bottom: 14px; }
.term-heading {
  font-size: 10px;
  font-weight: 700;
  color: var(--white-glow);
  margin-bottom: 6px;
  letter-spacing: 0.8px;
  text-shadow: 0 0 10px rgba(91,154,255,0.2);
}
.term-row { font-size: 10px; color: var(--text-secondary); padding: 2px 0 2px 14px; }
.term-cat { color: var(--accent-bright); font-weight: 600; margin-right: 8px; }

/* Logs */
.logs-panel { height: 160px; display: flex; flex-direction: column; flex-shrink: 0; }
.log-tabs { display: flex; gap: 4px; }
.log-controls { display: flex; gap: 8px; align-items: center; }
.logs-body {
  flex: 1;
  padding: 6px 10px;
  overflow-y: auto;
  font-size: 9px;
  background: rgba(0,0,0,0.15);
  border-radius: 0 0 var(--radius) var(--radius);
}
.log-line {
  display: flex;
  gap: 10px;
  padding: 3px 8px;
  color: var(--text-dim);
  border-radius: 6px;
  margin-bottom: 1px;
  transition: background 0.2s;
}
.log-line:hover { background: rgba(91,154,255,0.04); }
.log-line.info .log-msg { color: var(--cyan); }
.log-line.error { background: var(--red-dim); border-left: 2px solid var(--red); }
.log-line.error .log-msg { color: var(--red); }
.log-line.error .log-src { color: var(--red); }
.log-ts { color: var(--text-dim); flex-shrink: 0; font-size: 8px; opacity: 0.6; }
.log-src { color: var(--amber); flex-shrink: 0; min-width: 120px; font-weight: 600; }
.log-msg { color: var(--text-secondary); }

/* ══════════════ RIGHT SIDEBAR ══════════════ */
.sidebar-right {
  overflow-y: auto;
  padding: 2px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.file-tree { padding: 8px 14px; }
.file-dir {
  font-size: 10px;
  color: var(--amber);
  margin-bottom: 6px;
  font-weight: 600;
}
.file-tree-items { padding-left: 4px; }
.file-item {
  font-size: 10px;
  color: var(--text-secondary);
  padding: 4px 10px;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: all 0.25s;
  border: 1px solid transparent;
}
.file-item:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  transform: translateX(3px);
  border-color: var(--border-glass);
}
.file-item.active {
  background: var(--accent-soft);
  color: var(--white-glow);
  border-color: rgba(91,154,255,0.2);
}

.file-preview { margin: 0 4px 4px; border-radius: var(--radius-sm) !important; }
.file-content {
  padding: 10px 14px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 9px;
}
.fc-row {
  font-size: 9px;
  color: var(--text-secondary);
  padding: 1px 0;
  font-family: var(--font);
  white-space: pre-wrap;
  word-break: break-all;
}
.fc-row.indent { padding-left: 14px; color: var(--text-dim); }

.token-grid { padding: 8px 14px; }
.token-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 10px;
  border-bottom: 1px solid var(--border-glass);
}
.token-row:last-child { border-bottom: none; }
.token-label { color: var(--text-secondary); }
.token-val { font-weight: 700; color: var(--white-glow); }

.models-list { padding: 6px 10px; }
.model-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 3px;
  transition: all 0.25s;
  border: 1px solid transparent;
}
.model-item:hover { background: var(--bg-glass-hover); border-color: var(--border-glass); }
.model-item.active {
  background: var(--accent-soft);
  border-color: rgba(91,154,255,0.2);
  box-shadow: 0 0 15px rgba(91,154,255,0.06);
}
.model-name { color: var(--text-primary); }
.model-cost { color: var(--text-dim); font-size: 9px; }
.model-cost.accent { color: var(--green); font-weight: 700; }

.tools-list { padding: 6px 10px; }
.tool-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 10px;
  font-size: 10px;
  border-radius: var(--radius-xs);
  margin-bottom: 2px;
  transition: all 0.25s;
}
.tool-item:hover { background: var(--bg-glass-hover); transform: translateX(3px); }
.tool-name { color: var(--text-primary); }
.tool-sub { color: var(--text-dim); font-size: 9px; }
.tool-sub.accent { color: var(--green); text-shadow: 0 0 6px rgba(90,237,194,0.3); }

.dim { opacity: 0.4; }
.error { color: var(--red) !important; }

/* Corner decorations on panels for tech feel */
.panel::after {
  content: '◇';
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 8px;
  color: var(--accent);
  opacity: 0.06;
  pointer-events: none;
  transition: opacity 0.3s;
}
.panel:hover::after { opacity: 0.15; }

/* Vignette */
.main-layout::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(6,12,20,0.6) 100%);
  pointer-events: none;
  z-index: 6;
}

@media (max-width: 1200px) { .main-layout { grid-template-columns: 190px 1fr 230px; } }
/* mobile rules below in dedicated block */

/* ──── Toast ──── */
.hermex-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.95), rgba(30, 64, 175, 0.95));
  color: #e0ecff;
  padding: 14px 24px;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(96, 165, 250, 0.4);
  box-shadow: 0 8px 32px rgba(30, 64, 175, 0.4), 0 0 20px rgba(96, 165, 250, 0.3);
  backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10000;
  white-space: nowrap;
}
.hermex-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ──── Install Button (primary CTA) ──── */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border: 1px solid rgba(147, 197, 253, 0.4);
  font-weight: 600;
  letter-spacing: 0.6px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35), 0 0 20px rgba(99, 102, 241, 0.25);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5), 0 0 30px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover::before { transform: translateX(100%); }

/* ──── Install Modal ──── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(10, 22, 40, 0.75), rgba(0, 0, 0, 0.9));
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: relative;
  width: min(480px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(15, 31, 58, 0.98), rgba(20, 40, 75, 0.98));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 60px rgba(99, 102, 241, 0.2);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s ease;
}
.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  color: rgba(226, 232, 240, 0.6);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: all 0.15s;
}
.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.modal-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.5), 0 0 48px rgba(59, 130, 246, 0.3);
  animation: logo-pulse 3s ease-in-out infinite;
}
@keyframes logo-pulse {
  0%, 100% { box-shadow: 0 0 24px rgba(99, 102, 241, 0.5), 0 0 48px rgba(59, 130, 246, 0.3); }
  50% { box-shadow: 0 0 36px rgba(99, 102, 241, 0.7), 0 0 72px rgba(59, 130, 246, 0.45); }
}

.modal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: #e0ecff;
  margin: 0 0 6px;
  letter-spacing: 1px;
}
.modal-sub {
  text-align: center;
  color: rgba(203, 213, 225, 0.7);
  font-size: 13px;
  margin: 0 0 24px;
  font-family: 'JetBrains Mono', monospace;
}

.modal-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.modal-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.modal-option:hover {
  background: rgba(30, 58, 138, 0.4);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.3);
}
.opt-icon {
  font-size: 28px;
  color: #60a5fa;
  width: 40px;
  text-align: center;
  text-shadow: 0 0 12px rgba(96, 165, 250, 0.5);
}
.opt-text { flex: 1; min-width: 0; }
.opt-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #e0ecff;
  margin-bottom: 3px;
}
.opt-desc {
  font-size: 12px;
  color: rgba(203, 213, 225, 0.6);
  font-family: 'JetBrains Mono', monospace;
}
.opt-badge {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  background: rgba(100, 116, 139, 0.3);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
  white-space: nowrap;
}
.opt-badge.available {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
}

.modal-instructions {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  padding: 14px 16px;
}
.mi-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(147, 197, 253, 0.9);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.mi-list {
  margin: 0;
  padding-left: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(203, 213, 225, 0.8);
}
.mi-list code {
  background: rgba(59, 130, 246, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  color: #93c5fd;
  font-size: 11px;
}

/* ──── Install Panel ──── */
.install-panel {
  position: relative;
  overflow: hidden;
}
.install-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(99, 102, 241, 0.18), transparent 55%),
              radial-gradient(circle at 15% 85%, rgba(59, 130, 246, 0.14), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.install-panel > * { position: relative; z-index: 1; }
.install-panel > .panel-header { margin: 0; }
.install-panel > .ext-preview,
.install-panel > .download-hero {
  margin-left: 14px;
  margin-right: 14px;
}

.ext-preview {
  margin-top: 12px;
  margin-bottom: 12px;
}
.preview-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(147, 197, 253, 0.7);
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

/* Mock in-feed card */
.mock-card {
  background: linear-gradient(145deg, rgba(15, 31, 58, 0.95), rgba(20, 40, 75, 0.9));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.25), 0 0 0 1px rgba(59, 130, 246, 0.08) inset;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
}
.install-panel:hover .mock-card {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(30, 64, 175, 0.4), 0 0 24px rgba(99, 102, 241, 0.25);
}
.mock-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  min-width: 0;
}
.mock-eye {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.5);
  flex-shrink: 0;
  object-fit: cover;
}
.mock-title { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.mock-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: #e0ecff;
  letter-spacing: 1.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: rgba(203, 213, 225, 0.6);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-live {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.5px;
  animation: mock-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
  white-space: nowrap;
}
@keyframes mock-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.mock-question {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #e0ecff;
  line-height: 1.45;
  margin-bottom: 10px;
  font-weight: 500;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.mock-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}
.mock-bar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 9px;
  border-radius: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  overflow: hidden;
  box-sizing: border-box;
}
.mock-bar .ml, .mock-bar .mr { position: relative; z-index: 1; }
.mock-bar.yes {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.3) 62%, rgba(34, 197, 94, 0.08) 62%);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #86efac;
}
.mock-bar.no {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.28) 38%, rgba(239, 68, 68, 0.06) 38%);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}
.mock-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: rgba(147, 197, 253, 0.8);
  padding-top: 8px;
  border-top: 1px dashed rgba(99, 102, 241, 0.2);
}
.mock-stats span { white-space: nowrap; }

/* ──── Download Button (matches mock-card aesthetic) ──── */
.download-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 2px;
  padding: 6px 10px;
  background: linear-gradient(145deg, rgba(15, 31, 58, 0.88), rgba(20, 40, 75, 0.82));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 9px;
  text-decoration: none;
  color: #e0ecff;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 3px 10px rgba(30, 64, 175, 0.18), 0 0 0 1px rgba(59, 130, 246, 0.05) inset;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-sizing: border-box;
  overflow: hidden;
}
.download-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 50%, rgba(99, 102, 241, 0.14), transparent 60%);
  pointer-events: none;
  opacity: 0.8;
}
.download-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(147, 197, 253, 0.12) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
  pointer-events: none;
}
.download-hero:hover {
  transform: translateY(-1px);
  border-color: rgba(147, 197, 253, 0.5);
  box-shadow: 0 6px 18px rgba(30, 64, 175, 0.32), 0 0 14px rgba(99, 102, 241, 0.2);
}
.download-hero:hover::after { transform: translateX(120%); }
.download-hero:active { transform: translateY(-1px); }

.download-hero .dh-icon-wrap {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(99, 102, 241, 0.16));
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 5px;
  color: #93c5fd;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.15);
}
.download-hero .dh-label {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #e0ecff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.download-hero .dh-arrow {
  position: relative;
  z-index: 1;
  font-size: 11px;
  color: #93c5fd;
  opacity: 0.65;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.download-hero:hover .dh-arrow {
  transform: translateX(4px);
  opacity: 1;
  color: #bfdbfe;
}

.modal-option.primary {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(99, 102, 241, 0.22));
  border-color: rgba(147, 197, 253, 0.4);
}

/* ──── API Endpoints inside Logs Panel ──── */
.log-line.api-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px dashed rgba(99, 102, 241, 0.12);
}
.log-line.api-line:hover {
  background: rgba(59, 130, 246, 0.06);
}
.log-method {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 5px;
  min-width: 52px;
  text-align: center;
}
.log-method.m-get {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}
.log-method.m-post {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.4);
}
.log-method.m-put {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  border: 1px solid rgba(253, 224, 71, 0.35);
}
.log-method.m-del {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.log-method.m-other {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.log-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #e0ecff;
  letter-spacing: 0.3px;
}

/* ════════════════════════════════════════════════════
   BINANCE CONNECT BUTTON + MODAL
   ════════════════════════════════════════════════════ */

.btn-binance {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #F3BA2F 0%, #F0B90B 100%);
  color: #1a1a1a;
  border: 1px solid rgba(243, 186, 47, 0.6);
  font-weight: 700;
  letter-spacing: 0.8px;
  font-size: 10px;
  box-shadow:
    0 4px 14px rgba(243, 186, 47, 0.35),
    0 0 18px rgba(243, 186, 47, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.btn-binance::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-binance:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 22px rgba(243, 186, 47, 0.5),
    0 0 28px rgba(243, 186, 47, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-binance:hover::before { transform: translateX(100%); }
.btn-binance-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
}
.btn-binance.connected {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.08));
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.5);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.2), 0 0 0 1px rgba(74, 222, 128, 0.3) inset;
}
.btn-binance.connected .btn-binance-icon { color: #F3BA2F; }

/* ──── Premium Connect Modal ──── */
.binance-modal {
  width: min(440px, 92vw);
  padding: 0;
  overflow: hidden;
  border-color: rgba(243, 186, 47, 0.28);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(243, 186, 47, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Glowing top gradient strip */
.bnc-header-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(243, 186, 47, 0.3) 20%,
    #F3BA2F 50%,
    rgba(243, 186, 47, 0.3) 80%,
    transparent 100%);
  box-shadow: 0 0 16px rgba(243, 186, 47, 0.6);
}

/* Radial gold glow behind logo */
.binance-modal::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 220px;
  background: radial-gradient(ellipse at center,
    rgba(243, 186, 47, 0.2) 0%,
    rgba(243, 186, 47, 0.08) 40%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.binance-modal .modal-close {
  top: 14px;
  right: 14px;
  z-index: 10;
}

/* Header */
.bnc-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 24px 16px;
}

.binance-logo-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(243, 186, 47, 0.15), rgba(240, 185, 11, 0.08));
  border: 1px solid rgba(243, 186, 47, 0.35);
  border-radius: 14px;
  box-shadow:
    0 4px 18px rgba(243, 186, 47, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.bnc-logo-ring {
  position: absolute;
  inset: -3px;
  border-radius: 16px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(243, 186, 47, 0.5) 60deg,
    transparent 120deg,
    rgba(243, 186, 47, 0.5) 240deg,
    transparent 300deg,
    rgba(243, 186, 47, 0.5) 360deg
  );
  animation: bnc-ring-spin 4s linear infinite;
  filter: blur(6px);
  opacity: 0.7;
  z-index: -1;
}
@keyframes bnc-ring-spin {
  to { transform: rotate(360deg); }
}
.bnc-logo-svg {
  filter: drop-shadow(0 2px 8px rgba(243, 186, 47, 0.5));
  position: relative;
  z-index: 1;
}

.bnc-title-group { flex: 1; min-width: 0; }
.bnc-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  font-weight: 700;
  color: #e0ecff;
  letter-spacing: 0.3px;
  margin: 0 0 4px;
}
.bnc-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(203, 213, 225, 0.6);
  letter-spacing: 0.4px;
  margin: 0;
}

/* Chains strip */
.bnc-chains-strip {
  position: relative;
  z-index: 1;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.55);
  border-top: 1px solid rgba(99, 102, 241, 0.12);
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}
.bnc-chains-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(147, 197, 253, 0.5);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.bnc-chains-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bnc-chain-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: rgba(30, 58, 138, 0.35);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(203, 213, 225, 0.85);
  letter-spacing: 0.5px;
  transition: all 0.2s;
}
.bnc-chain-chip:hover {
  background: rgba(30, 58, 138, 0.55);
  border-color: rgba(99, 102, 241, 0.5);
  color: #e0ecff;
}
.cc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

/* Pane wrapper */
.bnc-pane {
  position: relative;
  z-index: 1;
  padding: 20px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ──── Connect Method Button ──── */
.bnc-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(243, 186, 47, 0.1), rgba(243, 186, 47, 0.04));
  border: 1px solid rgba(243, 186, 47, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: inherit;
  font-family: inherit;
  text-align: left;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.bnc-method::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(243, 186, 47, 0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
}
.bnc-method:hover {
  background: linear-gradient(135deg, rgba(243, 186, 47, 0.18), rgba(243, 186, 47, 0.08));
  border-color: rgba(243, 186, 47, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(243, 186, 47, 0.2);
}
.bnc-method:hover::before { transform: translateX(100%); }
.bnc-method.disabled { opacity: 0.45; cursor: not-allowed; }
.bnc-method.disabled:hover {
  transform: none;
  box-shadow: none;
  background: linear-gradient(135deg, rgba(243, 186, 47, 0.1), rgba(243, 186, 47, 0.04));
  border-color: rgba(243, 186, 47, 0.3);
}

.bnc-method-icon {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(243, 186, 47, 0.3), rgba(243, 186, 47, 0.15));
  border: 1px solid rgba(243, 186, 47, 0.5);
  border-radius: 10px;
  color: #F3BA2F;
  box-shadow: 0 0 16px rgba(243, 186, 47, 0.3);
  flex-shrink: 0;
}
.bnc-method-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.bnc-method-title {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #e0ecff;
  letter-spacing: 0.4px;
}
.bnc-method-sub {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: rgba(203, 213, 225, 0.7);
  margin-top: 3px;
}
.bnc-method-arrow {
  position: relative;
  z-index: 1;
  color: #F3BA2F;
  font-size: 18px;
  font-weight: 700;
  opacity: 0.75;
  transition: transform 0.25s ease, opacity 0.25s ease;
  text-shadow: 0 0 8px rgba(243, 186, 47, 0.6);
}
.bnc-method:hover .bnc-method-arrow { transform: translateX(5px); opacity: 1; }

/* Divider */
.bnc-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(203, 213, 225, 0.35);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  margin: 0;
}
.bnc-divider::before,
.bnc-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.25), transparent);
}

/* ──── QR Scanner Block ──── */
.bnc-qr-wrap {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(20, 30, 55, 0.6));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 14px;
}
.bnc-qr-frame {
  position: relative;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 24px rgba(243, 186, 47, 0.12);
}
.bnc-qr-frame .qr-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #F3BA2F;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(243, 186, 47, 0.8));
}
.qr-corner.tl { top: -4px; left: -4px; border-right: none; border-bottom: none; border-top-left-radius: 4px; }
.qr-corner.tr { top: -4px; right: -4px; border-left: none; border-bottom: none; border-top-right-radius: 4px; }
.qr-corner.bl { bottom: -4px; left: -4px; border-right: none; border-top: none; border-bottom-left-radius: 4px; }
.qr-corner.br { bottom: -4px; right: -4px; border-left: none; border-top: none; border-bottom-right-radius: 4px; }
.bnc-qr {
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.bnc-qr img { width: 100%; height: 100%; display: block; }

/* QR steps */
.bnc-qr-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  flex: 1;
  min-width: 0;
}
.bnc-qr-step {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: rgba(203, 213, 225, 0.85);
  line-height: 1.4;
}
.qr-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #F3BA2F, #F0B90B);
  color: #0F1F3A;
  font-weight: 800;
  border-radius: 50%;
  font-size: 10px;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(243, 186, 47, 0.5);
}
.bnc-qr-step b { color: #F3BA2F; font-weight: 700; }

/* Download link */
.bnc-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px;
  background: rgba(243, 186, 47, 0.05);
  border: 1px dashed rgba(243, 186, 47, 0.25);
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: rgba(203, 213, 225, 0.7);
  text-decoration: none;
  transition: all 0.2s;
}
.bnc-download b {
  color: #F3BA2F;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(243, 186, 47, 0.4);
}
.bnc-download:hover {
  background: rgba(243, 186, 47, 0.12);
  border-color: rgba(243, 186, 47, 0.5);
  border-style: solid;
  color: #e0ecff;
}

/* ──── Connected State Card ──── */
.bnc-connected-card {
  background: linear-gradient(145deg, rgba(15, 31, 58, 0.9), rgba(20, 40, 75, 0.85));
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.15), 0 0 0 1px rgba(74, 222, 128, 0.08) inset;
  position: relative;
  overflow: hidden;
}
.bnc-connected-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(34, 197, 94, 0.15), transparent 55%);
  pointer-events: none;
}
.bnc-connected-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  position: relative;
}
.bnc-status-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bnc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.9), 0 0 0 3px rgba(74, 222, 128, 0.15);
  animation: bnc-dot-pulse 1.6s ease-in-out infinite;
}
@keyframes bnc-dot-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(74, 222, 128, 0.9), 0 0 0 3px rgba(74, 222, 128, 0.15); }
  50% { box-shadow: 0 0 16px rgba(74, 222, 128, 1), 0 0 0 6px rgba(74, 222, 128, 0.08); }
}
.bnc-status-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #4ade80;
  letter-spacing: 2px;
  font-weight: 700;
}
.bnc-chain {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #F3BA2F;
  padding: 3px 9px;
  background: rgba(243, 186, 47, 0.12);
  border: 1px solid rgba(243, 186, 47, 0.3);
  border-radius: 999px;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.bnc-addr-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(147, 197, 253, 0.6);
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  position: relative;
}
.bnc-addr {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #e0ecff;
  word-break: break-all;
  line-height: 1.5;
  letter-spacing: 0.3px;
}

/* Action buttons */
.bnc-actions {
  display: flex;
  gap: 8px;
}
.bnc-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: rgba(203, 213, 225, 0.85);
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.2s;
}
.bnc-action-btn:hover {
  background: rgba(30, 58, 138, 0.5);
  border-color: rgba(99, 102, 241, 0.5);
  color: #e0ecff;
  transform: translateY(-1px);
}
.bnc-action-btn.danger {
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}
.bnc-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
}

/* ──── Install panel meta chips ──── */
.install-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 14px 14px;
  justify-content: center;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.6px;
  color: rgba(203, 213, 225, 0.75);
}
.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
}
.chip-dot.green { background: #4ade80; }

/* ──── File Explorer dir row + UP ──── */
.file-dir-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.file-dir-row .file-dir { margin-bottom: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-up {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(15, 23, 42, 0.55);
  color: rgba(203, 213, 225, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.fe-up:hover:not(:disabled) {
  background: rgba(30, 58, 138, 0.5);
  border-color: rgba(99, 102, 241, 0.5);
  color: #e0ecff;
  transform: translateY(-1px);
}
.fe-up:disabled { opacity: 0.3; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════
   Live Markets Strip (Polymarket-style feed)
   ═══════════════════════════════════════════════════════════ */
.markets-panel {
  position: relative;
  overflow: hidden;
  padding: 0;
}
.markets-panel .panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}
.markets-sub {
  margin-left: 10px;
  font-size: 10px;
  color: rgba(203, 213, 225, 0.55);
  font-weight: 400;
  letter-spacing: 0.4px;
  text-transform: none;
}
.markets-viewport {
  position: relative;
  overflow: hidden;
}
.markets-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 14px 16px 18px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.markets-row::-webkit-scrollbar { display: none; height: 0; width: 0; }

.markets-fade {
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s;
}
.markets-fade.left {
  left: 0;
  background: linear-gradient(90deg, rgba(10, 15, 30, 0.85), transparent);
}
.markets-fade.right {
  right: 0;
  background: linear-gradient(270deg, rgba(10, 15, 30, 0.85), transparent);
}
.markets-viewport.has-prev .markets-fade.left { opacity: 1; }
.markets-viewport.has-next .markets-fade.right { opacity: 1; }

.slider-nav {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 2px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 6px;
  color: #e0ecff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
}
.slider-nav:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.7);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
}
.slider-nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.markets-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0 16px 12px;
}
.markets-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.25);
  cursor: pointer;
  transition: all 0.25s;
  border: none;
  padding: 0;
}
.markets-dot.active {
  width: 22px;
  border-radius: 3px;
  background: linear-gradient(90deg, #6366f1, #3b82f6);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}
.markets-dot:hover:not(.active) { background: rgba(99, 102, 241, 0.55); }

.markets-empty {
  padding: 20px;
  color: rgba(203, 213, 225, 0.45);
  font-size: 11px;
  font-style: italic;
}
.markets-empty.error { color: rgba(248, 113, 113, 0.7); }

.market-skeleton {
  flex: 0 0 340px;
  height: 240px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(99, 102, 241, 0.12);
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
}
.sk-shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(99, 102, 241, 0.08) 40%,
    rgba(99, 102, 241, 0.16) 50%,
    rgba(99, 102, 241, 0.08) 60%,
    transparent 100%);
  background-size: 200% 100%;
  animation: sk-slide 1.6s infinite linear;
}
@keyframes sk-slide {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Market Card ─── */
.market-card {
  flex: 0 0 340px;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(15, 28, 55, 0.88), rgba(20, 40, 80, 0.78));
  border: 1px solid rgba(99, 102, 241, 0.22);
  box-shadow:
    0 6px 22px rgba(10, 20, 50, 0.38),
    0 0 0 1px rgba(99, 102, 241, 0.05) inset;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s, box-shadow 0.25s;
  box-sizing: border-box;
  overflow: hidden;
}
.market-card::before {
  content: "";
  position: absolute;
  top: -50%; left: -30%;
  width: 160%; height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.12), transparent 55%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.market-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow:
    0 12px 32px rgba(30, 64, 175, 0.35),
    0 0 0 1px rgba(99, 102, 241, 0.15) inset;
}
.market-card:hover::before { opacity: 1; }

.mk-head { display: flex; align-items: center; gap: 10px; }
.mk-avatar-wrap {
  width: 38px; height: 38px;
  flex-shrink: 0;
  position: relative;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}
.mk-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  background: #0f172a;
}
.mk-avatar-fallback {
  display: none;
  position: absolute; inset: 2px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e40af, #6366f1);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 700;
}
.mk-author { flex: 1; min-width: 0; }
.mk-handle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #e0ecff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mk-meta {
  font-size: 10px;
  color: rgba(203, 213, 225, 0.6);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
}
.mk-live-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: live-pulse 2s infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.mk-change {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
}
.mk-change.up { color: #22c55e; background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.25); }
.mk-change.down { color: #ef4444; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.25); }
.mk-change.pending {
  color: rgba(148, 163, 184, 0.85);
  background: rgba(100, 116, 139, 0.10);
  border: 1px solid rgba(100, 116, 139, 0.22);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.market-card.on-chain { border-color: rgba(34, 197, 94, 0.28); }
.market-card.on-chain::before {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.12), transparent 40%);
}
.market-card.proposal { border-color: rgba(100, 116, 139, 0.22); }
.mkf-pending {
  color: rgba(148, 163, 184, 0.7);
  font-style: italic;
}

.mk-tweet {
  font-size: 11px;
  color: rgba(203, 213, 225, 0.82);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 8px 10px;
  border-left: 2px solid rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.06);
  border-radius: 0 7px 7px 0;
  cursor: help;
  min-height: 62px;
}
.mk-tweet:hover {
  -webkit-line-clamp: unset;
  background: rgba(99, 102, 241, 0.12);
  border-left-color: rgba(99, 102, 241, 0.7);
}

.mk-question {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #f0f9ff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}

.mk-bars { display: flex; flex-direction: column; gap: 5px; }
.mk-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  overflow: hidden;
  z-index: 0;
}
.mk-bar::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--pct);
  z-index: -1;
  border-radius: 6px;
  transition: width 0.35s ease;
}
.mk-bar.yes { background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.22); }
.mk-bar.yes::before { background: linear-gradient(90deg, rgba(34, 197, 94, 0.32), rgba(34, 197, 94, 0.16)); }
.mk-bar.no { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.22); }
.mk-bar.no::before { background: linear-gradient(90deg, rgba(239, 68, 68, 0.32), rgba(239, 68, 68, 0.16)); }
.mk-bar-label { font-weight: 700; letter-spacing: 0.5px; }
.mk-bar.yes .mk-bar-label { color: #86efac; }
.mk-bar.no .mk-bar-label { color: #fca5a5; }
.mk-bar-price { font-weight: 600; color: #e0ecff; }

.mk-actions { display: flex; gap: 6px; margin-top: 2px; }
.mk-btn {
  flex: 1;
  padding: 8px 8px;
  border-radius: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.mk-btn.yes {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.08));
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.4);
}
.mk-btn.yes:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.35), rgba(34, 197, 94, 0.18));
  color: #fff;
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
  transform: translateY(-1px);
}
.mk-btn.no {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(239, 68, 68, 0.08));
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}
.mk-btn.no:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(239, 68, 68, 0.18));
  color: #fff;
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.mk-footer {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(203, 213, 225, 0.5);
  padding-top: 6px;
  border-top: 1px dashed rgba(99, 102, 241, 0.15);
}
.mk-footer span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.mkf-dot { width: 4px; height: 4px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 4px #60a5fa; }

/* ═══════════════════════════════════════════════════════════
   Bet Modal
   ═══════════════════════════════════════════════════════════ */
.bet-modal {
  max-width: 440px;
  width: 100%;
  padding: 20px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.98), rgba(20, 35, 70, 0.96));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.1) inset;
  position: relative;
}
.bet-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  margin-bottom: 14px;
}
.bet-header-side {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: all 0.3s;
}
.bet-header-side.yes {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.15));
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.25);
}
.bet-header-side.no {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.15));
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
}
.bet-kol { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bet-kol img {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #0f172a;
  object-fit: cover;
  border: 2px solid rgba(99, 102, 241, 0.3);
}
.bet-kol-text { flex: 1; min-width: 0; }
.bet-kol-handle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #e0ecff;
}
.bet-kol-tweet {
  font-size: 10px;
  color: rgba(203, 213, 225, 0.55);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.bet-question {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #f0f9ff;
  line-height: 1.45;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: rgba(99, 102, 241, 0.06);
  border-left: 3px solid rgba(99, 102, 241, 0.5);
  border-radius: 0 8px 8px 0;
}

.bet-side-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.bet-side-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'JetBrains Mono', monospace;
}
.bet-side-btn.yes { background: rgba(34, 197, 94, 0.08); border-color: rgba(34, 197, 94, 0.25); color: #86efac; }
.bet-side-btn.no { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.bet-side-btn.yes.active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.12));
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  color: #fff;
}
.bet-side-btn.no.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.12));
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  color: #fff;
}
.bet-side-btn:hover:not(.active) { transform: translateY(-1px); }
.bs-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.bs-price { font-size: 16px; font-weight: 700; }

.bet-amount-row { margin-bottom: 14px; }
.bet-amount-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgba(203, 213, 225, 0.55);
  margin-bottom: 6px;
}
.bet-amount-wrap { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bet-amount-input {
  flex: 1;
  min-width: 100px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}
.bet-amount-input:focus { border-color: rgba(99, 102, 241, 0.7); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.bet-amount-presets { display: flex; gap: 4px; flex-wrap: wrap; }
.bet-amount-presets button {
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: rgba(203, 213, 225, 0.85);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.bet-amount-presets button:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #fff;
}

.bet-summary {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.bet-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(203, 213, 225, 0.7);
}
.bet-sum-row.dim { color: rgba(203, 213, 225, 0.4); font-size: 10px; }
.bet-sum-val { color: #e0ecff; font-weight: 600; }
.bet-sum-val.accent { color: #22c55e; }

.bet-confirm {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #0a0e1a;
  background: linear-gradient(135deg, #F3BA2F 0%, #F0B90B 100%);
  box-shadow: 0 6px 20px rgba(243, 186, 47, 0.35);
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.bet-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(243, 186, 47, 0.5);
}
.bet-confirm:active { transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════
   Logs panel — sidebar variant
   ═══════════════════════════════════════════════════════════ */
.logs-panel-side {
  height: auto;
  max-height: 380px;
}
.logs-panel-side .logs-panel-header,
.logs-panel-side .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  flex-wrap: nowrap;
  min-width: 0;
}
.logs-panel-side .log-tabs {
  display: flex;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.logs-panel-side .log-tabs .tab {
  padding: 3px 6px;
  font-size: 9px;
  letter-spacing: 0.3px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}
.logs-panel-side .log-tabs .tab.active {
  background: rgba(99, 102, 241, 0.22);
  color: #e0ecff;
  border-color: rgba(99, 102, 241, 0.45);
}
.logs-panel-side .log-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.28);
  color: #4ade80;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1;
}
.logs-panel-side .log-live-pill .ll-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.8);
  animation: llpulse 1.6s ease-in-out infinite;
}
@keyframes llpulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.82); }
}
.logs-panel-side .logs-body {
  min-height: 200px;
  max-height: 320px;
  padding: 6px 8px;
  font-size: 9px;
  line-height: 1.45;
}
.logs-panel-side .log-line {
  display: block;
  padding: 5px 7px;
  margin-bottom: 3px;
  border-radius: 5px;
  border-left: 2px solid rgba(99, 102, 241, 0.25);
  background: rgba(15, 23, 42, 0.4);
}
.logs-panel-side .log-line:hover {
  background: rgba(99, 102, 241, 0.08);
  border-left-color: rgba(99, 102, 241, 0.55);
}
.logs-panel-side .log-line.error { border-left-color: var(--red); background: rgba(239, 68, 68, 0.08); }
.logs-panel-side .log-line.info { border-left-color: var(--cyan, #60a5fa); }
.logs-panel-side .log-ts {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  color: rgba(203, 213, 225, 0.42);
  margin-right: 6px;
  opacity: 0.9;
  min-width: 0;
  letter-spacing: 0.2px;
}
.logs-panel-side .log-src {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(99, 102, 241, 0.14);
  color: #a5b4fc;
  min-width: 0;
  border: 1px solid rgba(99, 102, 241, 0.22);
}
.logs-panel-side .log-line.error .log-src {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}
.logs-panel-side .log-msg {
  display: block;
  margin-top: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: rgba(203, 213, 225, 0.82);
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.logs-panel-side .api-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  margin-bottom: 2px;
  border-left: none;
  background: transparent;
  border-bottom: 1px dashed rgba(99, 102, 241, 0.1);
}
.logs-panel-side .api-line:hover { background: rgba(99, 102, 241, 0.06); }
.logs-panel-side .log-method { font-size: 8px; padding: 1px 5px; }
.logs-panel-side .log-path { font-size: 10px; word-break: break-all; }

/* ============================================================
   Profile socials (under avatar on sidebar-left profile panel)
   ============================================================ */
.profile-socials {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.profile-social {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: rgba(203, 213, 225, 0.75);
  background: rgba(91, 154, 255, 0.06);
  border: 1px solid rgba(91, 154, 255, 0.18);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.18s ease;
}
.profile-social:hover {
  color: var(--white-glow);
  border-color: rgba(91, 154, 255, 0.45);
  background: rgba(91, 154, 255, 0.14);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(91, 154, 255, 0.12);
}
.profile-social svg { opacity: 0.85; }
.profile-social:hover svg { opacity: 1; }

/* ============================================================
   Docs button (top-left, cobalt variant)
   ============================================================ */
.btn-docs {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  color: var(--white-glow);
  background: linear-gradient(135deg, rgba(91,154,255,0.22) 0%, rgba(91,154,255,0.08) 100%);
  border: 1px solid rgba(91,154,255,0.45);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: 1.2px;
  font-size: 10px;
  text-decoration: none;
  box-shadow:
    0 4px 14px rgba(91,154,255,0.18),
    0 0 18px rgba(91,154,255,0.12),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transition: all 0.2s;
}
.btn-docs:hover {
  border-color: rgba(91,154,255,0.8);
  background: linear-gradient(135deg, rgba(91,154,255,0.32) 0%, rgba(91,154,255,0.14) 100%);
  transform: translateY(-1px);
  box-shadow:
    0 6px 20px rgba(91,154,255,0.28),
    0 0 26px rgba(91,154,255,0.22),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-docs-icon { display: inline-flex; align-items: center; justify-content: center; opacity: 0.9; }

/* Binance label — full on desktop, short on small screens */
.bnc-lbl-full  { display: inline; }
.bnc-lbl-short { display: none; }

/* ============================================================
   Recent Bets Panel
   ============================================================ */
.bets-panel { margin-top: 12px; overflow: hidden; }
.bets-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 10px;
}
.bp-title {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--white-glow);
}
.bets-live-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 0.4px;
  color: #bfe7ff;
  background: rgba(91, 154, 255, 0.14);
  border: 1px solid rgba(91, 154, 255, 0.3);
  border-radius: 999px;
}
.bets-live-pill .bl-dot {
  width: 5px; height: 5px; border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 6px rgba(90, 237, 194, 0.9);
  animation: llpulse 1.6s ease-in-out infinite;
}
.bets-body {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px 8px 10px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 0 0 var(--radius) var(--radius);
  display: flex; flex-direction: column; gap: 4px;
}
.bets-body::-webkit-scrollbar { width: 4px; }
.bets-body::-webkit-scrollbar-thumb { background: rgba(91,154,255,0.22); border-radius: 2px; }

.bet-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 7px 9px;
  background: rgba(15, 30, 56, 0.55);
  border: 1px solid rgba(91, 154, 255, 0.14);
  border-left: 2px solid rgba(91, 154, 255, 0.4);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s ease;
}
.bet-row.bet-yes { border-left-color: var(--green); }
.bet-row.bet-no  { border-left-color: var(--red); }
.bet-row.bet-new { animation: betFlash 0.9s ease-out; }
@keyframes betFlash {
  0%   { background: rgba(91,154,255,0.25); transform: translateY(-4px); opacity: 0; }
  30%  { background: rgba(91,154,255,0.2);  transform: translateY(0);     opacity: 1; }
  100% { background: rgba(15, 30, 56, 0.55); }
}
.bet-line1 { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.bet-addr { font-size: 10px; font-weight: 600; color: #d8e6ff; letter-spacing: 0.3px; }
.bet-action { font-size: 9px; font-weight: 700; letter-spacing: 0.6px; color: var(--text-dim); }
.bet-side {
  font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
  padding: 1px 6px; border-radius: 3px;
}
.bet-side.yes {
  color: #1a3a2a;
  background: linear-gradient(135deg, #7ef0c4 0%, #5aedc2 100%);
  box-shadow: 0 0 8px rgba(90, 237, 194, 0.35);
}
.bet-side.no {
  color: #3a1a25;
  background: linear-gradient(135deg, #ff99b0 0%, #ff6b8a 100%);
  box-shadow: 0 0 8px rgba(255, 107, 138, 0.3);
}
.bet-amount { font-size: 10px; font-weight: 700; color: #ffc46b; letter-spacing: 0.3px; }
.bet-line2 {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  font-size: 9px; color: var(--text-dim); letter-spacing: 0.3px;
}
.bet-market {
  color: rgba(203, 213, 225, 0.72);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; flex: 1;
}
.bet-market .bm-at { color: var(--accent); }
.bet-time { color: var(--text-dim); flex-shrink: 0; }

/* ============================================================
   Docs Page (docs.html)
   ============================================================ */
body.docs-body { overflow-y: auto; }
.docs-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 28px 80px;
  position: relative;
  z-index: 2;
}
.docs-hero {
  position: relative;
  text-align: center;
  padding: 56px 24px 40px;
  margin-bottom: 28px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 30%, rgba(91,154,255,0.18) 0%, rgba(91,154,255,0) 60%),
    linear-gradient(180deg, rgba(91,154,255,0.06), var(--bg-glass));
  border: 1px solid var(--border-glow);
  box-shadow: var(--glow-card);
  overflow: hidden;
}
.docs-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(91,154,255,0.05) 50%, transparent 70%);
  pointer-events: none;
}
.docs-logo-wrap { position: relative; width: 112px; height: 112px; margin: 0 auto 18px; }
.docs-logo-wrap::before {
  content: ""; position: absolute; inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,154,255,0.45) 0%, rgba(91,154,255,0.08) 55%, transparent 75%);
  filter: blur(14px);
  animation: docsPulse 3.2s ease-in-out infinite;
}
.docs-logo-wrap img {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(91,154,255,0.55);
  box-shadow: 0 0 32px rgba(91,154,255,0.5), inset 0 0 20px rgba(91,154,255,0.2);
  object-fit: cover;
}
@keyframes docsPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
.docs-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 48px; font-weight: 800; letter-spacing: 6px;
  color: var(--white-glow);
  margin: 0 0 8px;
  background: linear-gradient(135deg, #fff 0%, #9ec3ff 50%, #5b9aff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(91,154,255,0.35);
}
.docs-tagline {
  font-size: 12px; color: var(--text-secondary);
  letter-spacing: 3px; text-transform: uppercase;
  margin: 0 0 18px;
}
.docs-meta { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.docs-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  font-size: 10px; font-weight: 600; letter-spacing: 1px;
  color: var(--accent-bright);
  background: rgba(91,154,255,0.1);
  border: 1px solid rgba(91,154,255,0.3);
  border-radius: 999px;
}
.docs-chip.live::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
}

.docs-nav {
  position: sticky; top: 12px; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px;
  margin-bottom: 24px;
  background: var(--bg-glass);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  box-shadow: var(--glow-card);
}
.docs-nav a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  transition: all 0.16s ease;
}
.docs-nav a:hover {
  color: var(--white-glow);
  background: rgba(91,154,255,0.08);
  border-color: rgba(91,154,255,0.25);
}
.docs-nav a .nav-num { font-size: 9px; color: var(--text-dim); }

.docs-section {
  margin-bottom: 22px;
  padding: 24px 26px;
  background: var(--bg-glass);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  box-shadow: var(--glow-card);
  scroll-margin-top: 80px;
}
.docs-section h2 {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 6px;
  font-size: 18px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--white-glow);
  text-transform: uppercase;
}
.docs-section h2 .sec-num {
  font-size: 11px; font-weight: 500; color: var(--accent);
  padding: 3px 8px;
  background: rgba(91,154,255,0.12);
  border: 1px solid rgba(91,154,255,0.3);
  border-radius: 4px;
  letter-spacing: 1px;
}
.docs-section .sec-lead {
  font-size: 12px; color: var(--text-secondary);
  margin: 0 0 18px; line-height: 1.6;
}
.docs-section h3 {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--accent-bright);
  text-transform: uppercase;
  margin: 22px 0 10px;
}
.docs-section p {
  font-size: 12.5px; line-height: 1.75;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
.docs-section strong { color: var(--white-glow); font-weight: 600; }
.docs-section code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 2px 6px;
  color: var(--accent-bright);
  background: rgba(91,154,255,0.08);
  border: 1px solid rgba(91,154,255,0.18);
  border-radius: 4px;
}
.docs-section ul, .docs-section ol {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 12.5px; line-height: 1.8;
}
.docs-section li::marker { color: var(--accent); }
.docs-section a {
  color: var(--accent-bright);
  text-decoration: none;
  border-bottom: 1px dashed rgba(91,154,255,0.4);
}
.docs-section a:hover {
  color: var(--white-glow);
  border-bottom-color: var(--accent-bright);
}
.docs-codeblock {
  margin: 12px 0 18px;
  padding: 16px 18px;
  background: rgba(7, 18, 36, 0.7);
  border: 1px solid rgba(91,154,255,0.16);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.docs-codeblock pre {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; line-height: 1.65;
  color: var(--text-primary);
  white-space: pre;
}
.docs-codeblock .cb-comment { color: var(--text-dim); }
.docs-codeblock .cb-key { color: var(--accent-bright); }
.docs-codeblock .cb-str { color: var(--green); }
.docs-codeblock .cb-num { color: var(--amber); }
.docs-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0 6px;
}
.docs-feature {
  padding: 16px 16px 14px;
  background: rgba(16, 34, 62, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.docs-feature:hover {
  border-color: rgba(91,154,255,0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3), 0 0 14px rgba(91,154,255,0.12);
}
.docs-feature .ft-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  margin-bottom: 10px;
  background: rgba(91,154,255,0.12);
  border: 1px solid rgba(91,154,255,0.3);
  border-radius: 8px;
  font-size: 14px;
  color: var(--accent-bright);
}
.docs-feature .ft-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.8px;
  color: var(--white-glow);
  margin: 0 0 6px;
}
.docs-feature .ft-text {
  font-size: 11px; line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}
.docs-endpoints { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.docs-ep {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px; align-items: center;
  padding: 10px 14px;
  background: rgba(16, 34, 62, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xs);
  transition: all 0.15s ease;
}
.docs-ep:hover {
  border-color: rgba(91,154,255,0.35);
  background: rgba(20, 42, 78, 0.55);
}
.docs-ep .ep-method {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-align: center;
  padding: 3px 0;
  border-radius: 4px;
}
.docs-ep .ep-method.get { color: var(--green); background: rgba(90,237,194,0.08); border: 1px solid rgba(90,237,194,0.3); }
.docs-ep .ep-method.post { color: var(--amber); background: rgba(255,196,107,0.08); border: 1px solid rgba(255,196,107,0.3); }
.docs-ep .ep-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--white-glow);
}
.docs-ep .ep-desc { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.docs-footer {
  margin-top: 32px;
  padding: 20px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
  border-top: 1px solid var(--border-glass);
}
.docs-footer a { color: var(--accent-bright); text-decoration: none; }

/* ============================================================
   MOBILE / APP-LIKE LAYOUT  (<= 900px)
   ============================================================ */
@media (max-width: 900px) {
  html, body {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }
  body {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }

  /* Top bar sticky + safe area aware */
  .top-bar {
    position: sticky; top: 0; z-index: 50;
    padding: 8px 12px;
    padding-top: calc(8px + env(safe-area-inset-top));
    flex-wrap: nowrap;
    gap: 8px;
  }
  .top-left, .top-right { gap: 6px; flex-shrink: 0; min-width: 0; }
  .top-right { margin-left: auto; }
  .btn-docs    { padding: 6px 10px; font-size: 9.5px; letter-spacing: 0.8px; }
  .btn-binance { padding: 6px 11px; font-size: 9.5px; letter-spacing: 0.6px; gap: 6px; }

  /* Main layout: single column, everything visible */
  .main-layout {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    height: auto;
    min-height: calc(100vh - 46px);
    padding: 8px 10px 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    gap: 10px;
  }
  .sidebar-left, .sidebar-right, .center-area {
    display: flex; flex-direction: column; gap: 10px;
    overflow: visible;
    height: auto;
    padding: 0;
    width: 100%;
    min-width: 0;
  }
  /* Reorder: markets first, then profile+bets+logs, then the rest */
  .center-area   { order: 1; }
  .sidebar-left  { order: 2; }
  .sidebar-right { order: 3; }

  .panel { border-radius: 14px; width: 100%; min-width: 0; }

  .panel-header {
    flex-wrap: wrap;
    gap: 6px 8px;
    row-gap: 6px;
    padding: 10px 12px;
  }
  .header-badges { flex-wrap: wrap; gap: 4px; }

  /* Market cards — full-width swipeable */
  .markets-panel .panel-header { padding: 10px 12px; }
  .markets-sub { display: none; }
  .markets-row {
    gap: 10px;
    padding: 12px 12px 16px;
    scroll-padding-left: 12px;
    scroll-padding-right: 12px;
  }
  .market-card {
    flex: 0 0 86vw;
    max-width: 360px;
    scroll-snap-align: center;
  }
  .slider-nav { display: none; }

  /* Panels heights */
  .logs-panel-side { max-height: 320px; }
  .logs-panel-side .logs-body { max-height: 260px; }
  .bets-body { max-height: 320px; }

  /* Modal */
  .modal {
    width: calc(100vw - 24px);
    max-width: 420px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }
  .bnc-chains-list { flex-wrap: wrap; gap: 4px; }

  /* Lighter bg effects for smooth scroll */
  #matrixCanvas, .ascii-bg { opacity: 0.35; }
  .main-layout::after { display: none; }

  /* No horizontal overflow */
  .panel, .markets-panel, .logs-panel, .bets-panel, .install-panel {
    overflow-x: hidden;
  }

  /* Native tap feedback */
  a, button, .btn-docs, .btn-binance, .tab, .slider-nav, .bet-row, .market-card {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }
  a:active, button:active { opacity: 0.85; }
}

/* ============================================================
   SMALL PHONES (<= 600px)
   ============================================================ */
@media (max-width: 600px) {
  .top-bar {
    padding: 7px 10px;
    padding-top: calc(7px + env(safe-area-inset-top));
  }
  /* Swap full/short Binance labels */
  .bnc-lbl-full  { display: none; }
  .bnc-lbl-short { display: inline; }

  .main-layout { padding: 6px 8px 24px; gap: 8px; }

  .market-card { flex-basis: 88vw; padding: 12px; }

  .logs-panel-side .log-tabs { gap: 2px; }
  .logs-panel-side .log-tabs .tab { padding: 3px 7px; font-size: 9px; }

  .bet-row { padding: 7px 8px; gap: 4px 8px; }
  .bet-addr { font-size: 9.5px; }
  .bet-amount { font-size: 10px; }
  .bet-line2 { font-size: 8.5px; }

  .panel-header { font-size: 10px; padding: 9px 11px; }
  .header-badges .badge { padding: 2px 7px; font-size: 9px; }
}

/* ============================================================
   TINY PHONES (<= 380px)
   ============================================================ */
@media (max-width: 380px) {
  .btn-docs    { padding: 5px 9px; font-size: 9px; }
  .btn-binance { padding: 5px 10px; font-size: 9px; }
  .top-bar { gap: 6px; }

  .market-card { flex-basis: 90vw; }

  .bnc-title { font-size: 16px; }
  .bnc-sub { font-size: 10px; }
}

/* ============================================================
   Docs page mobile polish
   ============================================================ */
@media (max-width: 720px) {
  .docs-shell { padding: 16px 14px 60px; }
  .docs-hero { padding: 40px 16px 28px; }
  .docs-title { font-size: 34px; letter-spacing: 4px; }
  .docs-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .docs-nav::-webkit-scrollbar { display: none; }
  .docs-nav a { flex-shrink: 0; white-space: nowrap; }
  .docs-section { padding: 18px 16px; }
  .docs-section h2 { font-size: 15px; letter-spacing: 1px; }
  .docs-section h2 .sec-num { font-size: 10px; padding: 2px 6px; }
  .docs-codeblock { padding: 12px 12px; }
  .docs-codeblock pre { font-size: 10.5px; }
  .docs-feature-grid { grid-template-columns: 1fr; gap: 10px; }
  .docs-ep { grid-template-columns: 52px 1fr; padding: 9px 11px; }
  .docs-ep .ep-path { font-size: 11px; word-break: break-all; }
}

/* ==== top-bar icon buttons + refined stat/service lists ==== */

/* Compact square icon button in the top-bar (next to DOCS) */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--white-glow);
  background: rgba(91,154,255,0.08);
  border: 1px solid rgba(91,154,255,0.25);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.18s ease;
  flex-shrink: 0;
  cursor: pointer;
}
.btn-icon:hover {
  color: var(--white-glow);
  border-color: rgba(91,154,255,0.7);
  background: rgba(91,154,255,0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(91,154,255,0.25), 0 0 16px rgba(91,154,255,0.2);
}
.btn-icon svg { display: block; opacity: 0.92; }
.btn-icon:hover svg { opacity: 1; }

/* Refined PLATFORM panel — label above value, no clipping */
.stat-list {
  margin: 0;
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  background: rgba(15, 30, 56, 0.5);
  border: 1px solid rgba(91, 154, 255, 0.12);
  border-left: 2px solid rgba(91, 154, 255, 0.42);
  border-radius: 6px;
  min-width: 0;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.stat-row:hover {
  border-left-color: rgba(91, 154, 255, 0.8);
  background: rgba(20, 42, 78, 0.6);
}
.stat-row dt {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
}
.stat-row dd {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--white-glow);
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

/* Refined SERVICES panel — flex rows with status tag */
.svc-list {
  list-style: none;
  margin: 0;
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.svc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(15, 30, 56, 0.5);
  border: 1px solid rgba(91, 154, 255, 0.12);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  min-width: 0;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.svc-row:hover {
  border-color: rgba(91, 154, 255, 0.35);
  background: rgba(20, 42, 78, 0.6);
}
.svc-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(140, 180, 240, 0.35);
  flex-shrink: 0;
}
.svc-dot.green  { background: #5aedc2; box-shadow: 0 0 6px rgba(90, 237, 194, 0.7); }
.svc-dot.yellow,
.svc-dot.amber  { background: #ffc46b; box-shadow: 0 0 6px rgba(255, 196, 107, 0.7); }
.svc-dot.red    { background: #ff6b8a; box-shadow: 0 0 6px rgba(255, 107, 138, 0.7); }

.svc-name {
  flex: 1;
  min-width: 0;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.svc-tag {
  flex-shrink: 0;
  padding: 1px 6px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  background: rgba(91, 154, 255, 0.08);
  border: 1px solid rgba(91, 154, 255, 0.18);
  border-radius: 999px;
}
.svc-tag.up   { color: #1a3a2a; background: linear-gradient(135deg, #7ef0c4, #5aedc2); border-color: rgba(90,237,194,0.6); }
.svc-tag.warn { color: #3a2a10; background: linear-gradient(135deg, #ffd693, #ffc46b); border-color: rgba(255,196,107,0.6); }
.svc-tag.down { color: #3a1a25; background: linear-gradient(135deg, #ff99b0, #ff6b8a); border-color: rgba(255,107,138,0.6); }
.svc-tag.idle { color: var(--text-dim); }

/* Tightening for narrow sidebars */
@media (max-width: 1200px) {
  .stat-row dd { font-size: 10px; }
  .svc-name { font-size: 9.5px; }
}

/* Mobile: icon buttons stay compact */
@media (max-width: 600px) {
  .btn-icon { width: 28px; height: 28px; }
}
@media (max-width: 380px) {
  .btn-icon { width: 26px; height: 26px; }
}

/* Inline platform stats inside the profile panel */
.profile-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(91, 154, 255, 0.12);
  text-align: left;
}
.ps-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 8px;
  background: rgba(15, 30, 56, 0.5);
  border: 1px solid rgba(91, 154, 255, 0.1);
  border-left: 2px solid rgba(91, 154, 255, 0.38);
  border-radius: 6px;
  min-width: 0;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.ps-row:hover {
  border-left-color: rgba(91, 154, 255, 0.8);
  background: rgba(20, 42, 78, 0.6);
}
.ps-label {
  flex-shrink: 0;
  width: 52px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.9;
}
.ps-value {
  flex: 1;
  min-width: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: var(--white-glow);
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: right;
}

/* ============================================================
   2026-04-16 FIX PASS: panel content being covered / clipped
   - Soften the fixed vignette that was covering sidebar edges
   - Lift sidebars above the vignette
   - Compact profile card so OS/CPU/Runtime stay on one line
   - Make sidebar scrollbars visible so users know SERVICES has
     4 rows (Chrome Extension was hidden below the fold)
   ============================================================ */

/* Soften vignette + push content above it */
.main-layout::after {
  background: radial-gradient(ellipse at center, transparent 60%, rgba(6,12,20,0.18) 100%) !important;
  z-index: 1 !important;
}
.sidebar-left, .sidebar-right, .center-area {
  position: relative;
  z-index: 4;
}

/* Visible thin scrollbars on both sidebars */
.sidebar-left, .sidebar-right {
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(91,154,255,0.35) transparent;
}
.sidebar-left::-webkit-scrollbar,
.sidebar-right::-webkit-scrollbar { width: 5px; }
.sidebar-left::-webkit-scrollbar-track,
.sidebar-right::-webkit-scrollbar-track { background: transparent; }
.sidebar-left::-webkit-scrollbar-thumb,
.sidebar-right::-webkit-scrollbar-thumb {
  background: rgba(91,154,255,0.32);
  border-radius: 3px;
}
.sidebar-left::-webkit-scrollbar-thumb:hover,
.sidebar-right::-webkit-scrollbar-thumb:hover {
  background: rgba(91,154,255,0.55);
}

/* Compact the profile panel so SERVICES stays in-view */
.profile-panel {
  padding: 16px 12px 14px !important;
}

/* Tight profile stats: single line each, ellipsis if needed */
.profile-stats {
  gap: 3px !important;
  margin-top: 10px !important;
  padding-top: 10px !important;
}
.ps-row {
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 7px !important;
}
.ps-label {
  width: 44px !important;
  letter-spacing: 0.9px !important;
}
.ps-value {
  font-size: 9.5px !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: right !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  letter-spacing: 0.1px !important;
}

/* Tighten service rows slightly so all 4 rows fit */
.svc-list { padding: 8px 10px 10px !important; gap: 4px !important; }
.svc-row  { padding: 5px 9px !important; }

/* On narrow sidebars (<=1200px grid switches to 190/230),
   remove any word-breaking and keep stats single-line */
@media (max-width: 1200px) {
  .ps-label { width: 40px !important; font-size: 8px !important; }
  .ps-value { font-size: 9px !important; }
}

/* ============================================================
   2026-04-16 MERGE: Services into Profile card (single card)
   ============================================================ */
.profile-services {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(91, 154, 255, 0.12);
}
.ps-section-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--white-glow);
  padding: 0 4px 6px;
  text-transform: uppercase;
}
.ps-section-title .ph-icon {
  font-size: 10px;
  color: var(--accent);
}
.profile-services .svc-list {
  padding: 0 !important;
  margin: 0;
  gap: 3px !important;
}
.profile-services .svc-row {
  padding: 4px 8px !important;
  font-size: 9.5px;
}
.profile-services .svc-name {
  font-size: 9.5px;
}
.profile-services .svc-tag {
  font-size: 8px;
  padding: 1px 5px;
}

/* ============================================================
   2026-04-16 FIX: profile card content clipped by overflow:hidden
   The profile-panel now contains avatar + stats + services.
   It must NOT be flex-shrunk or overflow-clipped.
   The sidebar itself scrolls if content exceeds viewport.
   ============================================================ */
.profile-panel {
  overflow: visible !important;
  flex-shrink: 0 !important;
}

/* Ensure sidebar-left allows scrolling for all its children */
.sidebar-left {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* All other panels in sidebar can shrink, but profile stays full */
.sidebar-left > .panel {
  flex-shrink: 1;
}
.sidebar-left > .panel.profile-panel {
  flex-shrink: 0 !important;
  overflow: visible !important;
}
