/* TraderMap shell: header, referral buttons, language select, footer (extracted from the main page) */
:root {
  --bg: #090a0f;
  --bg-subtle: #0d0e15;
  --panel: #12141c;
  --panel-card: #161822;
  --panel-hover: #1c1e2b;
  --line: #222533;
  --line-light: #2c3042;
  --fg: #e2e4ed;
  --dim: #797e93;
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.2);
  --buy: #059669;
  --buy-glow: rgba(5, 150, 105, 0.25);
  --sell: #dc2626;
  --sell-glow: rgba(220, 38, 38, 0.25);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

a { color: inherit; text-decoration: none; }

a:hover { color: #fff; }

:focus-visible { outline: 1px solid var(--gold); outline-offset: 1px; }

::-webkit-scrollbar { width: 4px; height: 4px; }

::-webkit-scrollbar-track { background: var(--bg); }

::-webkit-scrollbar-thumb { background: #222533; border-radius: 2px; }

::-webkit-scrollbar-thumb:hover { background: #32374b; }

/* Header Navigation Bar */
.bar {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 6px 14px;
  background: rgba(9, 10, 15, 0.96);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  z-index: 100;
}

.brand { font-weight: 900; font-size: 1.05rem; display: flex; align-items: center; gap: 6px; letter-spacing: -0.01em; color: #fff; }

.brand span.amber { color: var(--gold); }

.bar nav { display: flex; gap: 4px; color: var(--dim); overflow-x: auto; font-size: 0.78rem; align-items: center; }

.bar nav a { padding: 3px 8px; border-radius: 4px; transition: all 0.15s; white-space: nowrap; }

.bar nav a:hover, .bar nav a.active { background: var(--panel); color: #fff; border: 1px solid var(--line); }

/* Eye-Catching Shimmering Referral Buttons */
.ref-links {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 8px;
}

.ref-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

/* Shimmer Light Sweep Effect */
.ref-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-20deg);
  animation: refShimmer 3.5s infinite;
  pointer-events: none;
}

@keyframes refShimmer {
  0% { left: -100%; }
  25% { left: 200%; }
  100% { left: 200%; }
}

.ref-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

/* Hyperliquid Style with Neon Pulse Badge */
.ref-hl {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.16) 0%, rgba(9, 10, 15, 0.9) 100%);
  border: 1px solid rgba(0, 230, 118, 0.45);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.15);
}

.ref-hl:hover {
  border-color: var(--buy);
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.3) 0%, rgba(14, 25, 20, 0.95) 100%);
  box-shadow: 0 0 18px rgba(0, 230, 118, 0.45), inset 0 0 12px rgba(0, 230, 118, 0.15);
  color: #fff;
}

.ref-tag-hl {
  background: rgba(0, 230, 118, 0.22);
  color: var(--buy);
  border: 1px solid rgba(0, 230, 118, 0.5);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-shadow: 0 0 8px var(--buy-glow);
  animation: pulseGreen 2.4s infinite alternate;
}

@keyframes pulseGreen {
  from { box-shadow: 0 0 4px rgba(0, 230, 118, 0.2); }
  to { box-shadow: 0 0 10px rgba(0, 230, 118, 0.6); }
}

/* Bitunix Style with Gold Glow Badge */
.ref-bitunix {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(9, 10, 15, 0.9) 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.ref-bitunix:hover {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(28, 20, 10, 0.95) 100%);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.45), inset 0 0 12px rgba(245, 158, 11, 0.15);
  color: #fff;
}

.ref-tag-bitunix {
  background: rgba(245, 158, 11, 0.22);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.5);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-shadow: 0 0 8px var(--gold-glow);
  animation: pulseGold 2.4s infinite alternate;
}

@keyframes pulseGold {
  from { box-shadow: 0 0 4px rgba(245, 158, 11, 0.2); }
  to { box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
}

.bar-right { margin-left: auto; display: flex; gap: 12px; align-items: center; flex-shrink: 0; }

/* Exchange Status LEDs */
.ex-status { display: flex; gap: 8px; font-size: 0.7rem; color: var(--dim); flex-wrap: nowrap; align-items: center; }

.ex-status span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }

.ex-status i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #3a3f55; }

.ex-status [data-s="on"] i { background: var(--buy); box-shadow: 0 0 6px var(--buy); }

.up { color: var(--buy); }

.dn { color: var(--sell); }

.num { text-align: right; font-weight: 800; }

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  padding: 4px 14px;
  color: var(--dim);
  font-size: 0.72rem;
  background: rgba(9, 10, 15, 0.98);
  flex-shrink: 0;
}

.lang-select {
  font: inherit;
  font-size: 0.72rem;
  background: #141622;
  color: #fff;
  border: 1px solid var(--line);
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
}

.lang-select:hover { border-color: var(--line-light); }
