/* ── Topbar ─────────────────────────────────────────────────────────────────── */
#topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 52px;
}

#tb-logo {
  height: 48px;
  width: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

#tb-level {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

#tb-lvl {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
#tb-lvl b { color: var(--accent); font-size: 16px; }

#xp-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  max-width: 260px;
  min-width: 80px;
}

#xp-bar {
  height: 8px;
  background: #0f0f2a;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

#xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 4px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(124,58,237,0.7);
}

#xp-label {
  font-size: 10px;
  color: var(--muted);
}

#tb-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Combo */
#combo-widget {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.3s;
}
#combo-widget:empty { display: none; }

#combo-widget .c-fire { font-size: 18px; }
#combo-widget .c-mult { font-size: 19px; line-height: 1; }
#combo-widget .c-word { font-size: 9px; letter-spacing: 1.5px; opacity: 0.65; align-self: flex-end; padding-bottom: 1px; }

.combo-pulse { animation: cpulse 0.9s ease-in-out infinite; }
@keyframes cpulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); }
}

/* Boost */
#boost-widget {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: #1f1500;
  border: 1px solid var(--gold);
  color: var(--gold);
}
#boost-widget:empty { display: none; }

/* Accuracy */
#tb-accuracy {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  background: #0c1e35;
  border: 1px solid #1e3a5f;
  color: #7cc0ff;
  white-space: nowrap;
  flex-shrink: 0;
}
#tb-accuracy:empty { display: none; }
#tb-accuracy .acc-icon { font-size: 13px; }

/* Coins */
#tb-coins {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 17px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}
.coin-icon { font-size: 16px; }
