/* public/css/game.css */

body.game-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #0d1017;
}

.hidden { display: none !important; }

/* ============================================================ */
/*  AUTH SCREEN                                                  */
/* ============================================================ */

.auth-screen {
  position: fixed;
  inset: 0;
  background: #0d1017;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.auth-card {
  background: #14181f;
  border: 1px solid #1f242c;
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.auth-logo {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 800;
  color: #e6e8eb;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.auth-sub {
  font-size: 14px;
  color: #8a94a6;
  line-height: 1.6;
  margin-bottom: 28px;
}

.auth-btn {
  width: 100%;
  padding: 15px 20px;
  background: #4ade80;
  color: #0d1017;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  margin-bottom: 16px;
}
.auth-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-note {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 20px;
}

.auth-back {
  display: inline-block;
  font-size: 13px;
  color: #8a94a6;
  font-weight: 500;
  margin-top: 8px;
}
.auth-back:hover {
  color: #e6e8eb;
  opacity: 1;
}

/* ============================================================ */
/*  SIGNING OVERLAY                                              */
/* ============================================================ */

.signing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 16, 23, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.signing-overlay.hidden { display: none !important; }

.signing-card {
  background: #14181f;
  border: 1px solid #2a3140;
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.signing-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 18px;
  border: 3px solid #2a3140;
  border-top-color: #4ade80;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.signing-card h2 {
  font-size: 17px;
  font-weight: 700;
  color: #e6e8eb;
  margin-bottom: 8px;
}

.signing-card p {
  font-size: 13px;
  color: #8a94a6;
  line-height: 1.6;
}

/* ============================================================ */
/*  USERNAME SCREEN                                              */
/* ============================================================ */

.username-screen {
  position: fixed;
  inset: 0;
  background: #0d1017;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 90;
}
.username-screen.hidden { display: none !important; }

.username-card {
  background: #14181f;
  border: 1px solid #1f242c;
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.username-logo {
  font-size: 42px;
  margin-bottom: 12px;
  line-height: 1;
}

.username-card h1 {
  font-size: 22px;
  font-weight: 800;
  color: #e6e8eb;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.username-sub {
  font-size: 14px;
  color: #8a94a6;
  line-height: 1.6;
  margin-bottom: 24px;
}

.username-input-wrap {
  margin-bottom: 16px;
  text-align: left;
}

.username-input {
  width: 100%;
  padding: 14px 16px;
  background: #1a1f28;
  border: 1px solid #2a3140;
  border-radius: 10px;
  color: #e6e8eb;
  font-size: 16px;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.15s;
  letter-spacing: 0.5px;
}
.username-input::placeholder {
  color: #4b5563;
  font-family: var(--font-sans);
  letter-spacing: 0;
}
.username-input:focus {
  border-color: #4ade80;
}
.username-input.valid {
  border-color: #14532d;
}
.username-input.invalid {
  border-color: #7f1d1d;
}

.username-hint {
  font-size: 11px;
  color: #6b7280;
  margin-top: 8px;
  padding-left: 2px;
}

.username-btn {
  width: 100%;
  padding: 14px 20px;
  background: #4ade80;
  color: #0d1017;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  margin-top: 4px;
}
.username-btn:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.username-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.username-error {
  font-size: 13px;
  color: #f87171;
  margin-top: 14px;
  min-height: 18px;
}

/* ============================================================ */
/*  SELECTION SCREEN                                             */
/* ============================================================ */

.selection-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #0d1017;
  z-index: 50;
  overflow-y: auto;
}
.selection-screen.hidden { display: none !important; }

.selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid #1f242c;
  gap: 16px;
  flex-wrap: wrap;
}
.selection-logo {
  font-weight: 700;
  font-size: 15px;
  color: #4ade80;
  text-decoration: none;
}
.selection-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.selection-wallet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #1a1f28;
  border: 1px solid #14532d;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #4ade80;
  font-family: monospace;
}
.selection-wallet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
}

.selection-balance {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.selection-balance .label {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.selection-balance .value {
  font-size: 18px;
  font-weight: 700;
  color: #e6e8eb;
  font-family: monospace;
}

.selection-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
  text-align: center;
}
.selection-body h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.selection-sub {
  font-size: 15px;
  color: #8a94a6;
  margin-bottom: 48px;
}

.selection-legal {
  margin-top: 40px;
  font-size: 12px;
  color: var(--text-dim);
}
.selection-legal a {
  color: var(--text-muted);
  font-weight: 500;
}
.selection-legal a:hover {
  color: var(--green);
  opacity: 1;
}
.selection-legal span {
  margin: 0 8px;
  color: var(--text-dim);
}

.pair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
  gap: 16px;
  justify-content: center;
  width: 100%;
  max-width: 960px;
}

