/* ============================================================
   STYLE — CaseOpener (vraies images CS:GO)
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0d1117;
  --bg-2: #161b22;
  --bg-3: #1f2630;
  --line: #2a3340;
  --text: #e6edf3;
  --muted: #8b98a8;
  --accent: #f0a500;
  --accent-2: #ffce4d;
  --green: #2ecc71;
  --red: #eb4b4b;
}

body {
  font-family: "Segoe UI", Roboto, system-ui, sans-serif;
  background: radial-gradient(circle at 50% -10%, var(--bg-glow, #1a2330) 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}
.app { max-width: 1150px; margin: 0 auto; padding: 0 16px 90px; }

/* flash plein écran lors d'un drop */
.flash {
  position: fixed; inset: 0; pointer-events: none; z-index: 80; opacity: 0;
  background: #fff;
}
.flash.go { animation: flashFx .6s ease; }
@keyframes flashFx { 0% { opacity: .35; } 100% { opacity: 0; } }

/* ---------- ENTÊTE ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 0; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); margin-bottom: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.logo-box { font-size: 28px; }
.logo-text .accent { color: var(--accent); }

.tabs { display: flex; gap: 6px; }
.tab {
  background: var(--bg-2); color: var(--muted); border: 1px solid var(--line);
  padding: 9px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; transition: .15s;
}
.tab:hover { color: var(--text); border-color: var(--accent); }
.tab.active { background: var(--accent); color: #1a1200; border-color: var(--accent); }
.badge { background: #00000033; padding: 1px 7px; border-radius: 10px; font-size: 12px; margin-left: 4px; }

.head-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* rang VIP */
.rank-chip {
  display: flex; flex-direction: column; gap: 3px; min-width: 120px;
  background: var(--bg-2); border: 1px solid var(--rk, var(--line));
  border-radius: 10px; padding: 6px 12px; box-shadow: 0 0 12px -4px var(--rk);
}
.rank-chip > div, .rank-chip > span { line-height: 1.1; }
.rank-label { font-size: 10px; color: var(--muted); letter-spacing: 2px; }
.rank-name { font-size: 14px; font-weight: 800; }
.rank-bar { height: 5px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.rank-fill { height: 100%; width: 0; background: var(--rk, var(--accent)); transition: width .4s; }

.wallet {
  display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px;
  background: var(--bg-2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 10px;
}
.wallet .coin { font-size: 20px; }
#balance { color: var(--accent-2); min-width: 56px; text-align: right; }
.icon-btn {
  position: relative; background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; font-size: 18px;
}
.icon-btn:hover { border-color: var(--accent); }
.dot {
  position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); border: 2px solid var(--bg); animation: pulse 1.2s infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: .6; } }

/* ---------- VUES ---------- */
.view { display: none; animation: fade .25s ease; }
.view.active { display: block; }
.hidden { display: none !important; }
@keyframes fade { from { opacity: 0; transform: translateY(8px);} to {opacity:1; transform:none;} }

