/* =====================================================
   AQUAPONY KART – CSS
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;800&display=swap');

:root {
  --aqua:    #00d4ff;
  --deep:    #0047a0;
  --coral:   #ff6b8a;
  --gold:    #ffd700;
  --pink:    #ff78c4;
  --teal:    #00e5c8;
  --dark:    #001a3a;
  --bubble:  rgba(180,240,255,0.18);
  --hud-bg:  rgba(0,20,60,0.72);
  --radius:  16px;
  --shadow:  0 4px 24px rgba(0,0,0,0.45);
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  background: #001020;
  font-family: 'Nunito', sans-serif;
  overflow: hidden;
  user-select: none;
}

/* ─── CANVAS ─── */
#game-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
}

/* ─── LOADING ─── */
#loading-screen {
  position: fixed; inset:0; z-index:9999;
  background: radial-gradient(ellipse at 50% 30%, #003878 0%, #000e24 100%);
  display:flex; align-items:center; justify-content:center;
}
.loading-logo { text-align:center; }
.logo-text {
  font-family:'Fredoka One',cursive;
  font-size:64px; line-height:1;
  color:#fff;
  text-shadow: 0 0 40px var(--aqua), 3px 3px 0 var(--deep);
  letter-spacing:2px;
}
.logo-text span { color:var(--gold); font-size:52px; }
.bubbles-loader {
  display:flex; gap:12px; justify-content:center; margin:28px 0 16px;
}
.b {
  width:18px; height:18px; border-radius:50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, var(--aqua) 60%, var(--deep) 100%);
  animation: bob 0.9s ease-in-out infinite;
  box-shadow: 0 0 10px var(--aqua);
}
.b:nth-child(2){animation-delay:.2s;}
.b:nth-child(3){animation-delay:.4s;}
@keyframes bob { 0%,100%{transform:translateY(0);opacity:.7} 50%{transform:translateY(-14px);opacity:1;} }
.loading-tip { color:var(--aqua); font-size:18px; opacity:.8; }

/* ─── START SCREEN ─── */
#start-screen {
  position:fixed; inset:0; z-index:9998;
  background: radial-gradient(ellipse at 50% 20%, #0062c4 0%, #001230 100%);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:24px;
}
.start-logo .logo-text { font-size:72px; text-align:center; }
.start-subtitle {
  font-family:'Fredoka One',cursive;
  font-size:26px; color:var(--teal);
  letter-spacing:3px; text-transform:uppercase;
}
.start-players { display:flex; gap:24px; }
.player-card {
  width:160px; padding:20px 16px; border-radius:var(--radius);
  background: var(--bubble); border:2px solid rgba(0,212,255,.25);
  text-align:center; cursor:pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.player-card:hover, .player-card.selected {
  border-color: var(--aqua);
  box-shadow: 0 0 20px rgba(0,212,255,.5);
  transform: translateY(-4px);
}
.player-icon { font-size:40px; margin-bottom:8px; }
.player-name { font-family:'Fredoka One',cursive; font-size:22px; color:#fff; }
.player-desc { font-size:13px; color:var(--aqua); opacity:.8; margin-top:4px; }
.leo-icon { filter: drop-shadow(0 0 8px #00d4ff); }
.mia-icon { filter: drop-shadow(0 0 8px #ff78c4); }

.btn-start {
  padding:18px 48px; border:none; border-radius:50px; cursor:pointer;
  font-family:'Fredoka One',cursive; font-size:24px; color:var(--dark);
  background: linear-gradient(135deg, var(--gold) 0%, #ffb800 100%);
  box-shadow: 0 6px 0 #b07800, 0 8px 20px rgba(255,215,0,.4);
  transition: transform .1s, box-shadow .1s;
}
.btn-start:hover { transform:translateY(-2px); box-shadow:0 8px 0 #b07800, 0 12px 28px rgba(255,215,0,.5); }
.btn-start:active { transform:translateY(3px); box-shadow:0 3px 0 #b07800; }

.controls-hint {
  display:flex; gap:20px; color:rgba(255,255,255,.55);
  font-size:14px; font-weight:600;
}

/* ─── COUNTDOWN ─── */
#countdown {
  position:fixed; inset:0; z-index:9997;
  display:flex; align-items:center; justify-content:center;
  pointer-events:none;
}
#countdown-text {
  font-family:'Fredoka One',cursive;
  font-size:160px; color:#fff;
  text-shadow: 0 0 60px var(--aqua), 4px 4px 0 var(--deep);
  animation: pulse-count .9s ease-out;
}
@keyframes pulse-count {
  0%{transform:scale(1.8);opacity:0}
  30%{transform:scale(1);opacity:1}
  80%{opacity:1}
  100%{opacity:0;transform:scale(.6)}
}

/* ─── HUD ─── */
#hud { position:fixed; inset:0; z-index:9996; pointer-events:none; }

/* TOP LEFT */
.hud-top-left {
  position:absolute; top:16px; left:16px;
  background:var(--hud-bg); border-radius:var(--radius);
  border:1.5px solid rgba(0,212,255,.3);
  padding:10px 20px; display:flex; flex-direction:column; align-items:center;
  backdrop-filter:blur(8px);
}
.hud-position {
  font-family:'Fredoka One',cursive; font-size:48px; line-height:1; color:var(--gold);
  text-shadow:2px 2px 0 #8a6000;
}
.hud-player-name { font-size:13px; color:var(--aqua); font-weight:800; letter-spacing:2px; }

/* TOP CENTER */
.hud-top-center {
  position:absolute; top:16px; left:50%; transform:translateX(-50%);
  background:var(--hud-bg); border-radius:var(--radius);
  border:1.5px solid rgba(0,212,255,.3);
  padding:10px 28px; backdrop-filter:blur(8px);
}
.hud-timer {
  font-family:'Fredoka One',cursive; font-size:34px; color:#fff; letter-spacing:2px;
}

/* TOP RIGHT */
.hud-top-right {
  position:absolute; top:16px; right:16px;
  display:flex; flex-direction:column; align-items:flex-end; gap:8px;
}
.hud-lap {
  background:var(--hud-bg); border-radius:var(--radius);
  border:1.5px solid rgba(0,212,255,.3);
  padding:8px 18px; backdrop-filter:blur(8px);
  font-family:'Fredoka One',cursive; font-size:22px; color:#fff;
}
.item-box {
  width:60px; height:60px; border-radius:12px;
  background:var(--hud-bg); border:2px solid rgba(0,212,255,.3);
  display:flex; align-items:center; justify-content:center;
  font-family:'Fredoka One',cursive; font-size:28px; color:var(--gold);
  transition: all .2s;
}
.item-box.has-item { border-color:var(--gold); box-shadow:0 0 12px var(--gold); }

/* BOTTOM RIGHT */
.hud-bottom-right {
  position:absolute; bottom:20px; right:16px;
  display:flex; flex-direction:column; align-items:center; gap:10px;
}
.speedometer {
  background:var(--hud-bg); border-radius:var(--radius);
  border:1.5px solid rgba(0,212,255,.25);
  padding:8px 12px; text-align:center; backdrop-filter:blur(8px);
}
.speed-value {
  font-family:'Fredoka One',cursive; font-size:28px; color:#fff; line-height:1;
}
.speed-value small { font-size:13px; color:var(--aqua); }
.minimap-wrap {
  background:var(--hud-bg); border-radius:var(--radius);
  border:1.5px solid rgba(0,212,255,.25);
  padding:6px 8px; text-align:center; backdrop-filter:blur(8px);
}
.minimap-label {
  font-size:11px; color:var(--aqua); font-weight:800;
  letter-spacing:1.5px; text-transform:uppercase; margin-top:2px;
}

/* ─── RACE FINISH ─── */
#race-finish {
  position:fixed; inset:0; z-index:9999;
  background:rgba(0,10,30,.7); backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center;
}
.finish-box {
  background:linear-gradient(135deg,#003580,#001840);
  border:2px solid var(--aqua);
  border-radius:24px; padding:48px 60px; text-align:center;
  box-shadow:0 0 60px rgba(0,212,255,.3);
  display:flex; flex-direction:column; align-items:center; gap:16px;
}
.finish-trophy { font-size:64px; }
.finish-title { font-family:'Fredoka One',cursive; font-size:52px; color:var(--gold); text-shadow:2px 2px 0 #8a6000; }
.finish-time, .finish-pos { font-size:22px; color:#fff; font-weight:600; }
.finish-time span, .finish-pos span { color:var(--teal); font-family:'Fredoka One',cursive; }

/* ─── SETUP GRID ─── */
.setup-grid {
  display: flex;
  gap: 0;
  align-items: flex-start;
  width: 100%;
  max-width: 820px;
}
.setup-section { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.setup-label {
  font-family: 'Fredoka One', cursive;
  font-size: 18px; color: var(--aqua);
  letter-spacing: 2px; text-transform: uppercase;
  opacity: .85;
}
.setup-divider {
  width: 1.5px;
  background: linear-gradient(to bottom, transparent, rgba(0,212,255,.35), transparent);
  align-self: stretch;
  margin: 0 24px;
  flex-shrink: 0;
}

/* ─── AI ROSTER ─── */
.ai-roster {
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; max-width: 320px;
}
.ai-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bubble);
  border: 2px solid rgba(0,212,255,.2);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, opacity .2s, transform .15s;
  user-select: none;
}
.ai-card:hover { transform: translateX(3px); }
.ai-card.active {
  border-color: var(--teal);
  box-shadow: 0 0 14px rgba(0,229,200,.3);
}
.ai-card.inactive {
  opacity: .45;
  border-color: rgba(255,255,255,.1);
  box-shadow: none;
}
.ai-card-left { flex-shrink: 0; }
.ai-card-info { flex: 1; }
.ai-card-name  { font-family: 'Fredoka One', cursive; font-size: 18px; color: #fff; }
.ai-card-desc  { font-size: 12px; color: var(--aqua); opacity: .75; margin-bottom: 4px; }
.ai-difficulty { display: flex; align-items: center; gap: 4px; }
.diff-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.2);
}
.diff-dot.active { background: var(--gold); }
.diff-label { font-size: 11px; color: rgba(255,255,255,.5); margin-left: 4px; }

/* Toggle switch */
.ai-toggle { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.toggle-track {
  width: 40px; height: 22px; border-radius: 11px;
  background: rgba(255,255,255,.15);
  position: relative; transition: background .2s;
}
.ai-card.active .toggle-track { background: var(--teal); }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.ai-card.active .toggle-thumb { transform: translateX(18px); }
.toggle-state {
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
  color: var(--teal);
}
.ai-card.inactive .toggle-state { color: rgba(255,255,255,.3); }

.ai-count-info {
  font-size: 13px; color: rgba(255,255,255,.5);
  font-weight: 600; letter-spacing: 1px;
}


.bubble-particle {
  position:fixed; border-radius:50%; pointer-events:none; z-index:10;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.8), rgba(0,212,255,.4));
  animation: rise linear forwards;
}
@keyframes rise {
  0%   { transform:translateY(0) scale(1); opacity:.7; }
  100% { transform:translateY(-120px) scale(1.3); opacity:0; }
}

/* ════════════════════════════════════════════════════
   MULTIJOUEUR – STYLES
   ════════════════════════════════════════════════════ */

/* ─── MENU PRINCIPAL ─── */
#main-menu {
  position:fixed; inset:0; z-index:9998;
  background: radial-gradient(ellipse at 50% 20%, #0062c4 0%, #001230 100%);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:32px;
}
.menu-buttons { display:flex; flex-direction:column; gap:16px; align-items:center; }
.btn-menu-big {
  width:280px; padding:20px 0; border:none; border-radius:20px; cursor:pointer;
  font-family:'Fredoka One',cursive; font-size:26px; color:var(--dark);
  background: linear-gradient(135deg, var(--gold) 0%, #ffb800 100%);
  box-shadow: 0 6px 0 #b07800, 0 8px 20px rgba(255,215,0,.35);
  transition: transform .1s, box-shadow .1s;
}
.btn-menu-big:hover  { transform:translateY(-3px); box-shadow:0 9px 0 #b07800, 0 14px 28px rgba(255,215,0,.4); }
.btn-menu-big:active { transform:translateY(3px);  box-shadow:0 3px 0 #b07800; }
.btn-menu-big.btn-multi {
  background: linear-gradient(135deg, var(--teal) 0%, #009e8e 100%);
  box-shadow: 0 6px 0 #006d63, 0 8px 20px rgba(0,229,200,.3);
  color: #fff;
}
.btn-menu-big.btn-multi:hover { box-shadow:0 9px 0 #006d63, 0 14px 28px rgba(0,229,200,.4); }

/* ─── BOUTONS GÉNÉRIQUES ─── */
.btn-back {
  padding:10px 24px; border:none; border-radius:50px; cursor:pointer;
  font-family:'Fredoka One',cursive; font-size:17px; color:rgba(255,255,255,.7);
  background: rgba(255,255,255,.1); border:1.5px solid rgba(255,255,255,.2);
  transition: all .15s;
}
.btn-back:hover { background:rgba(255,255,255,.18); color:#fff; }
.screen-actions { display:flex; gap:16px; align-items:center; margin-top:4px; }

/* ─── ÉCRAN MULTI ─── */
#multi-screen {
  position:fixed; inset:0; z-index:9998;
  background: radial-gradient(ellipse at 50% 20%, #0062c4 0%, #001230 100%);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:20px; padding:20px;
}
.multi-setup-row {
  display:flex; gap:0; align-items:flex-start;
  width:100%; max-width:680px;
}
.pseudo-input {
  width:100%; padding:14px 20px; border-radius:14px;
  background: rgba(255,255,255,.08); border:2px solid rgba(0,212,255,.3);
  color:#fff; font-family:'Fredoka One',cursive; font-size:22px;
  text-align:center; outline:none; letter-spacing:1px;
  transition: border-color .2s, box-shadow .2s;
}
.pseudo-input::placeholder { color:rgba(255,255,255,.3); }
.pseudo-input:focus {
  border-color:var(--aqua);
  box-shadow:0 0 16px rgba(0,212,255,.3);
}
.multi-join-row {
  display:flex; align-items:center; gap:16px;
  width:100%; max-width:680px; flex-wrap:wrap; justify-content:center;
}
.join-or { color:rgba(255,255,255,.4); font-size:18px; font-weight:800; }
.join-group { display:flex; gap:8px; align-items:center; }
.code-input {
  padding:12px 16px; border-radius:12px; width:160px;
  background:rgba(255,255,255,.08); border:2px solid rgba(0,212,255,.3);
  color:#fff; font-family:'Fredoka One',cursive; font-size:22px;
  text-align:center; letter-spacing:4px; outline:none; text-transform:uppercase;
}
.code-input:focus { border-color:var(--aqua); box-shadow:0 0 14px rgba(0,212,255,.25); }
.btn-create {
  padding:14px 28px; border:none; border-radius:14px; cursor:pointer;
  font-family:'Fredoka One',cursive; font-size:20px; color:var(--dark);
  background: linear-gradient(135deg, var(--gold), #ffb800);
  box-shadow:0 5px 0 #b07800; transition: transform .1s, box-shadow .1s;
}
.btn-create:hover { transform:translateY(-2px); }
.btn-create:active { transform:translateY(3px); box-shadow:0 2px 0 #b07800; }
.btn-join {
  padding:14px 24px; border:none; border-radius:14px; cursor:pointer;
  font-family:'Fredoka One',cursive; font-size:20px; color:#fff;
  background: linear-gradient(135deg, var(--teal), #009e8e);
  box-shadow:0 5px 0 #006d63; transition: transform .1s, box-shadow .1s;
}
.btn-join:hover { transform:translateY(-2px); }
.btn-join:active { transform:translateY(3px); box-shadow:0 2px 0 #006d63; }

.network-error {
  background:rgba(255,80,80,.15); border:1.5px solid rgba(255,80,80,.5);
  border-radius:12px; padding:10px 20px; color:#ff8080;
  font-size:15px; font-weight:700; text-align:center; max-width:500px;
}

/* ─── LOBBY ─── */
#lobby-screen {
  width:100%; max-width:720px;
  display:flex; flex-direction:column; gap:14px;
}
.lobby-header {
  display:flex; align-items:center; justify-content:space-between;
  background:var(--hud-bg); border-radius:var(--radius);
  border:1.5px solid rgba(0,212,255,.3);
  padding:14px 24px; backdrop-filter:blur(8px);
}
.lobby-code-label { font-size:12px; color:var(--aqua); opacity:.7; letter-spacing:2px; text-transform:uppercase; }
.lobby-code {
  font-family:'Fredoka One',cursive; font-size:38px; color:var(--gold);
  letter-spacing:8px; text-shadow:1px 1px 0 #8a6000;
}
.btn-copy {
  padding:6px 14px; border:none; border-radius:10px; cursor:pointer;
  font-size:14px; font-weight:800; color:var(--dark);
  background:var(--aqua); transition:opacity .15s;
}
.btn-copy:hover { opacity:.85; }
.lobby-status { font-family:'Fredoka One',cursive; font-size:18px; color:var(--teal); }

.lobby-players {
  display:flex; flex-wrap:wrap; gap:10px;
  background:var(--hud-bg); border-radius:var(--radius);
  border:1.5px solid rgba(0,212,255,.2);
  padding:14px; min-height:80px; backdrop-filter:blur(6px);
}
.lobby-player-chip {
  display:flex; align-items:center; gap:8px;
  background:rgba(0,212,255,.1); border:1.5px solid rgba(0,212,255,.25);
  border-radius:50px; padding:6px 16px 6px 10px;
  transition: border-color .2s;
}
.lobby-player-chip.ready { border-color:var(--teal); background:rgba(0,229,200,.12); }
.lobby-player-chip.me    { border-color:var(--gold); }
.chip-icon { font-size:22px; }
.chip-pseudo { font-family:'Fredoka One',cursive; font-size:16px; color:#fff; }
.chip-ready  { font-size:13px; color:var(--teal); font-weight:800; }
.chip-host   { font-size:11px; color:var(--gold); }

/* Chat lobby */
.lobby-chat {
  background:var(--hud-bg); border-radius:var(--radius);
  border:1.5px solid rgba(0,212,255,.2);
  overflow:hidden; backdrop-filter:blur(6px);
}
.chat-messages {
  height:110px; overflow-y:auto; padding:10px 14px;
  display:flex; flex-direction:column; gap:4px;
  scrollbar-width:thin; scrollbar-color:rgba(0,212,255,.3) transparent;
}
.chat-msg { font-size:14px; color:rgba(255,255,255,.8); line-height:1.4; }
.chat-msg .chat-pseudo { font-weight:800; color:var(--aqua); }
.chat-msg.system { color:rgba(255,255,255,.4); font-style:italic; font-size:13px; }
.chat-input-row { display:flex; border-top:1px solid rgba(0,212,255,.15); }
.chat-input {
  flex:1; padding:10px 14px; background:transparent; border:none; outline:none;
  color:#fff; font-family:'Nunito',sans-serif; font-size:15px;
}
.chat-input::placeholder { color:rgba(255,255,255,.3); }
.btn-chat-send {
  padding:0 16px; background:rgba(0,212,255,.15); border:none; cursor:pointer;
  color:var(--aqua); font-size:18px; transition:background .15s;
}
.btn-chat-send:hover { background:rgba(0,212,255,.25); }

.lobby-actions { display:flex; justify-content:space-between; align-items:center; }
.btn-ready {
  padding:14px 36px; border:none; border-radius:50px; cursor:pointer;
  font-family:'Fredoka One',cursive; font-size:22px; color:var(--dark);
  background: linear-gradient(135deg, var(--teal), #009e8e);
  box-shadow:0 5px 0 #006d63; transition:transform .1s, box-shadow .1s;
}
.btn-ready:hover { transform:translateY(-2px); }
.btn-ready.is-ready {
  background: linear-gradient(135deg, #ff6b8a, #cc3355);
  box-shadow:0 5px 0 #881133;
  color:#fff;
}

/* ─── HUD MULTI ─── */
.ingame-chat {
  position:absolute; bottom:140px; left:16px;
  width:260px; display:flex; flex-direction:column; gap:3px; pointer-events:none;
}
.ingame-msg {
  background:rgba(0,10,40,.65); border-radius:10px;
  padding:5px 10px; font-size:13px; color:rgba(255,255,255,.85);
  animation: fadeMsg 6s forwards;
  backdrop-filter:blur(4px);
}
.ingame-msg .chat-pseudo { color:var(--aqua); font-weight:800; }
.ingame-msg.system { color:rgba(255,255,255,.5); font-style:italic; }
@keyframes fadeMsg {
  0%{opacity:1} 70%{opacity:1} 100%{opacity:0}
}

/* Nom joueur distant flottant */
.player-label-3d {
  position:absolute; pointer-events:none;
  font-family:'Fredoka One',cursive; font-size:14px;
  color:#fff; text-shadow:0 1px 6px rgba(0,0,0,.9);
  transform:translateX(-50%);
  white-space:nowrap;
  background:rgba(0,20,60,.6); border-radius:8px; padding:2px 8px;
}

/* ─── CLASSEMENT FINISH ─── */
.finish-results { display:flex; flex-direction:column; gap:6px; width:100%; max-width:340px; }
.result-row {
  display:flex; align-items:center; gap:12px;
  background:rgba(255,255,255,.06); border-radius:12px; padding:8px 16px;
}
.result-pos  { font-family:'Fredoka One',cursive; font-size:22px; color:var(--gold); width:36px; }
.result-name { font-family:'Fredoka One',cursive; font-size:18px; color:#fff; flex:1; }
.result-time { font-size:14px; color:var(--aqua); font-weight:700; }
.finish-actions { display:flex; gap:12px; justify-content:center; }

/* ─── GRILLE 7 PERSONNAGES ─── */
.char-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 130px);
  gap: 10px;
  justify-content: center;
  max-width: 600px;
}
.char-grid .player-card {
  width: auto;
  padding: 12px 8px;
}
.char-grid .player-name {
  font-size: 13px;
  letter-spacing: 0.5px;
}
.char-grid .player-desc {
  font-size: 11px;
}

/* Hippocampe rouge Mickaël */
[data-id="mickael"] .player-icon,
[data-ai="mickael"] { filter: drop-shadow(0 0 8px #ff2020); }

/* ════════════════════════════════════════════════════
   SYSTÈME D'OBJETS
   ════════════════════════════════════════════════════ */

/* Item box états */
.item-box.has-item {
  border-color: var(--gold) !important;
  box-shadow: 0 0 18px rgba(255,215,0,.7) !important;
  animation: item-pulse 0.8s ease-in-out infinite;
  font-size: 32px !important;
  cursor: pointer;
}
@keyframes item-pulse {
  0%,100% { transform: scale(1);    box-shadow: 0 0 18px rgba(255,215,0,.5); }
  50%      { transform: scale(1.12); box-shadow: 0 0 30px rgba(255,215,0,.9); }
}

.item-box.boosting {
  border-color: var(--teal) !important;
  box-shadow: 0 0 20px rgba(0,229,200,.8) !important;
  background: rgba(0,229,200,.15) !important;
}

.item-box.empty {
  opacity: 0.4;
  font-size: 22px;
}

/* Contenu boost actif */
.boost-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  font-size: 26px;
}
.boost-bar {
  height: 5px;
  background: linear-gradient(90deg, var(--teal), var(--aqua));
  border-radius: 3px;
  transition: width 0.1s linear;
  box-shadow: 0 0 6px var(--teal);
  min-width: 2px;
}

/* Texte BOOST en jeu (flash au-dessus du perso) */
.boost-flash {
  position: fixed;
  left: 50%;
  top: 35%;
  transform: translateX(-50%);
  font-family: 'Fredoka One', cursive;
  font-size: 72px;
  color: var(--gold);
  text-shadow: 0 0 40px var(--gold), 3px 3px 0 #8a6000;
  pointer-events: none;
  z-index: 9995;
  animation: boost-flash-anim 0.8s ease-out forwards;
}
@keyframes boost-flash-anim {
  0%   { opacity: 0; transform: translateX(-50%) scale(0.5); }
  30%  { opacity: 1; transform: translateX(-50%) scale(1.2); }
  70%  { opacity: 1; transform: translateX(-50%) scale(1);   }
  100% { opacity: 0; transform: translateX(-50%) scale(0.8) translateY(-30px); }
}

/* Rappel touche sous l'item box */
.item-hint {
  font-size: 10px;
  color: rgba(255,255,255,.4);
  text-align: center;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ─── POUVOIR LILIA – VOL D'OBJET ─── */

/* Icône ✨ dans le HUD avec couleur lavande */
.item-box.steal-item {
  border-color: #b0a0ff !important;
  box-shadow: 0 0 20px rgba(176,160,255,.8) !important;
  animation: steal-pulse 1s ease-in-out infinite;
}
@keyframes steal-pulse {
  0%,100% { transform: scale(1);    box-shadow: 0 0 16px rgba(176,160,255,.5); }
  50%      { transform: scale(1.1); box-shadow: 0 0 32px rgba(176,160,255,1);  }
}

/* Flash "VOL RÉUSSI !" */
.steal-flash {
  color: #c8a0ff !important;
  text-shadow: 0 0 40px #9966ff, 3px 3px 0 #440088 !important;
}

/* Notification "Lilia t'a volé ton objet !" */
.stolen-warning {
  position: fixed;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(100, 0, 160, 0.85);
  border: 2px solid #c8a0ff;
  border-radius: 16px;
  padding: 12px 28px;
  font-family: 'Fredoka One', cursive;
  font-size: 22px;
  color: #fff;
  text-shadow: 0 0 12px #c8a0ff;
  pointer-events: none;
  z-index: 9995;
  white-space: nowrap;
  animation: stolen-anim 2.5s ease-out forwards;
}
@keyframes stolen-anim {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  15%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* ─── POUVOIR ALEXANDRE – SLOW ─── */
.item-box.slow-item {
  border-color: #00e5c8 !important;
  box-shadow: 0 0 20px rgba(0,229,200,.8) !important;
  animation: slow-pulse 1.2s ease-in-out infinite;
}
@keyframes slow-pulse {
  0%,100% { transform: scale(1);    box-shadow: 0 0 14px rgba(0,229,200,.5); }
  50%      { transform: scale(1.1); box-shadow: 0 0 28px rgba(0,229,200,1); }
}

.slow-flash {
  color: #00e5c8 !important;
  text-shadow: 0 0 40px #00aa88, 3px 3px 0 #004433 !important;
}

.slow-warning {
  background: rgba(0, 80, 60, 0.88) !important;
  border-color: #00e5c8 !important;
  text-shadow: 0 0 10px #00e5c8 !important;
}

/* ─── ABIRAM – ÉPICES ─── */
.item-box.spice-item {
  border-color: #f5c400 !important;
  box-shadow: 0 0 20px rgba(245,196,0,.85) !important;
  animation: spice-pulse 0.9s ease-in-out infinite;
}
@keyframes spice-pulse {
  0%,100% { transform: scale(1);    box-shadow: 0 0 14px rgba(245,196,0,.5); }
  50%      { transform: scale(1.12); box-shadow: 0 0 30px rgba(245,196,0,1); }
}

/* ─── PIMENTS ABIRAM ─── */
.spice-drop-flash {
  color: #ff6600 !important;
  text-shadow: 0 0 40px #ff3300, 3px 3px 0 #660000 !important;
  font-size: 48px !important;
}

.spice-warning {
  background: rgba(150, 40, 0, 0.88) !important;
  border-color: #ff6600 !important;
  text-shadow: 0 0 10px #ff6600 !important;
}

/* ─── ANTHONY – SWAP ─── */
.item-box.swap-item {
  border-color: #8888ff !important;
  box-shadow: 0 0 20px rgba(100,100,255,.85) !important;
  animation: swap-pulse 0.7s ease-in-out infinite;
}
@keyframes swap-pulse {
  0%,100% { transform: scale(1) rotate(0deg);   box-shadow: 0 0 14px rgba(100,100,255,.5); }
  50%      { transform: scale(1.1) rotate(10deg); box-shadow: 0 0 28px rgba(150,150,255,1); }
}

.swap-flash {
  color: #aaaaff !important;
  text-shadow: 0 0 40px #4444ff, 3px 3px 0 #000066 !important;
}

.swap-warning {
  background: rgba(20, 20, 100, 0.88) !important;
  border-color: #8888ff !important;
  text-shadow: 0 0 10px #8888ff !important;
}

/* ─── CHRISTOPHE – THUNDER ─── */
.item-box.thunder-item {
  border-color: #33ff33 !important;
  box-shadow: 0 0 20px rgba(50,255,50,.85) !important;
  animation: thunder-pulse 0.5s ease-in-out infinite;
}
@keyframes thunder-pulse {
  0%,100% { transform: scale(1);    box-shadow: 0 0 14px rgba(50,255,50,.5); }
  50%      { transform: scale(1.15); box-shadow: 0 0 35px rgba(50,255,50,1); }
}

.thunder-flash {
  color: #99ff99 !important;
  text-shadow: 0 0 40px #00ff00, 3px 3px 0 #005500 !important;
}

.thunder-warning {
  background: rgba(10, 60, 10, 0.88) !important;
  border-color: #33ff33 !important;
  text-shadow: 0 0 10px #33ff33 !important;
}

@keyframes thunder-screen {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}