.pair-card {
  background: #14181f;
  border: 1px solid #1f242c;
  border-radius: 12px;
  padding: 24px 20px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.pair-card:hover {
  border-color: #4ade80;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(74, 222, 128, 0.08);
}

.pair-card .pair-name {
  font-size: 18px;
  font-weight: 800;
  color: #e6e8eb;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.pair-card .pair-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.pair-card .pair-price {
  font-size: 22px;
  font-weight: 700;
  font-family: monospace;
  color: #4ade80;
  margin-bottom: 4px;
  transition: color 0.3s;
}
.pair-card .pair-price.up   { color: #4ade80; }
.pair-card .pair-price.down { color: #f87171; }

.pair-card .enter-icon {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1f28;
  border-radius: 50%;
  color: #4ade80;
  font-size: 14px;
  transition: all 0.18s;
}
.pair-card:hover .enter-icon {
  background: #4ade80;
  color: #0d1017;
}

/* ============================================================ */
/*  GAME SCREEN                                                  */
/* ============================================================ */

.game-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.game-screen.hidden { display: none !important; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #14181f;
  border-bottom: 1px solid #1f242c;
}
.brand { display: flex; align-items: center; gap: 12px; }

.change-market {
  background: #1a1f28;
  border: 1px solid #2a3140;
  color: #8a94a6;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.change-market:hover {
  background: #2a3140;
  color: #e6e8eb;
}

.brand .pair {
  font-size: 12px;
  font-weight: 700;
  color: #e6e8eb;
  padding: 4px 10px;
  background: #1f242c;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.follow-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  background: #1a1f28;
  border: 1px solid #2a3140;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.follow-toggle:hover { background: #232a35; }
.follow-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #6b7280;
  transition: color 0.2s;
}
.follow-toggle.active .follow-text { color: #4ade80; }

.follow-toggle .switch {
  position: relative;
  width: 32px;
  height: 16px;
  background: #2a3140;
  border-radius: 10px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.follow-toggle.active .switch { background: #14532d; }

.follow-toggle .switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #6b7280;
  border-radius: 50%;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.follow-toggle.active .switch-knob {
  left: 18px;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
}

/* ---- Mute toggle ---- */
.mute-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #1a1f28;
  border: 1px solid #2a3140;
  border-radius: 50%;
  color: #8a94a6;
  cursor: pointer;
  transition: all 0.15s;
}
.mute-toggle:hover {
  background: #2a3140;
  color: #e6e8eb;
}
.mute-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
}
.mute-toggle .icon-sound-off { display: none; }
.mute-toggle.muted .icon-sound-on  { display: none; }
.mute-toggle.muted .icon-sound-off { display: block; }
.mute-toggle.muted {
  color: #6b7280;
  border-color: #1f242c;
}

.stats { display: flex; gap: 32px; }
.stat { display: flex; flex-direction: column; align-items: flex-end; }
.stat .label {
  font-size: 11px; color: #6b7280;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.stat .value { font-size: 16px; font-weight: 600; color: #e6e8eb; font-family: monospace; }

.conn-status {
  position: fixed; top: 68px; right: 24px;
  padding: 6px 12px; font-size: 12px; border-radius: 6px;
  background: #1f242c; color: #8a94a6; z-index: 100;
  transition: opacity 0.3s;
}
.conn-status.ok      { background: #14532d; color: #4ade80; }
.conn-status.error   { background: #7f1d1d; color: #fca5a5; }
.conn-status.hidden  { opacity: 0; pointer-events: none; }

.chart-wrapper {
  flex: 1; position: relative; overflow: hidden;
}
#chart { width: 100%; height: 100%; }

.vline {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(251, 191, 36, 0.6);
  pointer-events: none;
  z-index: 5;
  transform: translateX(-0.5px);
}
.vline::before {
  content: 'REF';
  position: absolute;
  top: 8px; left: 4px;
  font-size: 10px;
  color: #fbbf24;
  font-weight: 700;
  letter-spacing: 1px;
}

.bet-panel {
  background: #14181f; border-top: 1px solid #1f242c;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px 24px;
  grid-auto-rows: auto;
}

.bet-countdown { grid-column: 1 / -1; }
.countdown-bar {
  height: 4px;
  background: #1f242c;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.countdown-fill {
  height: 100%;
  background: #4ade80;
  width: 100%;
  transition: width 0.25s linear, background-color 0.3s;
}
.countdown-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #4ade80;
}
#countdown-time { font-family: monospace; font-size: 12px; }
.bet-countdown.warning .countdown-fill { background: #fbbf24; }
.bet-countdown.warning .countdown-text { color: #fbbf24; }
.bet-countdown.closed .countdown-fill { background: #6b7280; width: 0%; }
.bet-countdown.closed .countdown-text { color: #6b7280; }
.bet-countdown.closed #countdown-time { opacity: 0.5; }

.bet-countdown.warning #countdown-time {
  animation: countdownPulse 1s ease-in-out infinite;
}
@keyframes countdownPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.history-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.history-section { display: flex; flex-direction: column; gap: 6px; }
.history-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #6b7280;
  text-transform: uppercase;
}
.expand-btn {
  background: transparent;
  border: none;
  color: #8a94a6;
  font-size: 10px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  line-height: 1;
  transition: all 0.15s;
}
.expand-btn:hover { background: #2a3140; color: #e6e8eb; }
.history-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  min-height: 20px;
  line-height: 1;
}
.hc {
  display: inline-block;
  width: 14px;
  text-align: center;
  user-select: none;
  transition: opacity 0.15s;
}
.hc.win   { color: #4ade80; }
.hc.lose  { color: #f87171; }
.hc.draw  { color: #6b7280; }

.bet-controls { display: flex; flex-direction: column; gap: 12px; }
.amount-row { display: flex; align-items: center; gap: 12px; }
.amount-row label { font-size: 12px; color: #8a94a6; min-width: 90px; }
.amount-row input {
  background: #1a1f28; border: 1px solid #2a3140;
  color: #e6e8eb; padding: 8px 12px; border-radius: 6px;
  width: 120px; font-size: 14px; font-family: monospace;
}
.quick-amounts { display: flex; gap: 4px; }
.quick-amounts button {
  background: #1a1f28; border: 1px solid #2a3140;
  color: #8a94a6; padding: 6px 12px; border-radius: 4px;
  font-size: 12px; cursor: pointer; font-weight: 600;
  font-family: inherit;
}
.quick-amounts button:hover { background: #2a3140; color: #e6e8eb; }

.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn {
  position: relative;
  overflow: hidden;
  padding: 14px; border: none; border-radius: 8px;
  font-size: 16px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  display: flex; justify-content: center; align-items: center;
  gap: 10px; color: #0d1017;
  font-family: inherit;
}
.btn small { font-weight: 600; opacity: 0.8; }
.btn-long  { background: #4ade80; }
.btn-short { background: #f87171; }
.btn:hover:not(:disabled) { filter: brightness(1.1); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; filter: grayscale(0.7); }

.btn:active:not(:disabled) {
  transform: scale(0.96);
  filter: brightness(0.92);
  transition: transform 0.05s, filter 0.05s;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.4);
  opacity: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: none;
}
.btn:active:not(:disabled)::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(40);
  transition: transform 0.4s, opacity 0.6s;
}

.bet-feedback { font-size: 13px; min-height: 18px; color: #8a94a6; }
.bet-feedback.error { color: #fca5a5; }
.bet-feedback.ok    { color: #4ade80; }

.toast-container {
  position: fixed; top: 80px; right: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px; font-weight: 700;
  background: #1a1f28; color: #e6e8eb;
  border-left: 4px solid #8a94a6;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 200px;
}
.toast.win  {
  border-left-color: #4ade80;
  color: #4ade80;
  box-shadow: 0 4px 20px rgba(74, 222, 128, 0.25);
}
.toast.lose {
  border-left-color: #f87171;
  color: #f87171;
  box-shadow: 0 4px 20px rgba(248, 113, 113, 0.2);
}
.toast .sub { display: block; font-size: 12px; font-weight: 500; color: #8a94a6; margin-top: 4px; }
.toast.fade { animation: toastOut 0.3s ease-in forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(30px); }
}

/* ---- Balance pulse ---- */
.stat .value.pulse {
  animation: balancePulse 0.4s ease-out;
}
@keyframes balancePulse {
  0%   { color: #e6e8eb; transform: scale(1); }
  30%  { color: #4ade80; transform: scale(1.15); }
  100% { color: #e6e8eb; transform: scale(1); }
}

.stat .value.pulse-loss {
  animation: balancePulseLoss 0.4s ease-out;
}
@keyframes balancePulseLoss {
  0%   { color: #e6e8eb; transform: scale(1); }
  30%  { color: #f87171; transform: scale(1.15); }
  100% { color: #e6e8eb; transform: scale(1); }
}
/* ============================================================ */
/*  SCREEN TRANSITION                                            */
/* ============================================================ */

.screen-enter {
  animation: screenEnter 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes screenEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================ */
/*  PAIR CARD STAGGER                                            */
/* ============================================================ */

.pair-card-enter {
  animation: cardEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================================ */
/*  BALANCE COUNT-UP                                             */
/* ============================================================ */

.stat .value.counting {
  color: #4ade80;
  transition: color 0.3s;
}

.stat .value.counting-loss {
  color: #f87171;
  transition: color 0.3s;
}

/* ============================================================ */
/*  SELECTION SCREEN BACKGROUND                                  */
/* ============================================================ */

.selection-screen {
  background:
    radial-gradient(ellipse at top, rgba(74, 222, 128, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(74, 222, 128, 0.03) 0%, transparent 50%),
    #0d1017;
}

/* ============================================================ */
/*  GREETING                                                     */
/* ============================================================ */

.greeting {
  text-align: center;
  margin-bottom: 32px;
}

.greeting h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 10px;
  color: var(--text);
}

.greeting h1 #greeting-username {
  color: var(--green);
}

.greeting-sub {
  font-size: 15px;
  color: #8a94a6;
}

/* ============================================================ */
/*  STATS BAR                                                    */
/* ============================================================ */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 560px;
  margin: 0 auto 40px;
  width: 100%;
}

.stat-box {
  background: #14181f;
  border: 1px solid #1f242c;
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
}

.stat-box:hover {
  border-color: #2a3140;
  transform: translateY(-2px);
}

.stat-box-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.stat-box-label {
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================================ */
/*  TOP 3 LEADERBOARD                                            */
/* ============================================================ */

.top3-section {
  max-width: 560px;
  margin: 40px auto 0;
  width: 100%;
  background: #14181f;
  border: 1px solid #1f242c;
  border-radius: 12px;
  overflow: hidden;
}

.top3-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #1f242c;
  background: rgba(31, 36, 44, 0.5);
}

.top3-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.top3-see-all {
  font-size: 12px;
  color: #4ade80;
  font-weight: 600;
  text-decoration: none;
}
.top3-see-all:hover { opacity: 0.8; }

.top3-list {
  padding: 8px 0;
}

.top3-loading {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}

.top3-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  transition: background 0.15s;
}

.top3-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.top3-rank {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: #6b7280;
  width: 28px;
  flex-shrink: 0;
}
.top3-row.rank-1 .top3-rank { color: #4ade80; }
.top3-row.rank-2 .top3-rank { color: #cbd5e1; }
.top3-row.rank-3 .top3-rank { color: #fb923c; }

.top3-username {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top3-balance {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
}

.top3-empty {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}

/* TBA state (leaderboard disabled) */
.top3-tba {
  padding: 32px 24px;
  text-align: center;
}

.top3-tba-icon {
  font-size: 32px;
  margin-bottom: 10px;
  opacity: 0.7;
}

.top3-tba-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.top3-tba-sub {
  font-size: 12px;
  color: #6b7280;
}

/* When TBA, hide "See all" link */
.top3-section.tba .top3-see-all { display: none; }

/* ============================================================ */
/*  RESPONSIVE                                                   */
/* ============================================================ */

@media (max-width: 600px) {
  .greeting h1 { font-size: 24px; }
  .greeting-sub { font-size: 14px; }

  .stats-bar {
    gap: 8px;
    margin-bottom: 32px;
  }
  .stat-box { padding: 12px 8px; }
  .stat-box-value { font-size: 17px; }
  .stat-box-label { font-size: 9px; letter-spacing: 0.5px; }

  .top3-section { margin-top: 32px; }
  .top3-header { padding: 12px 14px; }
  .top3-row { padding: 10px 14px; gap: 10px; }
  .top3-username { font-size: 13px; }
  .top3-balance { font-size: 13px; }
}