/* ---------- STATS ---------- */
.stats-bar { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.stat {
  flex: 1; min-width: 160px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px;
}
.stat-k { color: var(--muted); font-size: 12px; }
.stat-v { font-weight: 800; font-size: 16px; }

/* ---------- GRILLE DE CAISSES ---------- */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.case-card {
  background: linear-gradient(160deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--line); border-radius: 14px; padding: 20px 18px 22px;
  text-align: center; cursor: pointer; transition: .18s; position: relative; overflow: hidden;
}
.case-card::before {
  content: ""; position: absolute; inset: 0; opacity: .14;
  background: radial-gradient(circle at 50% 0%, var(--c-theme), transparent 70%);
}
.case-card:hover { transform: translateY(-5px); border-color: var(--c-theme); box-shadow: 0 12px 30px #0008; }
.case-badge { font-size: 30px; position: relative; }
.case-preview { height: 110px; display: flex; align-items: center; justify-content: center; position: relative; }
.case-img { max-height: 110px; max-width: 90%; object-fit: contain; filter: drop-shadow(0 8px 14px #000a); }
.case-name { font-weight: 700; font-size: 17px; margin: 6px 0 12px; position: relative; }
.case-price {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 800;
  color: var(--accent-2); background: #0006; padding: 6px 14px; border-radius: 20px; position: relative;
}

/* ---------- ÉCRAN D'OUVERTURE ---------- */
.open-screen { animation: fade .25s ease; position: relative; overflow: hidden; }
.case-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.case-bg-img {
  position: absolute;
  object-fit: contain;
  filter: blur(1.5px) saturate(1.4);
  transition: opacity .4s ease;
}
.open-screen > *:not(.case-bg) { position: relative; z-index: 1; }
.back-btn {
  background: none; border: 1px solid var(--line); color: var(--muted);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600;
}
.back-btn:hover { color: var(--text); border-color: var(--text); }
.open-title { text-align: center; font-size: 26px; margin: 10px 0 18px; }

.roulette-wrap {
  position: relative; overflow: hidden; border: 1px solid var(--line);
  border-radius: 14px; background: var(--bg-2);
  background-image: linear-gradient(90deg, #000a, transparent 8%, transparent 92%, #000a);
  height: 180px; margin-bottom: 18px;
}
.marker {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; z-index: 5;
  background: var(--accent); transform: translateX(-50%); box-shadow: 0 0 14px 2px var(--accent);
}
.marker::before, .marker::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  border-left: 9px solid transparent; border-right: 9px solid transparent;
}
.marker::before { top: 0; border-top: 11px solid var(--accent); }
.marker::after { bottom: 0; border-bottom: 11px solid var(--accent); }

.roulette { display: flex; height: 100%; align-items: center; will-change: transform; }
.roll-item {
  flex: 0 0 150px; height: 150px; margin: 0 5px; border-radius: 10px;
  background: radial-gradient(circle at 50% 30%, var(--bg-3), #0d1117);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; border-bottom: 4px solid var(--ri-color); overflow: hidden;
}
.roll-item::before {
  content: ""; position: absolute; inset: 0; opacity: .22;
  background: radial-gradient(circle at 50% 120%, var(--ri-color), transparent 65%);
}
.roll-img { max-width: 86%; max-height: 90px; object-fit: contain; z-index: 1; filter: drop-shadow(0 4px 8px #000a); }
.roll-name { font-size: 11px; color: var(--muted); text-align: center; padding: 2px 6px 0; z-index: 1; }
.img-fallback { display: flex; align-items: center; justify-content: center; font-size: 42px; }

.open-controls { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.price-tag { font-weight: 700; color: var(--muted); }
.price-tag span { color: var(--accent-2); }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #1a1200; border: none; padding: 13px 34px; border-radius: 10px;
  font-weight: 800; font-size: 16px; cursor: pointer; letter-spacing: .5px; transition: .15s;
  box-shadow: 0 6px 18px #f0a50044;
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
.btn-ghost {
  background: var(--bg-3); color: var(--text); border: 1px solid var(--line);
  padding: 12px 22px; border-radius: 10px; font-weight: 700; cursor: pointer; transition: .15s;
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- ODDS ---------- */
.odds h4 { color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.odds-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 8px; }
.odds-item {
  display: flex; align-items: center; gap: 10px; background: var(--bg-2);
  border: 1px solid var(--line); border-left: 4px solid var(--o-color);
  border-radius: 8px; padding: 6px 12px; font-size: 13px;
}
.o-img { width: 56px; height: 40px; object-fit: contain; }
.odds-item .o-info { flex: 1; min-width: 0; }
.odds-item .o-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.odds-item .o-chance { color: var(--muted); font-size: 12px; }
.odds-item .o-val { color: var(--accent-2); font-weight: 700; font-size: 12px; }
.odds-owned { background: color-mix(in srgb, var(--o-color) 8%, var(--bg-2)); }
.o-owned-badge {
  background: var(--o-color); color: #000; font-weight: 800; font-size: 11px;
  padding: 2px 7px; border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}

/* ---------- INVENTAIRE ---------- */
.inv-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.inv-actions { display: flex; align-items: center; gap: 16px; color: var(--muted); }
.inv-actions strong { color: var(--accent-2); }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 14px; }
.skin-card {
  background: var(--bg-2); border: 1px solid var(--line); border-bottom: 4px solid var(--s-color);
  border-radius: 12px; padding: 14px 12px; text-align: center; position: relative; overflow: hidden;
}
.skin-card::before {
  content: ""; position: absolute; inset: 0; opacity: .12;
  background: radial-gradient(circle at 50% 120%, var(--s-color), transparent 70%);
  pointer-events: none;
}
.skin-img { width: 100%; height: 90px; object-fit: contain; position: relative; filter: drop-shadow(0 4px 8px #000a); }
.skin-name { font-weight: 700; font-size: 13px; margin: 6px 0 2px; position: relative; }
.skin-wear { font-size: 11px; color: var(--muted); position: relative; }
.skin-rarity { font-size: 11px; font-weight: 700; margin-top: 4px; position: relative; color: var(--s-color); }
.skin-val { color: var(--accent-2); font-weight: 800; margin: 8px 0; position: relative; }
.skin-sell {
  width: 100%; background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  padding: 7px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 12px; position: relative;
}
.skin-sell:hover { background: var(--red); border-color: var(--red); }
.empty-msg { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---------- UPGRADE ---------- */
.sub { color: var(--muted); margin-bottom: 20px; }
.upgrade-area { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: start; }
@media (max-width: 720px) { .upgrade-area { grid-template-columns: 1fr; } }
.upgrade-side h4 { color: var(--muted); margin-bottom: 10px; }
.upgrade-slot {
  background: var(--bg-2); border: 2px dashed var(--line); border-radius: 12px;
  min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); text-align: center; padding: 14px; margin-bottom: 14px; gap: 4px;
}
.slot-img { max-width: 70%; max-height: 80px; object-fit: contain; }
.upgrade-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px,1fr)); gap: 8px; max-height: 360px; overflow-y: auto; }
.pick-item {
  background: var(--bg-2); border: 1px solid var(--line); border-bottom: 3px solid var(--p-color);
  border-radius: 8px; padding: 8px 4px; text-align: center; cursor: pointer; font-size: 11px; transition: .12s;
}
.pick-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.pick-item.selected { outline: 2px solid var(--accent); }
.p-img { width: 100%; height: 44px; object-fit: contain; }

.upgrade-mid { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; text-align: center; }
.gauge {
  width: 180px; height: 180px; border-radius: 50%; margin: 0 auto 18px; position: relative;
  background: conic-gradient(var(--green) 0deg, var(--green) var(--deg,30deg), var(--bg-3) var(--deg,30deg));
}
.gauge::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: var(--bg-2); }
.gauge-pointer {
  position: absolute; left: 50%; top: 50%; width: 4px; height: 80px;
  background: var(--accent); transform-origin: bottom center;
  transform: translate(-50%, -100%) rotate(0deg); border-radius: 4px; z-index: 2;
}
.mult-row { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.mult-btn {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 700;
}
.mult-btn.active { background: var(--accent); color: #1a1200; border-color: var(--accent); }
.chance-label { color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.chance-label span { color: var(--green); font-weight: 800; }
.upgrade-result { margin-top: 14px; font-weight: 800; min-height: 24px; }

/* ---------- FEED ---------- */
.dropfeed {
  position: fixed; bottom: 0; left: 0; right: 0; background: #0b0f14ee; backdrop-filter: blur(6px);
  border-top: 1px solid var(--line); padding: 8px 16px; display: flex; align-items: center; gap: 12px; overflow: hidden;
}
.feed-label { color: var(--muted); font-size: 13px; white-space: nowrap; }
.feed { display: flex; gap: 8px; overflow: hidden; }
.feed-item {
  display: flex; align-items: center; gap: 6px; background: var(--bg-2);
  border: 1px solid var(--line); border-left: 3px solid var(--f-color);
  padding: 3px 10px 3px 6px; border-radius: 6px; font-size: 12px; white-space: nowrap; animation: slideIn .4s ease;
}
.feed-img { width: 34px; height: 24px; object-fit: contain; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px);} to {opacity:1; transform:none;} }

/* ---------- MODALES ---------- */
.modal {
  position: fixed; inset: 0; background: #000000cc; display: flex; align-items: center;
  justify-content: center; z-index: 90; animation: fade .2s ease; padding: 16px;
}
.reward-card {
  background: var(--bg-2); border: 1px solid var(--rc-color, var(--line));
  border-radius: 18px; padding: 28px 40px; text-align: center; min-width: 320px;
  box-shadow: 0 0 60px -10px var(--rc-color, #000); animation: pop .35s cubic-bezier(.2,1.4,.4,1);
  position: relative; overflow: hidden;
}
.reward-card::before {
  content: ""; position: absolute; inset: 0; opacity: .16;
  background: radial-gradient(circle at 50% 0%, var(--rc-color), transparent 70%);
}
@keyframes pop { from { transform: scale(.6); opacity: 0;} to {transform: scale(1); opacity:1;} }
.reward-rarity { font-weight: 800; letter-spacing: 1px; color: var(--rc-color); position: relative; }
.reward-skin-wrap { position: relative; height: 150px; display: flex; align-items: center; justify-content: center; margin: 8px 0; }
.reward-img { max-height: 150px; max-width: 320px; object-fit: contain; filter: drop-shadow(0 0 24px var(--rc-color)); }
.reward-name { font-size: 20px; font-weight: 800; position: relative; }
.reward-wear { color: var(--muted); font-size: 13px; margin-top: 4px; position: relative; }
.reward-value { color: var(--accent-2); font-size: 22px; font-weight: 800; margin: 12px 0; position: relative; }
.reward-btns { display: flex; gap: 10px; justify-content: center; position: relative; }

/* multi (x5 et +) */
.multi-card {
  background: var(--bg-2); 
  border: 1px solid var(--line); 
  border-radius: 18px;
  padding: 24px; 
  /* 1. On augmente la largeur pour faire entrer plein de caisses */
  max-width: 1200px; 
  width: 95%; 
  /* 2. On bloque la hauteur maximale pour ne pas dépasser de l'écran */
  max-height: 90vh; 
  display: flex;
  flex-direction: column;
  animation: pop .3s ease;
}

.multi-card h3 { 
  text-align: center; 
  margin-bottom: 16px; 
  flex-shrink: 0; /* Empêche le titre d'être écrasé par le défilement */
}

.multi-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); 
  gap: 12px; 
  margin-bottom: 18px; 
  /* 3. On active le défilement vertical UNIQUEMENT sur la grille */
  overflow-y: auto; 
  padding-right: 8px; /* Laisse de la place pour la barre de scroll */
  padding-bottom: 10px;
}

/* Petite personnalisation pour avoir une barre de scroll stylée */
.multi-grid::-webkit-scrollbar { width: 8px; }
.multi-grid::-webkit-scrollbar-track { background: var(--bg-3); border-radius: 4px; }
.multi-grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.multi-grid::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.multi-item {
  background: var(--bg-3); border: 1px solid var(--line); border-bottom: 4px solid var(--s-color);
  border-radius: 10px; padding: 10px; text-align: center;
}
.multi-img { width: 100%; height: 70px; object-fit: contain; }
.mi-name { font-size: 11px; font-weight: 600; margin: 6px 0 2px; }
.mi-val { color: var(--accent-2); font-weight: 800; font-size: 12px; }

.multi-foot { 
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; 
  flex-shrink: 0; /* Garde les boutons de vente toujours visibles en bas */
}
.multi-foot strong { color: var(--accent-2); }

/* ---------- MISSIONS ---------- */
.mission-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 14px; }
.mission {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
}
.mission.done { border-color: var(--green); box-shadow: 0 0 16px -6px var(--green); }
.m-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.m-name { font-weight: 700; }
.m-reward { color: var(--accent-2); font-weight: 800; font-size: 13px; white-space: nowrap; }
.m-desc { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.m-bar { height: 8px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.m-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }
.mission.done .m-fill { background: var(--green); }
.m-prog { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: right; }

/* ---------- CLASSEMENT ---------- */
.lb-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.lb-name { display: flex; gap: 8px; }
.lb-name input {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  padding: 10px 12px; border-radius: 8px; font-size: 14px; outline: none;
}
.lb-name input:focus { border-color: var(--accent); }
.lb-table { display: flex; flex-direction: column; gap: 6px; max-width: 620px; }
.lb-row {
  display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 10px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; font-size: 14px;
}
.lb-row > span:first-child { font-weight: 800; }
.lb-row > span:last-child { color: var(--accent-2); font-weight: 700; }
.lb-th { background: none; border: none; color: var(--muted); font-size: 12px; padding: 4px 16px; }
.lb-th > span:last-child { color: var(--muted); }
.lb-row.me { border-color: var(--accent); background: #f0a5001a; }

/* ---------- BONUS MODAL ---------- */
.bonus-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px; max-width: 460px; width: 100%; position: relative; animation: pop .3s ease;
}
.bonus-card h3 { margin-bottom: 18px; }
.modal-close {
  position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.bonus-sec { background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.bonus-sec h4 { margin-bottom: 6px; }
.bonus-sub { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.bonus-bar { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; margin-bottom: 12px; }
.bonus-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }
.bonus-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bonus-row span { font-weight: 700; }
.bonus-row .btn-primary { padding: 10px 22px; font-size: 14px; }

/* ---------- TOASTS ---------- */
.toasts {
  position: fixed; top: 16px; right: 16px; z-index: 120;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 12px 18px; font-weight: 600; font-size: 14px; max-width: 340px;
  box-shadow: 0 8px 24px #0009; transition: opacity .3s, transform .3s; animation: slideIn .3s ease;
}

/* ---------- CONFETTIS ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.confetti-piece { position: absolute; width: 10px; height: 14px; border-radius: 2px; }

/* ---------- COINFLIP ---------- */
.cf-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
@media (max-width: 720px) { .cf-wrap { grid-template-columns: 1fr; } }
.cf-stage { display: flex; align-items: center; justify-content: center; min-height: 240px; perspective: 800px; }
.cf-coin {
  width: 170px; height: 170px; position: relative; transform-style: preserve-3d;
  transform: rotateX(0deg);
}
.cf-face {
  position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 52px; font-weight: 900; color: #1a1200; backface-visibility: hidden;
  box-shadow: inset 0 0 0 8px #00000033, 0 12px 30px #000a;
}
.cf-ct { background: radial-gradient(circle at 35% 30%, #8fc4ff, #4b69ff); color: #04122e; transform: rotateX(0deg); }
.cf-t  { background: radial-gradient(circle at 35% 30%, #ffd27f, #f0a500); transform: rotateX(180deg); }

.cf-panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.cf-sides { display: flex; gap: 10px; margin-bottom: 16px; }
.cf-side {
  flex: 1; background: var(--bg-3); border: 2px solid var(--line); color: var(--text);
  padding: 14px; border-radius: 10px; font-weight: 800; font-size: 16px; cursor: pointer; transition: .15s;
}
.cf-side[data-side="ct"].active { border-color: #4b69ff; box-shadow: 0 0 14px -4px #4b69ff; }
.cf-side[data-side="t"].active { border-color: #f0a500; box-shadow: 0 0 14px -4px #f0a500; }
.cf-label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
#cfBet {
  width: 100%; background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  padding: 12px; border-radius: 10px; font-size: 18px; font-weight: 800; outline: none; margin-bottom: 10px;
}
#cfBet:focus { border-color: var(--accent); }
.cf-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.cf-quick button {
  flex: 1; min-width: 48px; background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  padding: 8px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 13px;
}
.cf-quick button:hover { border-color: var(--accent); }
.cf-opponent { color: var(--muted); margin-bottom: 14px; }
.cf-opponent strong { color: var(--text); }
.cf-panel .btn-primary { width: 100%; }
.cf-result { margin-top: 14px; font-weight: 800; min-height: 24px; text-align: center; }
.cf-hist-title { color: var(--muted); margin: 26px 0 12px; }
.cf-history { display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.cf-hist-item {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px;
  background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: 8px; padding: 8px 14px; font-size: 13px;
}
.cf-hist-item.win { border-left-color: var(--green); }
.cf-hist-item.lose { border-left-color: var(--red); }
.cfh-side { font-weight: 800; text-align: center; border-radius: 6px; padding: 2px 0; }
.cfh-side.ct { background: #4b69ff33; color: #8fc4ff; }
.cfh-side.t { background: #f0a50033; color: #ffd27f; }
.cfh-amt { font-weight: 800; }
.cf-hist-item.win .cfh-amt { color: var(--green); }
.cf-hist-item.lose .cfh-amt { color: var(--red); }

/* ---------- PROFIL & BADGES ---------- */
.profile { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 20px; }
.profile-title { margin: 14px 0 12px; color: var(--muted); }
.profile-title span { color: var(--text); font-weight: 800; }
.profile-title small { color: var(--muted); font-weight: 400; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 10px; }
.badge-grid .badge {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px;
  text-align: center; transition: .15s; display: block; min-width: unset; height: unset; line-height: normal;
}
.badge-grid .badge.owned { cursor: pointer; }
.badge-grid .badge.owned:hover { border-color: var(--accent); transform: translateY(-2px); }
.badge-grid .badge.locked { opacity: .45; }
.badge-grid .badge.active { border-color: #c77dff; box-shadow: 0 0 14px -4px #c77dff; }
.badge-emoji { font-size: 30px; }
.badge-name { font-size: 12px; font-weight: 600; margin-top: 4px; }

/* ---------- COMPTE & JOUEURS EN LIGNE ---------- */
.btn-sm { padding: 7px 12px; font-size: 12px; }
.acct { display: flex; align-items: center; gap: 8px; }
.acct-name { font-weight: 700; font-size: 13px; color: var(--accent-2); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.players-chip {
  display: flex; align-items: center; gap: 6px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 1.6s infinite; }
#playerCount { color: var(--green); font-weight: 800; margin-right: 2px; }

/* ---------- COINFLIP : modes & PvP ---------- */
.cf-modes { display: flex; gap: 8px; margin-bottom: 18px; }
.cf-mode {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--muted);
  padding: 10px 18px; border-radius: 10px; cursor: pointer; font-weight: 700; transition: .15s;
}
.cf-mode:hover { color: var(--text); border-color: var(--accent); }
.cf-mode.active { background: var(--accent); color: #1a1200; border-color: var(--accent); }
.cf-note { color: var(--muted); background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 13px; }
#cfBotControls .btn-primary, #cfPvpPlay .btn-primary { width: 100%; }
.cf-waiting {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px;
  background: var(--bg-3); border: 1px dashed var(--accent); border-radius: 10px; padding: 12px;
  font-weight: 600; font-size: 13px;
}
.cf-open-list { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.cf-open-item {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-size: 13px;
}

/* ---------- BATTLE DE CAISSES ---------- */
.cb-mode {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--muted);
  padding: 10px 18px; border-radius: 10px; cursor: pointer; font-weight: 700; transition: .15s;
}
.cb-mode:hover { color: var(--text); border-color: var(--accent); }
.cb-mode.active { background: var(--accent); color: #1a1200; border-color: var(--accent); }

.cb-case-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.cb-case-card {
  background: linear-gradient(160deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px 12px;
  text-align: center; cursor: pointer; transition: .15s; position: relative;
}
.cb-case-card:hover { transform: translateY(-3px); border-color: var(--c-theme, var(--accent)); }
.cb-case-card.selected {
  border-color: var(--c-theme, var(--accent));
  box-shadow: 0 0 0 2px var(--c-theme, var(--accent)) inset, 0 6px 18px -8px var(--c-theme, var(--accent));
}
.cb-cc-badge { position: absolute; top: 8px; left: 10px; font-size: 18px; }
.cb-cc-img { max-width: 80%; max-height: 70px; object-fit: contain; filter: drop-shadow(0 4px 8px #000a); }
.cb-cc-name { font-size: 13px; font-weight: 700; margin-top: 6px; }
.cb-cc-price { font-size: 12px; color: var(--accent-2); font-weight: 700; margin-top: 4px; }
.cb-cc-price small { color: var(--muted); font-weight: 400; text-decoration: line-through; }

.cb-launch-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px;
}
.cb-launch-info { font-size: 14px; color: var(--muted); }
.cb-launch-info strong { color: var(--text); }
.cb-launch-info small { color: var(--muted); }
.cb-tag { text-align: center; font-size: 20px; }

/* arène : les deux caisses côte à côte */
.cb-arena {
  background: linear-gradient(160deg, var(--bg-2), #0d1117);
  border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 4px 0 20px;
}
.cb-arena-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cb-arena-case { font-weight: 800; font-size: 16px; }
.cb-arena-status { color: var(--muted); font-size: 13px; }
.cb-duel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 14px; }
.cb-vs { align-self: center; font-weight: 900; color: var(--muted); font-size: 22px; letter-spacing: 1px; }
.cb-side {
  background: var(--bg-2); border: 2px solid var(--line); border-radius: 14px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px; transition: .2s;
  min-width: 0; /* indispensable : laisse la colonne rétrécir malgré la bande de skins */
}
.cb-side.cb-mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cb-side.cb-winner { border-color: var(--green); box-shadow: 0 0 24px -6px var(--green); }
.cb-side-name { font-weight: 800; text-align: center; }
.cb-you { color: #1a1200; background: var(--accent); border-radius: 6px; padding: 1px 8px; font-size: 12px; margin-left: 4px; }

.cb-roul-wrap {
  position: relative; overflow: hidden; border: 1px solid var(--line);
  border-radius: 12px; background: #0d1117; height: 132px; min-width: 0;
}
.cb-marker {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; z-index: 3;
  background: var(--accent); transform: translateX(-50%); box-shadow: 0 0 12px 2px var(--accent);
}
.cb-roul { display: flex; height: 100%; align-items: center; will-change: transform; }
.cb-roll-item {
  width: 130px; min-width: 130px; height: 116px; margin: 0 0; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, var(--bg-3), #0d1117);
  border-right: 1px solid #0d1117;
}
.cb-roll-item::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--ri-color);
}
.cb-roll-img { max-width: 84%; max-height: 74px; object-fit: contain; z-index: 1; filter: drop-shadow(0 4px 8px #000a); }
.cb-roll-name { font-size: 10px; color: var(--muted); text-align: center; padding: 2px 6px 0; z-index: 1; }
.cb-roll-win { box-shadow: 0 0 22px -2px var(--ri-color) inset; }

.cb-result-card {
  display: flex; align-items: center; gap: 12px; background: var(--bg-3);
  border: 1px solid var(--line); border-left: 5px solid var(--ri-color); border-radius: 12px;
  padding: 10px 14px; box-shadow: 0 0 18px -8px var(--ri-color);
  animation: cbPop .35s ease;
}
@keyframes cbPop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
.cb-card-img-wrap {
  width: 92px; min-width: 92px; height: 64px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--ri-color) 22%, transparent), transparent 70%);
  border-radius: 8px;
}
.cb-card-img { max-width: 100%; max-height: 60px; object-fit: contain; filter: drop-shadow(0 4px 8px #000a); }
.cb-card-info { min-width: 0; }
.cb-card-name { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-card-wear { font-size: 11px; color: var(--muted); margin: 2px 0 4px; }
.cb-card-val { font-weight: 800; font-size: 16px; color: var(--accent-2); }
.cb-total { text-align: center; font-size: 13px; color: var(--muted); }
.cb-total strong { color: var(--accent-2); font-size: 18px; }

.cb-verdict { text-align: center; font-weight: 800; font-size: 18px; margin: 16px 0 10px; min-height: 24px; }
.cb-verdict.win { color: var(--green); }
.cb-verdict.lose { color: var(--red); }
.cb-verdict-sub { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 4px; }
#cbAgainBtn { display: block; margin: 0 auto; }

@media (max-width: 620px) {
  .cb-duel { grid-template-columns: 1fr; }
  .cb-vs { padding: 4px 0; }
}

/* ---------- MODAL AUTH ---------- */
.auth-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px; max-width: 400px; width: 100%; position: relative; animation: pop .3s ease;
}
.auth-card h3 { margin-bottom: 16px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tab { flex: 1; background: var(--bg-3); border: 1px solid var(--line); color: var(--muted); padding: 10px; border-radius: 8px; cursor: pointer; font-weight: 700; }
.auth-tab.active { background: var(--accent); color: #1a1200; border-color: var(--accent); }
.auth-card input {
  width: 100%; background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  padding: 11px 12px; border-radius: 8px; font-size: 14px; outline: none; margin-bottom: 10px;
}
.auth-card input:focus { border-color: var(--accent); }
.auth-card .btn-primary { width: 100%; margin-top: 6px; }
.auth-error { color: var(--red); font-size: 13px; min-height: 18px; font-weight: 600; }
.auth-note { color: var(--muted); font-size: 12px; margin-top: 12px; text-align: center; }

/* ---------- POPUP DÉFI COINFLIP ---------- */
.cf-popup {
  position: fixed; bottom: 80px; right: 16px; z-index: 110; width: 280px;
  background: var(--bg-2); border: 1px solid var(--accent); border-radius: 14px; padding: 18px;
  box-shadow: 0 12px 40px #000b; animation: slideIn .3s ease;
}
.cf-popup-x { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.cf-popup-title { font-weight: 800; margin-bottom: 8px; }
.cf-popup-text { font-size: 13px; color: var(--text); margin-bottom: 14px; line-height: 1.5; }
.cf-popup .btn-primary { width: 100%; padding: 10px; font-size: 14px; }

/* ---------- PAGE DE CONNEXION (GATE) ---------- */
.gate {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: radial-gradient(circle at 50% 0%, #1a2330, #06080c 70%);
}
.gate-card {
  position: relative; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px 28px; max-width: 400px; width: 100%;
  box-shadow: 0 20px 60px #000c; animation: pop .35s cubic-bezier(.2,1.3,.4,1); text-align: center;
}
.gate-logo { font-size: 26px; font-weight: 900; letter-spacing: 1px; margin-bottom: 6px; }
.gate-logo .accent { color: var(--accent); }
.gate-tag { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.gate-tab {
  flex: 1; background: var(--bg-3); border: 1px solid var(--line); color: var(--muted);
  padding: 10px; border-radius: 8px; cursor: pointer; font-weight: 700;
}
.gate-tab.active { background: var(--accent); color: #1a1200; border-color: var(--accent); }
#gateFields input {
  width: 100%; background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  padding: 12px; border-radius: 8px; font-size: 14px; outline: none; margin-bottom: 10px;
}
#gateFields input:focus { border-color: var(--accent); }
.gate-btn { width: 100%; }
.gate-sep { color: var(--muted); font-size: 12px; margin: 16px 0; }
.gate-warn {
  color: var(--muted); font-size: 12px; margin-top: 18px; line-height: 1.5;
  background: #eb4b4b14; border: 1px solid #eb4b4b44; border-radius: 8px; padding: 10px 12px;
}
.gate-warn strong { color: var(--text); }

/* Animation pour l'ouverture x5 */
/* ----- ROULETTES VERTICALES x5 ----- */
.v-roulette-wrap {
  height: 140px;
  overflow: hidden;
  position: relative;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-bottom: 4px solid var(--s-color, var(--line));
  border-radius: 10px;
  text-align: center;
}
/* Effet d'ombre en haut et en bas pour l'illusion de profondeur */
.v-roulette-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 15px 15px -10px var(--bg-2), inset 0 -15px 15px -10px var(--bg-2);
}
.v-roulette-strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.v-roll-item {
  height: 140px;
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}
.v-roll-item .mi-name {
  font-size: 11px;
  font-weight: 600;
  margin: 6px 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.v-roll-item .mi-val {
  color: var(--accent-2);
  font-weight: 800;
  font-size: 12px;
}
.roll-up-anim {
  animation: rollUp 0.45s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}
@keyframes rollUp {
  0% { transform: translateY(80px) scale(0.9); opacity: 0; filter: blur(5px); }
  100% { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}
/* ============================================================
   NOUVELLES FONCTIONNALITÉS : float, marché, contrats, chat
   ============================================================ */

/* float + nom personnalisé */
.float-tag { color: var(--muted); font-variant-numeric: tabular-nums; }
.skin-orig { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.skin-actions { display: flex; gap: 6px; margin-top: 8px; }
.skin-actions .skin-sell { flex: 1; }
.skin-market, .skin-rename {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  border-radius: 7px; cursor: pointer; padding: 6px 9px; font-size: 13px;
}
.skin-market:hover, .skin-rename:hover { border-color: var(--accent); }

/* ---------- CONTRATS (TRADE-UP) ---------- */
.tu-rarities { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tu-rar {
  background: var(--bg-2); border: 1px solid var(--line); border-bottom: 3px solid var(--o-color, var(--line));
  color: var(--text); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 13px;
}
.tu-rar.active { background: var(--bg-3); border-color: var(--accent); }
.tu-count { background: #0006; padding: 1px 7px; border-radius: 10px; font-size: 11px; margin-left: 4px; }
.tu-out { font-size: 15px; margin-bottom: 12px; }
.tu-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px;
}

/* ---------- MARCHÉ ---------- */
.mk-seller { font-size: 11px; color: var(--muted); position: relative; margin-top: 2px; }
.mk-buy { width: 100%; padding: 8px; font-size: 13px; }

/* ---------- CHAT GLOBAL ---------- */
.chat-panel {
  position: fixed; right: 16px; bottom: 64px; width: 300px; max-width: calc(100vw - 32px);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  display: flex; flex-direction: column; overflow: hidden; z-index: 95;
  box-shadow: 0 12px 40px #000a; transform: translateY(120%); opacity: 0;
  transition: transform .25s ease, opacity .25s ease; pointer-events: none; height: 380px;
}
.chat-panel.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.chat-head { background: var(--bg-3); padding: 10px 14px; font-weight: 800; border-bottom: 1px solid var(--line); }
.chat-messages { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.chat-msg { line-height: 1.4; word-break: break-word; }
.chat-name { font-weight: 700; color: var(--accent-2); }
.chat-system { color: var(--muted); font-style: italic; background: #ffffff08; border-radius: 6px; padding: 4px 8px; }
.chat-input-row { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.chat-input-row input {
  flex: 1; background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 9px 10px; outline: none; font-size: 13px;
}
.chat-input-row input:focus { border-color: var(--accent); }
.chat-input-row .btn-primary { padding: 9px 14px; }
.icon-btn.active { border-color: var(--accent); background: var(--accent); color: #1a1200; }

/* ---------- CORRECTIONS & AJOUTS (v2) ---------- */
/* compteur inventaire : pastille propre et centrée */
.tab { display: inline-flex; align-items: center; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 19px; padding: 0 6px; line-height: 1;
  background: #00000038; border-radius: 10px; font-size: 12px; font-weight: 700; margin-left: 2px;
}
.tab.active .badge { background: #00000033; color: #1a1200; }

/* profil (sans saisie de pseudo) */
.profile-who { font-size: 14px; margin-bottom: 10px; }
.profile-who strong { color: var(--accent-2); }

/* barre d'actions du marché */
.mk-top { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }

/* bouton flottant du chat (accessible partout) */
.chat-fab {
  position: fixed; right: 18px; bottom: 54px; width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #1a1200; border: none;
  font-size: 24px; cursor: pointer; z-index: 96; box-shadow: 0 8px 24px #000a; transition: .15s;
}
.chat-fab:hover { filter: brightness(1.08); transform: translateY(-2px); }
.chat-fab.active { background: var(--bg-3); color: var(--text); border: 1px solid var(--accent); }

/* le panneau de chat s'ouvre au-dessus du bouton flottant */
.chat-panel { bottom: 120px !important; right: 18px !important; }
.chat-head { display: flex; align-items: center; justify-content: space-between; }
.chat-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.chat-close:hover { color: var(--text); }

/* ============================================================
   SHOP BOISSONS
   ============================================================ */
.drink-active-bar {
  display: flex; align-items: center; gap: 10px; background: var(--bg-2);
  border: 1px solid var(--accent); border-radius: 12px; padding: 12px 20px;
  margin-bottom: 24px; font-weight: 700; font-size: 15px; animation: pop .3s ease;
}
#drinkActiveIcon { font-size: 22px; }
.drink-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px; margin-top: 8px;
}
.drink-card {
  position: relative; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px 22px 22px; display: flex; flex-direction: column;
  align-items: center; gap: 10px; text-align: center; overflow: hidden; transition: border-color .2s;
}
.drink-card:hover { border-color: var(--accent); }
.drink-card--epic { border-color: #8847ff55; }
.drink-card--epic:hover { border-color: #8847ff; }
.drink-card--legendary { border-color: #ffd70055; }
.drink-card--legendary:hover { border-color: #ffd700; }
.drink-glow {
  position: absolute; inset: -60px; border-radius: 50%;
  background: radial-gradient(circle, #8847ff22, transparent 70%); pointer-events: none;
}
.drink-card--legendary .drink-glow { background: radial-gradient(circle, #ffd70022, transparent 70%); }
.drink-emoji { font-size: 48px; line-height: 1; }
.drink-name { font-size: 18px; font-weight: 800; }
.drink-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.drink-price { font-size: 17px; font-weight: 800; color: var(--accent-2); }
.drink-buy { width: 100%; margin-top: 6px; }

/* ============================================================
   MODAL VIP
   ============================================================ */
.vip-modal-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px 28px 22px; max-width: 540px; width: 100%; position: relative;
  animation: pop .3s ease; max-height: 90vh; overflow-y: auto;
}
.vip-modal-card h3 { margin-bottom: 18px; font-size: 18px; }
.vip-current-bar {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 18px;
}
.vip-current-bar .vc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.vip-current-bar .vc-name { font-size: 16px; font-weight: 800; }
.vip-current-bar .vc-xp { font-size: 13px; color: var(--muted); }
.vip-current-bar .vc-bar { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.vip-current-bar .vc-fill { height: 100%; border-radius: 5px; transition: width .5s; }
.vip-current-bar .vc-next { margin-top: 8px; font-size: 12px; color: var(--muted); text-align: right; }
.vip-rank-list { display: flex; flex-direction: column; gap: 8px; }
.vip-rank-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-radius: 10px; border: 1px solid transparent; transition: .15s;
}
.vip-rank-row.is-current { border-color: var(--rk, var(--accent)); background: var(--bg-3); }
.vip-rank-row.is-done { opacity: .55; }
.vip-rank-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.vip-rank-info { flex: 1; }
.vip-rank-info .vri-name { font-weight: 700; font-size: 14px; }
.vip-rank-info .vri-req { font-size: 12px; color: var(--muted); }
.vip-rank-mult { font-size: 13px; font-weight: 700; color: var(--accent-2); white-space: nowrap; }
.vip-rank-badge { font-size: 18px; }

/* ---------- CHIP BOISSON ACTIF (header) ---------- */
.drink-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--drink-color, #2ecc71);
  border-radius: 10px; padding: 5px 10px;
  box-shadow: 0 0 10px -2px var(--drink-color, #2ecc71);
  animation: drinkPulse 2s ease-in-out infinite;
  cursor: default;
}
@keyframes drinkPulse {
  0%, 100% { box-shadow: 0 0 8px -2px var(--drink-color, #2ecc71); }
  50%       { box-shadow: 0 0 18px 2px var(--drink-color, #2ecc71); }
}
#drinkChipIcon { font-size: 20px; line-height: 1; }
.drink-chip-info { display: flex; flex-direction: column; line-height: 1.2; }
#drinkChipName { font-size: 11px; font-weight: 700; color: var(--drink-color, #2ecc71); letter-spacing: .5px; }
.drink-chip-timer { font-size: 13px; font-weight: 800; color: var(--text); }

/* ---------- BARRE FILTRES / TRI ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  margin-bottom: 18px; padding-bottom: 2px;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-divider { width: 1px; height: 22px; background: var(--line); flex-shrink: 0; }
.filter-pills { display: flex; gap: 5px; flex-shrink: 0; }
.fpill {
  background: var(--bg-2); color: var(--muted);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 4px 11px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: .15s; white-space: nowrap; flex-shrink: 0;
}
.fpill:hover { color: var(--text); border-color: var(--accent); }
.fpill.active { background: var(--accent); color: #1a1200; border-color: var(--accent); }
.filter-select {
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 9px; font-size: 12px; cursor: pointer; outline: none;
  flex-shrink: 0; white-space: nowrap;
}
.filter-select:focus { border-color: var(--accent); }

/* ============================================================
   BATTLE ROYALE
   ============================================================ */
/* File d'attente BR */
.br-queue-popup {
  position: fixed; bottom: 24px; right: 24px; z-index: 1200;
  background: var(--bg-2); border: 1px solid var(--accent-2);
  border-radius: 14px; padding: 18px 20px; width: 320px;
  box-shadow: 0 8px 40px -8px rgba(0,0,0,.7), 0 0 24px -6px var(--accent-2);
  animation: slideUp .25s ease;
}
.br-queue-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.br-queue-title { font-weight: 800; font-size: 16px; }
.br-queue-cd { font-size: 12px; color: var(--muted); }
.br-queue-players { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; min-height: 36px; }
.br-queue-player { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.br-queue-player em { color: var(--accent-2); font-style: normal; font-size: 12px; }
.br-queue-weapon { margin-left: auto; font-size: 11px; color: var(--muted); }
.br-queue-note { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.br-queue-btns { display: flex; gap: 8px; align-items: center; }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.br-online-banner {
  padding: 10px 16px; border-radius: 10px; margin-bottom: 16px;
  font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.br-online-banner.offline { background: var(--bg-3); color: var(--muted); }
.br-online-banner.warn { background: rgba(235,75,75,.12); color: #ff8080; border: 1px solid rgba(235,75,75,.3); }
.br-online-banner.info { background: var(--bg-3); color: var(--muted); }
.br-online-banner.active { background: rgba(78,205,100,.12); color: var(--green); border: 1px solid rgba(78,205,100,.35); }
.br-setup { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 22px; }
@media (max-width: 760px) { .br-setup { grid-template-columns: 1fr; } }
.br-setup h4 { margin-bottom: 10px; color: var(--muted); font-size: 14px; }

.br-weapon-pick {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 320px; overflow-y: auto; padding: 8px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
}
.br-weapon-pick .empty-msg { padding: 18px 6px; text-align: center; }
.br-cat-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase;
  color: var(--accent-2); margin: 8px 2px 2px; padding-bottom: 4px; border-bottom: 1px solid var(--line);
}
.br-cat-head:first-child { margin-top: 0; }
.br-cat-head span { background: var(--bg-3); color: var(--muted); border-radius: 8px; padding: 1px 7px; font-size: 11px; }
.br-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }

/* sélecteurs arme secondaire & carte */
.br-map-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.br-sec-pick { display: flex; flex-direction: column; gap: 4px; }
.br-sec-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.br-sec-btn, .br-map-btn {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .12s;
}
.br-sec-btn:hover, .br-map-btn:hover { border-color: var(--accent-2); transform: translateY(-1px); }
.br-sec-btn.sel, .br-map-btn.sel {
  border-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 18%, var(--bg-3));
  box-shadow: 0 0 12px -4px var(--accent-2);
}
.br-wpick {
  background: var(--bg-3); border: 2px solid var(--p-color, var(--line));
  border-radius: 9px; padding: 6px 4px; cursor: pointer; text-align: center;
  transition: .12s; position: relative;
}
.br-wpick:hover { transform: translateY(-2px); box-shadow: 0 6px 14px -6px var(--p-color); }
.br-wpick.sel { outline: 2px solid var(--accent-2); box-shadow: 0 0 14px -2px var(--accent-2); }
.br-wpick img, .br-wpick .img-fallback { width: 100%; height: 46px; object-fit: contain; }
.br-wpick .img-fallback { display: flex; align-items: center; justify-content: center; font-size: 26px; }
.br-wpick-val { font-size: 11px; font-weight: 700; color: var(--accent-2); margin-top: 2px; }
.br-wpick-pow { font-size: 10px; color: var(--muted); }

.br-selected {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; text-align: center; color: var(--muted); margin-bottom: 14px; min-height: 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.br-selected img, .br-selected .img-fallback { height: 50px; object-fit: contain; }
.br-selected .img-fallback { font-size: 30px; }
.br-sel-name { font-weight: 700; color: var(--text); font-size: 14px; }
.br-sel-pow { font-size: 12px; color: var(--accent-2); font-weight: 700; }
.br-sel-sec { font-size: 12px; color: var(--muted); }
.br-sel-sec strong { color: var(--text); }

/* popup « rejoindre la file » : choix des armes principale + secondaire */
.br-join-popup { width: 340px; max-height: 80vh; display: flex; flex-direction: column; }
.br-join-pickers { overflow-y: auto; margin-bottom: 12px; padding-right: 4px; }
.br-join-pickers h4 { margin: 8px 0 6px; font-size: 13px; }
.br-join-pick { max-height: 200px; overflow-y: auto; }
.br-join-pick .br-cat-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.br-join-selected { margin-bottom: 0; min-height: 70px; padding: 10px; }

.br-ticket-quick { margin-bottom: 8px; }
.br-prizes {
  display: flex; flex-direction: column; gap: 3px; margin: 12px 0;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 12px;
}
.br-prizes .brp { display: flex; justify-content: space-between; }
.br-prizes .brp span:last-child { color: var(--green); font-weight: 700; }

.br-stats-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.br-stat {
  flex: 1; min-width: 110px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; text-align: center;
}
.br-stat-k { display: block; font-size: 11px; color: var(--muted); }
.br-stat-v { display: block; font-size: 20px; font-weight: 800; color: var(--accent-2); }

.br-leaderboard { display: flex; flex-direction: column; gap: 5px; }
.brl-row {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
}
.brl-row.me { border-color: var(--accent); background: #f0a50015; }
.brl-row .brl-wins { color: var(--accent-2); font-weight: 800; }

/* --- Arène --- */
.br-arena { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.br-arena-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.br-survivors { font-size: 18px; font-weight: 700; }
.br-survivors strong { color: var(--green); }
.br-round { color: var(--muted); font-size: 14px; }
.br-zone { height: 12px; background: var(--bg-3); border-radius: 8px; overflow: hidden; margin-bottom: 16px; border: 1px solid var(--line); }
.br-zone-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, #2ecc71, #f0a500 60%, #eb4b4b);
  transition: width .25s linear;
}
.br-you-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-2); border: 2px solid var(--green); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 18px; transition: .3s;
}
.br-you-card.dead { border-color: var(--red); opacity: .8; }
.br-you-img img, .br-you-img .img-fallback { height: 46px; width: 80px; object-fit: contain; }
.br-you-img .img-fallback { font-size: 28px; display: flex; align-items: center; justify-content: center; }
.br-you-info { flex: 1; }
.br-you-name { font-weight: 800; font-size: 16px; }
.br-you-status { font-size: 13px; color: var(--muted); }
.br-you-place { text-align: right; }
.br-you-place span { font-size: 24px; font-weight: 800; color: var(--accent-2); }
.br-you-place small { display: block; font-size: 11px; color: var(--muted); }

.br-killfeed { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
.brk-item {
  background: var(--bg-2); border-left: 3px solid var(--line); border-radius: 6px;
  padding: 6px 12px; font-size: 13px; animation: killIn .25s ease;
}
.brk-item.you-kill { border-left-color: var(--green); }
.brk-item.you-death { border-left-color: var(--red); background: #eb4b4b22; font-weight: 700; }
@keyframes killIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* --- Résultat --- */
.br-result { display: flex; justify-content: center; padding: 20px 0; animation: fadeIn .3s ease; }
.br-result-card {
  background: var(--bg-2); border: 2px solid var(--accent); border-radius: 16px;
  padding: 30px 40px; text-align: center; max-width: 420px; box-shadow: 0 0 40px -10px var(--accent);
}
.br-result-card.win { border-color: var(--accent-2); box-shadow: 0 0 60px -8px var(--accent-2); }
.br-result-card.lose { border-color: var(--line); box-shadow: none; }
.br-result-rank { font-size: 56px; font-weight: 900; color: var(--accent-2); line-height: 1; }
.br-result-title { font-size: 22px; font-weight: 800; margin: 8px 0 16px; }
.br-result-stats { color: var(--muted); margin-bottom: 14px; font-size: 14px; }
.br-result-reward { font-size: 20px; font-weight: 800; color: var(--green); margin-bottom: 18px; }

/* ============================================================
   FPS BATTLE ROYALE (raycaster jouable)
   ============================================================ */
.fps-wrap {
  position: relative; width: 100%; max-width: 900px; margin: 0 auto;
  aspect-ratio: 8 / 5; background: #000; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; user-select: none;
}
#fpsCanvas { display: block; width: 100%; height: 100%; image-rendering: auto; cursor: crosshair; }

.fps-hud { position: absolute; inset: 0; pointer-events: none; font-family: "Segoe UI", system-ui, sans-serif; }
.fps-top {
  position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between;
  padding: 10px 16px; font-size: 15px; color: #fff; text-shadow: 0 1px 3px #000;
  background: linear-gradient(#0007, transparent);
}
.fps-top strong { color: var(--accent-2); }
.fps-zone { font-weight: 700; }
.fps-zone.danger { color: #ff5e5e; animation: pulse 1s infinite; }

.fps-minimap {
  position: absolute; top: 44px; right: 12px; width: 120px; height: 120px;
  border: 1px solid #ffffff44; border-radius: 8px; background: #0008;
}

/* ----- classement en direct (scoreboard du Battle Royale) ----- */
#fpsStandings {
  position: absolute; top: 44px; left: 12px; width: 186px;
  background: rgba(10,13,18,0.72); border: 1px solid #ffffff22; border-radius: 8px;
  padding: 6px 0 4px; color: #e6edf3; pointer-events: none; z-index: 6;
  font-family: "Segoe UI", system-ui, sans-serif;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.fps-stand-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 10px 6px; font-size: 12px; color: #cfd8e3; font-weight: 800;
  border-bottom: 1px solid #ffffff14; margin-bottom: 3px;
}
.fps-stand-alive { color: #39ff88; font-size: 11px; font-weight: 700; }
.fps-stand-row {
  display: flex; align-items: center; gap: 6px; padding: 3px 10px;
  font-size: 12px; font-weight: 600; line-height: 1.2;
}
.fps-stand-row.me { background: rgba(57,255,136,0.12); }
.fps-stand-row.dead { opacity: 0.42; }
.fps-stand-rank { width: 14px; text-align: right; color: #8b98a8; font-size: 11px; flex: none; }
.fps-stand-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: #39ff88; box-shadow: 0 0 4px #39ff88aa;
}
.fps-stand-dot.off { background: #6b7480; box-shadow: none; }
.fps-stand-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fps-stand-row.dead .fps-stand-name { text-decoration: line-through; }
.fps-stand-kills { color: #ffce4d; font-weight: 800; min-width: 14px; text-align: right; }
.fps-stand-more { padding: 4px 10px 2px; color: #8b98a8; font-size: 11px; font-weight: 600; }

.fps-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-end;
  padding: 12px 18px; color: #fff; text-shadow: 0 1px 3px #000;
  background: linear-gradient(transparent, #0008);
}
.fps-health strong { font-size: 26px; color: #ff6b6b; }
.fps-ammo strong { font-size: 26px; color: var(--accent-2); }
.fps-ammo span { color: var(--muted); }
.fps-weapon { font-size: 13px; color: #cfd8e3; font-weight: 700; max-width: 220px; text-align: center; }

.fps-overlay {
  position: absolute; inset: 0; display: flex;
  background: #000a; backdrop-filter: blur(3px); pointer-events: auto; text-align: center; padding: 20px;
  /* au-dessus de l'arme tenue (z-index 4), du flash (5) et du compte à rebours (8) */
  z-index: 20;
  /* permet de faire défiler quand le panneau des touches dépasse la hauteur de l'arène */
  overflow-y: auto;
}
/* margin:auto centre la carte tout en restant défilable si elle est trop haute
   (align-items:center couperait le haut sans pouvoir y accéder) */
.fps-overlay-card { max-width: 460px; margin: auto; }
.fps-overlay-card h3 { font-size: 24px; margin-bottom: 12px; }
.fps-overlay-card p { color: #cfd8e3; margin-bottom: 10px; line-height: 1.6; }
.fps-overlay-card .fps-small { color: var(--muted); font-size: 13px; }
.fps-overlay-card .btn-primary { margin: 10px 8px 0; }
.fps-countdown {
  font-size: 5rem; font-weight: 900; letter-spacing: 4px;
  color: var(--accent-2); text-align: center;
  margin: 4px 0 8px; line-height: 1;
  text-shadow: 0 0 30px rgba(255,200,60,0.6);
  animation: fps-cd-pulse 0.5s ease-in-out infinite alternate;
}
@keyframes fps-cd-pulse { from { transform: scale(1); } to { transform: scale(1.08); } }

.fps-killmsg {
  position: absolute; top: 30%; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 26px; font-weight: 800; text-shadow: 0 2px 8px #000;
  opacity: 0; pointer-events: none; transition: opacity .2s; text-align: center;
}
.fps-killmsg.show { opacity: 1; }

/* HUD façon CS:GO : gros chiffres anguleux en bas */
.fps-health strong, .fps-ammo strong {
  font-family: "Consolas", "Segoe UI", monospace; font-size: 30px; font-weight: 800;
}
.fps-weapon { text-transform: uppercase; letter-spacing: .5px; }

/* ---- Réglages (lobby + overlay) ---- */
.br-settings, .fps-settings {
  margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg-2);
}
.fps-settings { background: #0d1117cc; margin: 14px auto; max-width: 360px; text-align: left; }
.br-settings h4 { margin: 0 0 8px; font-size: 14px; }
.br-set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 0; font-size: 13px; color: #cfd8e3; cursor: pointer;
}
.br-set-ctrl { display: flex; align-items: center; gap: 8px; }
.br-set-ctrl input[type="range"] { width: 150px; accent-color: var(--accent-2); }
.br-set-ctrl strong { min-width: 38px; text-align: right; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.br-set-row input[type="color"] { width: 38px; height: 26px; border: none; background: none; cursor: pointer; padding: 0; }
/* aperçu du viseur personnalisable */
.ch-preview { position: relative; width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 8px; background: #0b0e14; overflow: hidden; flex: none; }
.br-set-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent-2); cursor: pointer; }

/* configuration des touches FPS */
.fps-keys { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.fps-key-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 4px 0; font-size: 13px; color: #cfd8e3;
}
.fps-key-btn {
  min-width: 120px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #161b22; color: #e6edf3; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.fps-key-btn:hover { border-color: var(--accent-2); }
.fps-key-btn.capturing { border-color: var(--accent-2); background: #1f2a37; color: var(--accent-2); }
.fps-key-reset { display: block; width: 100%; margin-top: 10px; }

/* ============================================================
   FONCTIONNALITÉS PREMIUM (thèmes, stats, profil public, enchères, animations)
   ============================================================ */

/* ---------- ANIMATIONS D'OUVERTURE PREMIUM ---------- */
.app.shake-1 { animation: shk1 .45s ease; }
.app.shake-2 { animation: shk2 .6s ease; }
.app.shake-3 { animation: shk3 .75s ease; }
@keyframes shk1 { 0%,100%{transform:translate(0,0)} 20%{transform:translate(-4px,2px)} 40%{transform:translate(4px,-2px)} 60%{transform:translate(-3px,1px)} 80%{transform:translate(3px,-1px)} }
@keyframes shk2 { 0%,100%{transform:translate(0,0)} 15%{transform:translate(-7px,3px)} 30%{transform:translate(7px,-3px)} 45%{transform:translate(-6px,2px)} 60%{transform:translate(6px,-2px)} 75%{transform:translate(-4px,1px)} 90%{transform:translate(4px,-1px)} }
@keyframes shk3 { 0%,100%{transform:translate(0,0) rotate(0)} 10%{transform:translate(-10px,4px) rotate(-.4deg)} 25%{transform:translate(10px,-4px) rotate(.4deg)} 40%{transform:translate(-9px,3px) rotate(-.3deg)} 55%{transform:translate(9px,-3px) rotate(.3deg)} 70%{transform:translate(-6px,2px)} 85%{transform:translate(6px,-2px)} }

/* bandes cinéma pour un drop couteau (ralenti dramatique) */
.cine-bars { position: fixed; inset: 0; pointer-events: none; z-index: 85; opacity: 0; }
.cine-bars::before, .cine-bars::after { content: ""; position: absolute; left: 0; right: 0; height: 0; background: #000; }
.cine-bars::before { top: 0; } .cine-bars::after { bottom: 0; }
.cine-bars.go { animation: cineFade 2.4s ease; }
.cine-bars.go::before, .cine-bars.go::after { animation: cineBar 2.4s ease; }
@keyframes cineFade { 0%{opacity:0} 12%{opacity:1} 80%{opacity:1} 100%{opacity:0} }
@keyframes cineBar { 0%{height:0} 14%{height:11vh} 80%{height:11vh} 100%{height:0} }

/* révélation premium dans la carte de récompense */
.reward-card.reveal-covert { animation: pop .35s cubic-bezier(.2,1.4,.4,1), glowPulse 1.6s ease-in-out infinite; }
.reward-card.reveal-knife {
  animation: knifeReveal 1.2s cubic-bezier(.16,.8,.2,1), goldPulse 1.4s ease-in-out infinite .6s;
  border-color: #ffd700;
}
.reward-card.reveal-knife .reward-img { animation: knifeZoom 1.3s cubic-bezier(.16,.8,.2,1); }
@keyframes knifeReveal { 0%{transform:scale(.2) rotate(-8deg);opacity:0} 55%{transform:scale(1.12) rotate(2deg);opacity:1} 100%{transform:scale(1) rotate(0)} }
@keyframes knifeZoom { 0%{transform:scale(2.4);filter:drop-shadow(0 0 40px #ffd700)} 100%{transform:scale(1)} }
@keyframes glowPulse { 0%,100%{box-shadow:0 0 40px -10px var(--rc-color)} 50%{box-shadow:0 0 80px -4px var(--rc-color)} }
@keyframes goldPulse  { 0%,100%{box-shadow:0 0 50px -8px #ffd700} 50%{box-shadow:0 0 110px 0 #ffd70099} }

/* ---------- THÈMES D'INTERFACE ---------- */
/* fond image plein écran (thèmes photo CS / Valo / joueurs) */
#themeBgImg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-color: var(--bg);
  background-size: cover; background-position: center 18%; background-repeat: no-repeat;
}
#themeBgImg::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg) 74%, transparent) 0%,
    color-mix(in srgb, var(--bg) 86%, transparent) 55%,
    color-mix(in srgb, var(--bg) 95%, transparent) 100%);
}
body.has-bg-img { background: transparent; }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 14px; }
.theme-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 14px; text-align: center; transition: .15s;
}
.theme-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

/* cartes premium : halo coloré, bordure animée, badge */
.theme-card.premium {
  position: relative; overflow: hidden;
  border-color: color-mix(in srgb, var(--tc-glow) 55%, var(--line));
  background:
    radial-gradient(120% 90% at 50% -20%, color-mix(in srgb, var(--tc-glow) 22%, transparent), transparent 60%),
    var(--bg-2);
  box-shadow: 0 0 18px -6px var(--tc-glow), 0 0 0 1px color-mix(in srgb, var(--tc-glow) 30%, transparent) inset;
  animation: tcPulse 3.2s ease-in-out infinite;
}
.theme-card.premium::before {
  content: ""; position: absolute; inset: -50%;
  background: conic-gradient(from 0deg, transparent 0 70%, color-mix(in srgb, var(--tc-glow) 80%, #fff) 85%, transparent 100%);
  animation: tcSpin 4s linear infinite; opacity: .35; pointer-events: none; z-index: 0;
}
.theme-card.premium > * { position: relative; z-index: 1; }
.theme-card.premium .theme-emoji { filter: drop-shadow(0 0 10px var(--tc-glow)); }
.theme-card.premium .theme-name { color: color-mix(in srgb, var(--tc-glow) 70%, var(--text)); }
.theme-badge {
  position: absolute; top: 8px; right: -28px; z-index: 2;
  background: var(--tc-glow); color: #06070d; font-size: 9px; font-weight: 900;
  letter-spacing: 1px; padding: 3px 30px; transform: rotate(38deg);
  box-shadow: 0 1px 6px #0008;
}
@keyframes tcSpin { to { transform: rotate(360deg); } }
@keyframes tcPulse {
  0%,100% { box-shadow: 0 0 18px -6px var(--tc-glow), 0 0 0 1px color-mix(in srgb, var(--tc-glow) 30%, transparent) inset; }
  50%     { box-shadow: 0 0 30px -2px var(--tc-glow), 0 0 0 1px color-mix(in srgb, var(--tc-glow) 55%, transparent) inset; }
}

.theme-emoji { font-size: 34px; }
.theme-preview {
  height: 84px; border-radius: 10px; margin-bottom: 8px;
  background-size: cover; background-position: center 20%;
  position: relative; border: 1px solid #0006; overflow: hidden;
  box-shadow: 0 2px 10px -4px #000a inset;
}
.theme-preview::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, #000a, transparent 60%);
}
.theme-preview-emoji {
  position: absolute; bottom: 5px; right: 7px; font-size: 22px; z-index: 1;
  filter: drop-shadow(0 1px 3px #000);
}
.theme-name { font-weight: 800; margin: 6px 0 10px; }
.theme-swatches { display: flex; gap: 5px; justify-content: center; margin-bottom: 12px; }
.theme-sw { width: 22px; height: 22px; border-radius: 6px; border: 1px solid #0006; }
.theme-btn { width: 100%; }

/* ---------- SHOP : AGENTS BR ---------- */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 14px; }
.agent-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 12px; text-align: center; transition: .15s;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.agent-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.agent-card--premium { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: 0 0 18px -8px var(--accent); }
.agent-card .btn-sm { width: 100%; }
/* figurine : petit personnage stylisé aux couleurs de l'agent */
.agent-fig {
  position: relative; width: 56px; height: 78px; margin: 2px auto 0;
  border-radius: 10px; background: var(--bg-3); border: 1px solid #0005; overflow: hidden;
}
.agent-head {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%; background: #d8b89a; border: 1px solid #0004;
}
.agent-torso {
  position: absolute; top: 30px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 38px; border-radius: 8px 8px 5px 5px; background: var(--shirt);
}
.agent-vest {
  position: absolute; top: 37px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 22px; border-radius: 5px; background: var(--vest);
  box-shadow: 0 0 0 2px var(--glove) inset;
}
.agent-fig::after { /* liseré tag (équipe) en bas */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--tag);
}
.agent-name { font-weight: 800; font-size: 13px; }

/* ---------- SHOP : CADRES DE PROFIL ---------- */
.frame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 14px; }
.frame-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 14px; text-align: center; transition: .15s;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.frame-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.frame-card .btn-sm { width: 100%; }
.frame-sample { display: flex; align-items: center; justify-content: center; min-height: 38px; }
.frame-name { font-weight: 800; font-size: 13px; }

/* Cadres de profil — applicables à une PUCE de nom (.lb-name) comme à une
   LIGNE entière (.lb-row), au nom de l'en-tête et au nom du chat.
   Les bordures passent en !important pour battre le surlignage « moi ». */
.lb-name { display: inline-block; padding: 2px 8px; border-radius: 7px; font-weight: 700; border: 2px solid transparent; }

.frame-gold    { border-color: #ffd700 !important; color: #ffe066; box-shadow: 0 0 9px -1px #ffd70099; }
.frame-ocean   { border-color: #19b6e0 !important; color: #67e0f7; box-shadow: 0 0 9px -1px #19b6e099; }
.frame-neon    { border-color: #19e07a !important; color: #6ff7b0; box-shadow: 0 0 11px -1px #19e07a, inset 0 0 6px -3px #19e07a; }
.frame-royal   { border-color: #c98bff !important; color: #e7ccff; box-shadow: 0 0 12px -2px #a855f7; }
/* dégradés via border-image (n'affecte pas le fond → marche partout) */
.frame-fire    { border-image: linear-gradient(90deg, #ff3b3b, #ff9800, #ffd700) 1 !important; color: #ffb74d; box-shadow: 0 0 11px -2px #ff6b2e; }
.frame-rainbow { border-image: linear-gradient(90deg, #ff3b6b, #ffae57, #aaff00, #19b6e0, #a855f7) 1 !important; color: #fff; box-shadow: 0 0 13px -2px #a855f7; }
.frame-rainbow { animation: frameHue 6s linear infinite; }
@keyframes frameHue { to { filter: hue-rotate(360deg); } }

/* quand le cadre habille toute une ligne du classement : bordure plus épaisse */
.lb-row.frame-gold, .lb-row.frame-ocean, .lb-row.frame-neon, .lb-row.frame-royal,
.lb-row.frame-fire, .lb-row.frame-rainbow { border-width: 2px; }
/* le nom du chat encadré reste compact */
.chat-name.lb-name { padding: 0 6px; }

/* ---------- STATS DE PROFIL DÉTAILLÉES ---------- */
/* ----- défis quotidiens ----- */
.daily-reset { font-size: 12px; color: var(--muted); font-weight: 500; }
.daily-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px; margin-bottom: 22px; }
.daily-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: .15s;
}
.daily-card.done { border-color: var(--accent); box-shadow: 0 0 16px -6px var(--accent); }
.daily-card.claimed { opacity: .6; }
.daily-top { display: flex; align-items: center; gap: 10px; }
.daily-emoji { font-size: 22px; }
.daily-label { font-weight: 700; font-size: 13px; line-height: 1.25; }
.daily-bar { height: 8px; background: var(--bg-3); border-radius: 6px; overflow: hidden; }
.daily-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 6px; transition: width .4s; }
.daily-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daily-prog { font-size: 12px; color: var(--muted); font-weight: 700; }
.daily-reward { font-size: 13px; font-weight: 800; color: var(--accent-2); }
.daily-claim { padding: 6px 12px; font-size: 12px; }
.daily-claimed { font-size: 12px; font-weight: 700; color: var(--green); }

.pstat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 10px; }
.pstat {
  display: flex; align-items: center; gap: 12px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.pstat-ic { font-size: 24px; }
.pstat-main { min-width: 0; }
.pstat-v { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstat-k { color: var(--muted); font-size: 12px; }
.pstat-sub { color: var(--accent-2); }

/* ---------- PROFIL PUBLIC ---------- */
.pp-card { max-width: 640px; width: 100%; }
.pp-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pp-name { font-size: 24px; font-weight: 900; }
.pp-net { color: var(--accent-2); font-weight: 800; font-size: 18px; }
.pp-net small { color: var(--muted); font-weight: 400; font-size: 12px; }
.pp-stats { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin-bottom: 8px; }
.pp-stats div { background: var(--bg-3); border-radius: 10px; padding: 10px 4px; text-align: center; }
.pp-stats strong { display: block; font-size: 17px; }
.pp-stats span { color: var(--muted); font-size: 11px; }
.pp-sub { color: var(--muted); margin: 16px 0 10px; }
.pp-showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 10px; }
.pp-skin { background: var(--bg-3); border: 1px solid var(--line); border-bottom: 3px solid var(--ri-color); border-radius: 10px; padding: 10px 6px; text-align: center; }
.pp-skin-img { max-width: 90%; max-height: 56px; object-fit: contain; }
.pp-skin-name { font-size: 11px; font-weight: 700; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-skin-val { font-size: 12px; color: var(--accent-2); font-weight: 700; }

/* ---------- ENCHÈRES ---------- */
.auction-list { display: flex; flex-direction: column; gap: 12px; }
.auction-card {
  background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--ri-color);
  border-radius: 12px; padding: 14px 16px;
}
.auction-card.leading { box-shadow: 0 0 0 1px var(--green) inset; border-left-color: var(--green); }
.auction-skin { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 14px; }
.auction-img { width: 84px; height: 60px; object-fit: contain; }
.auction-info { min-width: 0; }
.auction-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auction-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.auction-right { text-align: right; }
.auction-cur { font-weight: 800; font-size: 18px; color: var(--accent-2); }
.auction-curlbl { color: var(--muted); font-size: 11px; }
.auction-time { font-size: 13px; font-weight: 700; margin-top: 4px; }
.auction-bidrow { display: flex; gap: 8px; margin-top: 12px; }
.auction-bidinput {
  flex: 1; background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 8px 12px; font-weight: 700; font-size: 14px; outline: none;
}
.auction-bidinput:focus { border-color: var(--accent); }
.auction-bidnote { margin-top: 10px; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* création d'enchère */
.auction-form { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.auction-form-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.auction-form-row .cf-label { flex: 1; min-width: 160px; }
.auction-form-row input, .auction-form-row select { width: 100%; margin-top: 6px; }
.auction-pick-item {
  background: var(--bg-3); border: 1px solid var(--line); border-bottom: 3px solid var(--ri-color);
  border-radius: 10px; padding: 10px 6px; text-align: center; cursor: pointer; transition: .12s;
}
.auction-pick-item:hover { transform: translateY(-2px); border-color: var(--ri-color); }
.auction-pick-item.selected { box-shadow: 0 0 0 2px var(--accent) inset; }
.auction-pick-img { max-width: 88%; max-height: 54px; object-fit: contain; }
.auction-pick-name { font-size: 11px; font-weight: 700; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auction-pick-val { font-size: 12px; color: var(--accent-2); font-weight: 700; }

@media (max-width: 560px) {
  .pp-stats { grid-template-columns: repeat(3,1fr); }
  .auction-skin { grid-template-columns: 64px 1fr; }
  .auction-right { grid-column: 1 / -1; text-align: left; }
}

/* ---------- BR : bouton « Voir tout » par catégorie ---------- */
.br-showall {
  display: block; width: 100%; margin: 4px 0 10px; padding: 7px 0;
  background: var(--bg-3); color: var(--muted); border: 1px dashed var(--line);
  border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 12px; transition: .15s;
}
.br-showall:hover { color: var(--text); border-color: var(--accent); }

/* ---------- Modal enchères : grille de choix scrollable ---------- */
#auctionModal .multi-card { overflow-y: auto; }
#auctionPickGrid { padding-right: 4px; }
#auctionForm { flex-shrink: 0; }
