#hud-bar {
  position: absolute;
  background: rgba(10, 10, 30, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 8px 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  pointer-events: none;
}

.hud-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-row.top-row {
  /* Row 1: Score, Level+XP, Moves */
}

.hud-row.bottom-row {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.score-cell {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
}

.cell-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: rgba(255,215,0,0.6);
  text-transform: uppercase;
  line-height: 1;
}

#score-val {
  font-family: 'Orbitron', monospace;
  font-size: 19px;
  font-weight: 900;
  color: #FFD700;
  text-shadow: 0 0 20px rgba(255,215,0,0.3);
  line-height: 1.1;
  white-space: nowrap;
  transition: color 0.3s;
}
#score-val.penalty-flash { color: #ff6b6b; }

.level-cell {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.level-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.level-cell .cell-label {
  color: rgba(0,229,255,0.6);
}

#level-val {
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 900;
  color: #00E5FF;
  text-shadow: 0 0 16px rgba(0,229,255,0.3);
  line-height: 1.1;
  white-space: nowrap;
}

.level-xp-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 80px;
}

#hud-xp-track {
  width: 80px;
  height: 6px;
  background: rgba(0,0,0,0.4);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

#hud-xp-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00E5FF, #00dc82);
  border-radius: 2px;
  transition: width 0.4s;
  box-shadow: 0 0 4px rgba(0,229,255,0.3);
}

#hud-xp-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 8px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  letter-spacing: 0.5px;
  line-height: 1;
}

.lb-cell {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255,215,0,0.05);
  border: 1px solid rgba(255,215,0,0.1);
  border-radius: 10px;
  cursor: pointer;
  pointer-events: all;
  transition: all 0.25s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  color: inherit;
  font: inherit;
  outline: none;
}
.lb-cell:hover {
  background: rgba(255,215,0,0.1);
  border-color: rgba(255,215,0,0.25);
}
.lb-cell:active {
  transform: scale(0.95);
}

.lb-trophy { width: 17px; height: 17px; color: #FFD700; opacity: 0.75; flex-shrink: 0; }

#lb-rank {
  font-family: 'Orbitron', monospace;
  font-size: 13px; font-weight: 700;
  color: #FFD700; opacity: 0.8; white-space: nowrap;
}

.moves-cell {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.4s;
}

.moves-cell .cell-label { transition: color 0.4s; }

.moves-cell.warn {
  background: rgba(255,40,40,0.08);
  border-color: rgba(255,60,60,0.3);
  animation: warnPulse 0.5s infinite alternate;
}
.moves-cell.warn .cell-label { color: rgba(255,100,100,0.9); }

#moves-pips { display: flex; gap: 4px; }

.move-pip {
  width: 9px; height: 19px;
  border-radius: 4px;
  border: 1.5px solid rgba(255,215,0,0.3);
  background: transparent;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.move-pip.active {
  background: linear-gradient(180deg, #FFD700 0%, #FFA500 100%);
  border-color: #FFD700;
  box-shadow: 0 0 10px rgba(255,215,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}
.moves-cell.warn .move-pip.active {
  background: linear-gradient(180deg, #ff6b6b 0%, #e53935 100%);
  border-color: #ff6b6b;
  box-shadow: 0 0 10px rgba(255,80,80,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}
.move-pip.spent { border-color: rgba(255,255,255,0.06); }
.move-pip.gain-anim { animation: pipGain 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }

