/* ============================================================
VARIABLES GLOBALES (couleurs des cadres)
============================================================ */
:root {
  --game-width: min(94vw, 60vh, 400px);
  --c-primary: #00d2ff;
  --c-gold: #f8b500;
  --c-silver: #c0c0c0;
  --c-voltage: #fff34d;
  --c-obsidian: #7a0026;
  --c-givre: #bfefff;
  --c-osseux: #e8dcc0;
  --c-fantome: #c8ffe6;
  --c-bonbon: #ff8aa5;
  --c-guirlande: #38ef7d;
  --c-lutin: #ffd23b;
}

/* ============================================================
1. RESET & BASE
============================================================ */
* { box-sizing: border-box; touch-action: manipulation; }
body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #0f051d; color: #fff; margin: 0; padding: 10px;
  text-align: center; overflow-x: hidden; user-select: none;
}
input, textarea, select { user-select: text; }
h1 { color: var(--c-primary); margin: 0; font-size: 16px; text-shadow: 0 0 15px rgba(0, 210, 255, 0.4); white-space: nowrap; cursor: pointer; }

/* ============================================================
2. HEADER UNIFIÉ
============================================================ */
.header-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; max-width: 400px; margin: 0 auto 6px auto; }
.header-bar h1 { order: 2; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.header-bar .user-pill { order: 1; justify-self: start; }
.header-bar .header-btns { order: 3; justify-self: end; }
#lang-btn, #mute-btn, #account-gear-btn { display: none; }
#control-center-btn { display: flex; }

/* ============================================================
3. USER-PILL (avatar + pseudo + titre)
============================================================ */
.user-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px; padding: 4px 12px 4px 5px;
  font-size: 11px; color: var(--c-primary); font-weight: bold;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  cursor: pointer; white-space: nowrap; max-width: 240px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); transition: all 0.3s ease;
}
#user-name-display { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
#user-title-display { width: 100%; font-size: 9px; font-weight: bold; color: var(--c-gold); white-space: normal; line-height: 1.2; text-align: center; letter-spacing: 0.3px; }

/* ============================================================
4. BARRE D'ÉCONOMIE (pièces/trophées/points + compteur en ligne)
============================================================ */
.user-stats {
  display: flex !important; flex-wrap: nowrap !important;
  align-items: center; justify-content: center; gap: 12px;
  width: fit-content; max-width: 96vw; margin: 6px auto 10px auto;
  font-size: 13px; font-weight: bold;
  background: rgba(255, 255, 255, 0.05); padding: 7px 12px; border-radius: 16px;
  white-space: nowrap; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; position: relative;
}
.user-stats::-webkit-scrollbar { display: none; }
.user-stats > span { flex: 0 0 auto; white-space: nowrap; }
.stat-delta {
  position: absolute; top: -8px; left: 50%;
  font-size: 13px; font-weight: 900; pointer-events: none; z-index: 60;
  text-shadow: 0 0 8px currentColor; animation: deltaFloat 1.5s ease forwards;
}
.stat-delta.up { color: #00ff88; }
.stat-delta.down { color: #ff4b2b; }
.online-stat { background: rgba(0, 210, 255, 0.12); border: 1px solid rgba(0, 210, 255, 0.35); border-radius: 20px; padding: 2px 10px; }
.online-stat strong { color: #00ff88; }
@keyframes deltaFloat {
  0% { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.8); }
  20% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-24px) scale(1); }
}

/* ============================================================
5. AVATARS TFT (container + frames + large + Lottie)
============================================================ */
.tft-avatar-container {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #1e1035, #3c1e69);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  overflow: visible; flex-shrink: 0;
}
.tft-avatar-container .lottie-avatar-badge { width: 40px !important; height: 40px !important; }
.tft-avatar-video { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; pointer-events: none; }
.tft-avatar-icon { font-size: 22px; font-weight: 900; z-index: 2; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); color: #fff; }
.tft-flag-overlay {
  position: absolute; bottom: -3px; right: -3px; font-size: 12px;
  background: #0f051d; border-radius: 50%; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.tft-avatar-large {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #1e1035, #3c1e69);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6); margin: 0 auto 8px auto;
}
.tft-avatar-large-icon { font-size: 26px; font-weight: 900; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.7)); color: #fff; }
.tft-flag-large-overlay {
  position: absolute; bottom: -2px; right: -2px; font-size: 16px;
  background: #0f051d; border-radius: 50%; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.4); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.8); z-index: 3;
}
.lottie-avatar-badge, .lottie-avatar-large { border-radius: 50%; overflow: hidden; }
.lottie-avatar-badge svg, .lottie-avatar-large svg { width: 100% !important; height: 100% !important; display: block; }

/* --- Cadres (générique via variables) --- */
.tft-avatar-container.standard-frame, .tft-avatar-large.standard-frame, .victory-badge-large.standard-frame,
.user-pill.standard-frame, .user-pill:has(.tft-avatar-container.standard-frame) {
  border-color: var(--c-primary) !important; box-shadow: 0 0 14px rgba(0, 210, 255, 0.6) !important;
}
.tft-avatar-container.silver-frame, .tft-avatar-large.silver-frame, .victory-badge-large.silver-frame,
.user-pill.silver-frame, .user-pill:has(.tft-avatar-container.silver-frame) {
  border-color: var(--c-silver) !important; box-shadow: 0 0 18px rgba(192, 192, 192, 0.8) !important;
  background: linear-gradient(135deg, #2a2a2a, #505050) !important;
}
.tft-avatar-container.gold-frame, .tft-avatar-large.gold-frame,
.user-pill.gold-frame, .user-pill:has(.tft-avatar-container.gold-frame) {
  border-color: var(--c-gold) !important; box-shadow: 0 0 24px rgba(248, 181, 0, 0.9) !important;
  background: linear-gradient(135deg, #3a2500, #694b00) !important;
  animation: goldPillPulse 2.5s infinite ease-in-out;
}
.tft-avatar-container.chroma-frame, .tft-avatar-large.chroma-frame, .victory-badge-large.chroma-frame,
.user-pill.chroma-frame, .user-pill:has(.tft-avatar-container.chroma-frame) {
  border-color: transparent !important; box-shadow: 0 0 20px rgba(255, 0, 200, 0.8) !important;
  background: linear-gradient(90deg, #ff00c8, #00d2ff, #ffe600, #ff00c8) !important;
  background-size: 300% 100%; animation: chromaFlow 4s linear infinite;
}
.tft-avatar-container.prism-frame, .tft-avatar-large.prism-frame, .victory-badge-large.prism-frame,
.user-pill.prism-frame, .user-pill:has(.tft-avatar-container.prism-frame) {
  border-color: #ffffff !important;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.9), 0 0 30px rgba(248, 181, 0, 0.6) !important;
  background: linear-gradient(135deg, #fff6d5, #f8b500, #fff6d5, #00d2ff) !important;
  background-size: 250% 250%; animation: prismShimmer 3s ease-in-out infinite;
}
.tft-avatar-container.voltage-frame, .tft-avatar-large.voltage-frame, .victory-badge-large.voltage-frame,
.user-pill.voltage-frame, .user-pill:has(.tft-avatar-container.voltage-frame) {
  border-color: var(--c-voltage) !important; box-shadow: 0 0 20px rgba(255, 243, 77, 0.9) !important;
  background: linear-gradient(135deg, #282805, #5a550a) !important;
  animation: voltageFlicker 1.4s infinite steps(2, jump-none);
}
.tft-avatar-container.obsidian-frame, .tft-avatar-large.obsidian-frame, .victory-badge-large.obsidian-frame,
.user-pill.obsidian-frame, .user-pill:has(.tft-avatar-container.obsidian-frame) {
  border-color: var(--c-obsidian) !important; box-shadow: 0 0 20px rgba(255, 0, 60, 0.8) !important;
  background: linear-gradient(135deg, #0a050a, #23050f) !important;
  animation: obsidianPulse 3s infinite ease-in-out;
}
.tft-avatar-container.givre-frame, .tft-avatar-large.givre-frame, .victory-badge-large.givre-frame,
.user-pill.givre-frame, .user-pill:has(.tft-avatar-container.givre-frame) {
  border-color: var(--c-givre) !important; box-shadow: 0 0 18px rgba(191, 239, 255, 0.9) !important;
  background: linear-gradient(135deg, #0a2a4d, #0ea5c9) !important;
}
.tft-avatar-container.osseux-frame, .tft-avatar-large.osseux-frame, .victory-badge-large.osseux-frame {
  border-color: var(--c-osseux) !important; box-shadow: 0 0 18px rgba(232, 220, 192, 0.85) !important;
  background: linear-gradient(135deg, #2b2b2b, #e8dcc0) !important;
}
.tft-avatar-container.fantome-frame, .tft-avatar-large.fantome-frame, .victory-badge-large.fantome-frame {
  border-color: var(--c-fantome) !important; box-shadow: 0 0 18px rgba(180, 255, 220, 0.85) !important;
  background: linear-gradient(135deg, #0a2a1d, #b8ffd9) !important;
}
@keyframes goldPillPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(248, 181, 0, 0.6), inset 0 0 6px rgba(248, 181, 0, 0.4); }
  50% { box-shadow: 0 0 24px rgba(248, 181, 0, 1), inset 0 0 12px rgba(248, 181, 0, 0.8); }
}
@keyframes voltageFlicker {
  0%, 100% { box-shadow: 0 0 14px rgba(255, 243, 77, 0.6); }
  50% { box-shadow: 0 0 26px rgba(255, 243, 77, 1), inset 0 0 12px rgba(255, 255, 255, 0.6); }
}
@keyframes obsidianPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(122, 0, 38, 0.6); }
  50% { box-shadow: 0 0 22px rgba(255, 0, 60, 0.9); }
}
@keyframes chromaFlow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
@keyframes prismShimmer { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }

/* ============================================================
6. VICTOIRE / DÉFAITE
============================================================ */
.victory-avatar-showcase {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 15px 0; animation: victoryScalePop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes victoryScalePop {
  0% { transform: scale(0.2); opacity: 0; filter: brightness(3); }
  70% { transform: scale(1.1); opacity: 1; filter: brightness(1.2); }
  100% { transform: scale(1); opacity: 1; filter: brightness(1); }
}
.victory-badge-large {
  position: relative; width: 90px; height: 90px; border-radius: 50%;
  background: linear-gradient(135deg, #1e1035, #00d2ff);
  border: 4px solid #00d2ff;
  box-shadow: 0 0 35px rgba(0, 210, 255, 0.8), 0 0 15px #fff;
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
  animation: badgeGlowPulse 2s infinite alternate;
}
.victory-badge-large.gold { background: linear-gradient(135deg, #3a2500, #f8b500); border-color: #f8b500; box-shadow: 0 0 40px rgba(248, 181, 0, 0.9), 0 0 20px #fff; }
@keyframes badgeGlowPulse {
  0% { box-shadow: 0 0 20px rgba(0, 210, 255, 0.6); }
  100% { box-shadow: 0 0 35px rgba(0, 210, 255, 1), 0 0 15px rgba(255, 255, 255, 0.8); }
}
.defeat-theme {
  background: rgba(20, 5, 15, 0.98) !important; border-color: #ff4b2b !important;
  box-shadow: 0 0 30px rgba(255, 75, 43, 0.4), inset 0 0 15px rgba(100, 0, 50, 0.5) !important;
  animation: defeatGlitch 0.4s ease;
}
@keyframes defeatGlitch {
  0% { transform: scale(0.95); filter: saturate(0.5); }
  50% { transform: scale(1.02); filter: hue-rotate(-20deg); }
  100% { transform: scale(1); filter: saturate(0.8); }
}

/* ============================================================
7. ÉMOTICÔNES
============================================================ */
.emote-bubble { position: absolute; font-size: 30px; z-index: 9999; pointer-events: none; animation: emoteFlyUp 1.6s ease-out forwards; }
@keyframes emoteFlyUp {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  20% { transform: translateY(-25px) scale(1.1); opacity: 1; }
  80% { transform: translateY(-80px) scale(1); opacity: 1; }
  100% { transform: translateY(-120px) scale(0.7); opacity: 0; }
}
.emote-bar { display: flex; justify-content: center; gap: 8px; margin: 8px auto; background: rgba(0, 0, 0, 0.3); padding: 6px 10px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.1); max-width: 320px; }
.emote-btn { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; width: 36px; height: 36px; font-size: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.1s; }
.emote-btn:active { transform: scale(1.25); background: rgba(0, 210, 255, 0.3); }

/* ============================================================
8. BOUTONS
============================================================ */
.header-btns { display: flex; gap: 4px; align-items: center; }
.icon-btn { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; border-radius: 10px; padding: 0 8px; height: 32px; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; font-weight: 800; }
.menu-container { display: flex; flex-direction: column; gap: 8px; max-width: 350px; margin: 10px auto; }
.btn-main { background: linear-gradient(45deg, #ff416c, #ff4b2b); color: white; border: none; padding: 12px 16px; font-size: 15px; font-weight: 800; border-radius: 14px; cursor: pointer; box-shadow: 0 4px 15px rgba(255, 65, 108, 0.3); transition: transform 0.1s; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.btn-main:active { transform: scale(0.96); }
.btn-blue { background: linear-gradient(45deg, #00c6ff, #0072ff); box-shadow: 0 4px 15px rgba(0, 198, 255, 0.3); }
.btn-gold { background: linear-gradient(45deg, #f8b500, #fceabb); color: #222; box-shadow: 0 4px 15px rgba(248, 181, 0, 0.3); }
.btn-purple { background: linear-gradient(45deg, #7b4397, #dc2430); box-shadow: 0 4px 15px rgba(123, 67, 97, 0.3); }
.btn-shop { background: linear-gradient(45deg, #11998e, #38ef7d); color: #000; box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3); }
.btn-avalanche-main { background: linear-gradient(45deg, #0072ff, #7b4397); box-shadow: 0 4px 15px rgba(123, 67, 151, 0.3); color: #fff; }
.btn-avalanche-easy { background: linear-gradient(45deg, #11998e, #38ef7d); color: #000; }
.btn-avalanche-medium { background: linear-gradient(45deg, #f8b500, #fceabb); color: #222; }
.btn-avalanche-hard { background: linear-gradient(45deg, #ff416c, #ff4b2b); color: #fff; }
.btn-reward { background: linear-gradient(45deg, #f12711, #f5af19); color: #fff; box-shadow: 0 4px 15px rgba(245, 175, 25, 0.3); margin-bottom: 8px; width: 100%; font-size: 13px; padding: 10px; }
.btn-secondary { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: #ccc; padding: 8px 16px; border-radius: 10px; font-weight: bold; cursor: pointer; margin-top: 8px; width: 100%; }
.btn-power-hud { background: linear-gradient(45deg, #ff8a00, #e52e71); color: #fff; border: none; padding: 6px 12px; border-radius: 10px; font-weight: 900; font-size: 12px; cursor: pointer; box-shadow: 0 0 10px rgba(255, 138, 0, 0.4); margin-bottom: 6px; transition: transform 0.1s; }
.btn-power-hud:active { transform: scale(0.95); }
.btn-power-hud:disabled { filter: grayscale(1); opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* ============================================================
9. MODALS & ONGLETS
============================================================ */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; padding: 15px; }
.modal-card { background: #1e1035; border: 2px solid #00d2ff; border-radius: 16px; padding: 16px; max-width: 410px; width: 100%; max-height: 85vh; display: flex; flex-direction: column; overflow-y: auto; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.tab-btn { flex: 1; min-width: 75px; padding: 6px 2px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1); color: #aaa; border-radius: 8px; font-weight: bold; font-size: 10px; cursor: pointer; transition: all 0.2s; }
.tab-btn.active { background: #00d2ff; color: #000; border-color: #00d2ff; }
.event-banner { background: linear-gradient(45deg, rgba(255, 138, 0, 0.2), rgba(255, 65, 108, 0.2)); border: 1px solid #ff8a00; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; text-align: left; font-size: 11px; color: #ffd27f; display: none; }
.event-banner b { color: #fff; }

/* ============================================================
10. CLASSEMENT
============================================================ */
.lb-filters-container { background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 10px 10px 4px 10px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.lb-filters-container .tabs { margin-bottom: 6px; gap: 6px; }
.lb-filters-container .tab-btn { padding: 9px 6px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, 0.05); color: #bbb; }
.lb-filters-container .tab-btn.active { background: #00d2ff; color: #000; box-shadow: 0 0 10px rgba(0, 210, 255, 0.4); }
.leaderboard-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; text-align: left; padding-right: 2px; }
.lb-row { display: flex; align-items: center; justify-content: space-between; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); padding: 10px 12px; border-radius: 12px; gap: 10px; transition: background 0.2s; }
.lb-row:hover { background: rgba(255, 255, 255, 0.07); }
.lb-rank { font-weight: 900; font-size: 14px; width: 26px; text-align: center; flex-shrink: 0; }
.lb-user-info { flex: 1; display: flex; flex-direction: column; overflow: hidden; gap: 4px; }
.lb-name-row { display: flex; align-items: center; gap: 6px; font-weight: bold; font-size: 13px; color: #fff; }
.lb-sub-details { font-size: 12px; color: #d0c5e2; display: flex; gap: 10px; font-weight: 700; }
.lb-pts { font-weight: 900; font-size: 13px; text-align: right; white-space: nowrap; flex-shrink: 0; }
.lb-clickable-name { cursor: pointer; }
.lb-clickable-name:hover { color: #f8b500; text-decoration: underline; }

/* ============================================================
11. SALONS & AMIS
============================================================ */
.rooms-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.room-row { display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, 0.05); padding: 8px 10px; border-radius: 8px; font-size: 12px; gap: 4px; }
.room-info { flex: 1; font-weight: bold; margin-left: 8px; display: flex; align-items: center; gap: 6px; }
.friend-card { display: flex; align-items: center; justify-content: space-between; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); padding: 8px 12px; border-radius: 12px; transition: background 0.2s; }
.friend-card:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(0, 210, 255, 0.3); }

/* ============================================================
12. BOUTIQUE
============================================================ */
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; overflow-y: auto; max-height: 50vh; margin: 8px 0; padding-right: 4px; }
.power-card { background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; justify-content: space-between; }
.power-card.equipped { border-color: #00ff88; background: rgba(0, 255, 136, 0.1); }
.power-card h4 { margin: 0 0 4px 0; font-size: 12px; color: #00d2ff; }
.power-card p { font-size: 10px; color: #aaa; margin: 0 0 6px 0; }
.stock-badge { font-size: 10px; font-weight: bold; color: #38ef7d; margin-bottom: 4px; }
.power-btn { padding: 5px 8px; border-radius: 6px; border: none; font-weight: bold; font-size: 11px; cursor: pointer; margin-top: 2px; }
.power-btn.buy { background: #f8b500; color: #000; }
.power-btn.equip { background: #00d2ff; color: #000; }
.power-btn.active { background: #00ff88; color: #000; }
.power-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
13. PASSE DE SAISON — DA "BRAWL STARS" (UN SEUL bloc)
============================================================ */
#modal-blitz-pass { padding: 0; }
#modal-blitz-pass .modal-card {
  width: 96vw !important; max-width: 96vw !important;
  height: 92vh !important; max-height: 92vh !important;
  display: flex !important; flex-direction: column !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(0,210,255,.18), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(255,0,127,.15), transparent 50%),
    linear-gradient(160deg, #0b0620 0%, #1a0b38 45%, #0b0620 100%) !important;
  border: 2px solid rgba(248,181,0,.6) !important;
  border-radius: 20px !important; overflow: hidden !important;
  box-shadow: 0 0 60px rgba(0,0,0,.6);
}
#modal-blitz-pass h2 { font-size: 20px !important; }
#pass-modal-season { font-size: 12px !important; padding: 4px 10px !important; }
#modal-blitz-pass .bp-header-banner {
  background: linear-gradient(90deg, transparent, rgba(248,181,0,.18), transparent);
  border: none; border-bottom: 2px solid rgba(248,181,0,.4);
  border-radius: 0; padding: 14px;
}
#modal-blitz-pass .bp-header-banner > div:nth-child(1) { font-size: 18px !important; }
#modal-blitz-pass .bp-header-banner > div:nth-child(2) { font-size: 12px !important; }
#modal-blitz-pass .bp-header-banner > div:nth-child(3),
#modal-blitz-pass .bp-header-banner > div:nth-child(4) { font-size: 13px !important; }
#blitz-pass-container {
  flex: 1 !important; max-height: none !important; overflow: hidden !important;
  display: flex !important; flex-direction: column !important; min-height: 0;
}
.bp-track-scroll { flex: 1; display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden; padding: 22px 16px; align-items: stretch; position: relative; }
.bp-track-scroll::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 6px; background: rgba(0,0,0,.5); border-radius: 3px; }
.bp-tier-col { flex: 0 0 185px; display: flex; flex-direction: column; align-items: stretch; gap: 8px; position: relative; z-index: 1; }
.bp-cell { position: relative; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 14px 6px 8px; cursor: pointer; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.bp-cell:active { transform: scale(0.97); }
.bp-cell.bp-prem {
  min-height: 200px;
  background: linear-gradient(180deg, #4db8ff 0%, #0a84ff 55%, #0060df 100%);
  border: 3px solid #ffd23b;
  box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 22px rgba(255,210,59,.5);
  transform: rotate(-1.5deg);
}
.bp-cell.bp-prem:hover { transform: rotate(-1.5deg) translateY(-6px) scale(1.04); }
.bp-cell.bp-free {
  min-height: 120px;
  background: linear-gradient(180deg, #3a6ea5 0%, #274e79 100%);
  border: 2px solid #7be8ff;
  box-shadow: 0 4px 0 rgba(0,0,0,.35);
  transform: rotate(1deg);
}
.bp-cell.bp-free:hover { transform: rotate(1deg) translateY(-4px) scale(1.05); }
.bp-cell.claimed { filter: grayscale(.6) brightness(.75); }
.bp-cell.claimed::after {
  content: '✔'; position: absolute; top: 16px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #00ff88; color: #00301a;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; box-shadow: 0 0 10px rgba(0,255,136,.8); z-index: 3;
}
.bp-ribbon { position: absolute; top: 0; left: 0; right: 0; text-align: center; font-size: 8px; font-weight: 900; letter-spacing: 1px; padding: 2px 0; background: linear-gradient(90deg, #ffd23b, #ff9d00); color: #3a2000; }
.bp-ribbon.free { background: linear-gradient(90deg, #7be8ff, #00a2c7); color: #00303a; }
.bp-tier-num { width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; background: #111; color: #fff; font-weight: 900; font-size: 14px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.4); z-index: 2; }
.bp-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 70px; }
.bp-emoji { font-size: 40px; filter: drop-shadow(0 0 8px rgba(255,255,255,.5)); }
.bp-label { font-size: 9px; color: #fff; line-height: 1.2; text-align: center; }
.bp-type { font-size: 10px; font-weight: 900; letter-spacing: 2px; color: #fff; text-transform: uppercase; text-shadow: 0 0 8px rgba(0,210,255,.9); }
.bp-swatch { width: 60px; height: 60px; border-radius: 10px; border: 3px solid rgba(255,255,255,.4); box-shadow: 0 0 12px rgba(0,0,0,.5); }
.bp-title { font-size: 10px; color: #ffe600; font-weight: bold; text-align: center; line-height: 1.2; padding: 0 2px; }
.bp-visual .lottie-avatar-badge { width: 60px !important; height: 60px !important; }
.bp-visual .tft-avatar-video { width: 60px !important; height: 60px !important; }
.bp-visual .tft-avatar-container { width: 56px !important; height: 56px !important; }
.bp-unlock { animation: bpPop .5s cubic-bezier(.2,1.6,.4,1); }
.bp-burst { position: fixed; z-index: 9999; pointer-events: none; font-size: 18px; animation: bpBurst .9s ease forwards; }
@keyframes bpPop { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes bpBurst { 0% { opacity: 1; transform: translate(0,0) scale(.6); } 100% { opacity: 0; transform: translate(var(--dx),var(--dy)) scale(1.3); } }

/* ============================================================
14. HUD / GRILLE / TUILES
============================================================ */
.hud { display: grid; grid-template-columns: 1fr; gap: 6px; background: rgba(255, 255, 255, 0.06); padding: 6px 10px; border-radius: 10px; margin-bottom: 6px; max-width: 400px; margin-left: auto; margin-right: auto; }
.player-box { padding: 4px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.3); }
.player-box.me { border: 2px solid #00d2ff; }
.player-box.opponent { border: 2px solid #ff007f; }
#hud-solo, #hud-1v1 { width: var(--game-width) !important; margin: 0 auto !important; box-sizing: border-box !important; }
.grid {
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  width: var(--game-width) !important; max-width: 94vw !important;
  gap: clamp(6px, 1.2vw, 10px) !important; margin: 12px auto !important; padding: 0 !important;
  box-sizing: border-box !important; transition: transform 0.2s, filter 0.2s;
}
.tile {
  background: #2a1845; border: 2px solid #522d80; border-radius: 12px;
  width: auto !important; min-width: 0 !important; height: auto !important; aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(16px, 3.2vw, 26px) !important; font-weight: 900;
  cursor: pointer; transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
  position: relative; overflow: hidden; box-sizing: border-box !important;
}
.tile:active { transform: scale(0.92); background: #3c1e69; }
.tile.empty { background: rgba(255, 255, 255, 0.02); border-color: rgba(255, 255, 255, 0.05); cursor: default; }
.tile::after {
  content: ''; position: absolute; width: 20px; height: 20px;
  background: rgba(0, 210, 255, 0.6); border-radius: 50%;
  transform: scale(0); opacity: 1; pointer-events: none;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}
.tile.ripple-active::after { transform: scale(8); opacity: 0; }

/* --- Thèmes de grille --- */
.tile.alt-theme { background: linear-gradient(135deg, #f8b500, #ff8a00) !important; border-color: #ffe600 !important; color: #111 !important; box-shadow: 0 0 12px rgba(248, 181, 0, 0.6); }
.tile.glacial-theme { background: linear-gradient(135deg, #0a2a4d, #0ea5c9) !important; border-color: #7be8ff !important; color: #eafcff !important; box-shadow: 0 0 12px rgba(14, 165, 201, 0.6); }
.tile.eclair-theme { background: linear-gradient(135deg, #282805, #fff34d) !important; border-color: #fff34d !important; color: #111 !important; box-shadow: 0 0 12px rgba(255, 243, 77, 0.6); }
.tile.neon-theme { background: linear-gradient(135deg, #ff007f, #00e5ff, #76ff03, #ffea00, #9d75cb) !important; background-size: 400% 400% !important; animation: neonShift 3s linear infinite !important; border-color: #00e5ff !important; color: #0a001a !important; box-shadow: 0 0 12px rgba(0, 229, 255, 0.6); }
.tile.obsidian-theme { background: linear-gradient(135deg, #0a050a, #23050f) !important; border-color: #7a0026 !important; color: #ff4d6d !important; box-shadow: 0 0 12px rgba(255, 0, 60, 0.5); }
.tile.citrouille-theme { background: linear-gradient(135deg, #1a0d00, #ff8a00) !important; border-color: #ff8a00 !important; color: #fff !important; }
.tile.fantome-theme { background: linear-gradient(135deg, #1a0033, #7b2ff7) !important; border-color: #7b2ff7 !important; color: #fff !important; }
.tile.bonbon-theme { background: linear-gradient(135deg, #ff4b4b, #fff) !important; border-color: #ff4b4b !important; color: #222 !important; }
.tile.sapin-theme { background: linear-gradient(135deg, #0a3d1f, #1a7a3c) !important; border-color: #1a7a3c !important; color: #fff !important; }
.tile.lutin-theme { background: linear-gradient(135deg, #c62828, #ffd23b) !important; border-color: #ffd23b !important; color: #fff !important; }
@keyframes neonShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* --- Tuiles spéciales (pouvoirs) --- */
.tile.highlight-target { background: radial-gradient(circle, #00ff88 0%, #00d2ff 100%) !important; color: #000 !important; border-color: #00ff88 !important; box-shadow: 0 0 20px #00ff88, 0 0 40px rgba(0, 255, 136, 0.6) !important; transform: scale(1.15); animation: highlightPulse 0.5s ease infinite alternate; z-index: 10; position: relative; }
.tile.frozen, #game-timer.frozen { background: rgba(0, 210, 255, 0.3) !important; border-color: #00d2ff !important; box-shadow: 0 0 15px rgba(0, 210, 255, 0.6) !important; }
#game-timer.frozen { color: #00d2ff !important; text-shadow: 0 0 8px #00d2ff; animation: pulseAudio 0.5s infinite; }
@keyframes highlightPulse {
  0% { box-shadow: 0 0 20px #00ff88, 0 0 40px rgba(0, 255, 136, 0.4); }
  100% { box-shadow: 0 0 30px #00ff88, 0 0 60px rgba(0, 255, 136, 0.8); }
}

/* --- Effets malus --- */
.grid.effect-quake { animation: quake 0.15s infinite; }
.grid.effect-micro .tile { transform: scale(0.65); }
.grid.effect-eclipse { filter: brightness(0) blur(8px); pointer-events: none; }

/* ============================================================
15. MATCHMAKING / COUNTDOWN / PUB
============================================================ */
.matchmaking-loader { display: flex; flex-direction: column; align-items: center; margin-top: 30px; }
.radar-box { position: relative; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; }
.radar-ring { position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 3px solid transparent; border-top-color: #00d2ff; border-right-color: #ff007f; animation: radarSpin 1.2s linear infinite; }
.radar-num { font-size: 26px; font-weight: 900; color: #00d2ff; }
#countdown-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 5, 29, 0.95); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 100; }
.countdown-num { font-size: 80px; font-weight: 900; color: #00d2ff; animation: countZoom 0.9s infinite alternate; }
.ad-timer-circle { width: 60px; height: 60px; border-radius: 50%; border: 3px solid #00d2ff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; margin-bottom: 20px; color: #00d2ff; }
@keyframes radarSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes countZoom { 0% { transform: scale(0.9); } 100% { transform: scale(1.1); text-shadow: 0 0 20px #00d2ff; } }
@keyframes pulseAudio { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }
@keyframes quake { 0% { transform: translate(2px, 2px); } 50% { transform: translate(-2px, -2px); } 100% { transform: translate(2px, -2px); } }
@keyframes toastFade {
  0% { opacity: 0; transform: translateY(-15px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-15px); }
}

/* ============================================================
16. SYSTÈME COMBO (fissures, bannière, particules)
============================================================ */
#combo-cracks-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
#screen-game { position: relative; z-index: 2; }
.combo-crack { position: absolute; top: 0; left: 0; filter: drop-shadow(0 0 8px currentColor); opacity: 0.95; }
.combo-crack polyline { stroke-dasharray: 500; stroke-dashoffset: 500; animation: crackDraw 0.4s ease forwards; }
.combo-crack .crack-main { stroke-dasharray: 600; stroke-dashoffset: 600; animation: crackDraw 0.5s ease forwards; }
.combo-crack .crack-inner { stroke-dasharray: 600; stroke-dashoffset: 600; animation: crackDraw 0.5s 0.1s ease forwards; opacity: 0.6; }
.combo-crack .crack-branch { stroke-dasharray: 200; stroke-dashoffset: 200; animation: crackDraw 0.4s 0.2s ease forwards; opacity: 0.7; }
@keyframes crackDraw { to { stroke-dashoffset: 0; } }
#combo-banner { position: fixed; top: 18%; left: 50%; transform: translateX(-50%); z-index: 9998; font-size: 32px; font-weight: 900; letter-spacing: 2px; text-shadow: 0 0 20px currentColor, 0 0 40px currentColor; pointer-events: none; animation: comboBannerPop 1.4s ease forwards; }
@keyframes comboBannerPop {
  0% { transform: translateX(-50%) scale(0.4); opacity: 0; }
  20% { transform: translateX(-50%) scale(1.25); opacity: 1; }
  70% { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) scale(0.9); opacity: 0; }
}
.grid.combo-tier1 { box-shadow: 0 0 20px var(--combo-color, #00d2ff), inset 0 0 10px var(--combo-color, #00d2ff); border-radius: 14px; border: 2px solid var(--combo-color, #00d2ff); }
.grid.combo-tier2 { box-shadow: 0 0 32px var(--combo-color, #00d2ff), inset 0 0 18px var(--combo-color, #00d2ff); border-radius: 14px; border: 3px solid var(--combo-color, #00d2ff); animation: comboPulse 0.6s infinite alternate; }
.grid.combo-perfection { box-shadow: 0 0 50px #fff, 0 0 90px var(--combo-color, #f8b500), inset 0 0 30px #fff; border-radius: 14px; border: 4px solid #fff; animation: perfectionFlash 0.12s infinite alternate; }
@keyframes comboPulse { from { transform: scale(1); filter: brightness(1); } to { transform: scale(1.025); filter: brightness(1.2); } }
@keyframes perfectionFlash { from { filter: brightness(1) saturate(1); } to { filter: brightness(1.9) saturate(1.5); } }
.explosion-particle { position: fixed; top: 50%; left: 50%; font-size: 28px; z-index: 9999; pointer-events: none; animation: explode 1.1s ease-out forwards; }
@keyframes explode { from { transform: translate(0, 0) scale(0.5); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1.8); opacity: 0; } }
.perfection-flash { position: fixed; inset: 0; z-index: 9997; pointer-events: none; animation: flashFade 0.7s ease forwards; }
@keyframes flashFade { 0% { opacity: 1; } 100% { opacity: 0; } }
.shard-particle { position: fixed; width: 14px; height: 18px; z-index: 9998; pointer-events: none; clip-path: polygon(50% 0%, 100% 60%, 70% 100%, 0% 40%); animation: shardFly 1.1s cubic-bezier(0.1, 0.6, 0.4, 1) forwards; }
@keyframes shardFly {
  0% { transform: translate(-50%, -50%) rotate(0deg); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)); opacity: 0; }
}
#combo-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; opacity: 0; transition: opacity 0.6s ease; }
#combo-bg.active { opacity: 1; }
#combo-bg.gold { background: radial-gradient(circle at 50% 65%, rgba(248, 181, 0, 0.28), rgba(248, 181, 0, 0.08) 45%, transparent 75%); animation: comboBgMove 5s ease-in-out infinite alternate; }
#combo-bg.glacial { background: radial-gradient(circle at 50% 65%, rgba(123, 232, 255, 0.28), rgba(123, 232, 255, 0.08) 45%, transparent 75%); animation: comboBgMove 6s ease-in-out infinite alternate; }
#combo-bg.electric { background: radial-gradient(circle at 50% 65%, rgba(0, 210, 255, 0.25), rgba(255, 0, 127, 0.08) 45%, transparent 75%); animation: comboBgMove 4s ease-in-out infinite alternate; }
@keyframes comboBgMove { 0% { transform: scale(1) translateY(0); } 100% { transform: scale(1.2) translateY(-4%); } }
#combo-hud { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: none; align-items: center; gap: 6px; pointer-events: none; z-index: 5; }
#combo-count { font-size: 16px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 0 8px currentColor; }
#combo-timer-bar { width: 60px; height: 5px; background: rgba(255, 255, 255, 0.15); border-radius: 4px; overflow: hidden; }
#combo-timer-fill { height: 100%; width: 100%; background: currentColor; border-radius: 4px; box-shadow: 0 0 6px currentColor; }
#combo-coins-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.combo-coin { position: absolute; animation: coinFall cubic-bezier(0.25, 0.4, 0.6, 1) forwards; filter: drop-shadow(0 0 6px rgba(248, 181, 0, 0.8)); }
@keyframes coinFall { 0% { transform: translateY(-110vh) rotate(0deg); } 100% { transform: translateY(0) rotate(540deg); } }

/* ============================================================
17. SALLE DES TROPHÉES
============================================================ */
.trophy-room-card { background: linear-gradient(135deg, #0f051d 0%, #1a0033 100%); border: 2px solid #00d2ff; border-radius: 16px; padding: 20px; max-width: 720px; width: 92vw; max-height: 85vh; overflow-y: auto; box-shadow: 0 0 40px rgba(0, 210, 255, 0.4); animation: roomCardIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes roomCardIn { 0% { transform: scale(0.7) translateY(40px); opacity: 0; filter: blur(6px); } 100% { transform: scale(1) translateY(0); opacity: 1; filter: blur(0); } }
.trophy-room-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(0, 210, 255, 0.3); padding-bottom: 12px; margin-bottom: 16px; }
.trophy-room-owner { display: flex; align-items: center; }
.trophy-shelf { margin-bottom: 20px; }
.trophy-shelf-title { font-size: 12px; letter-spacing: 3px; color: #00d2ff; margin-bottom: 10px; text-align: center; text-shadow: 0 0 8px #00d2ff; }
.trophy-shelf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.trophy-vitrine { position: relative; aspect-ratio: 1; background: linear-gradient(180deg, rgba(0, 210, 255, 0.05) 0%, rgba(0, 210, 255, 0.15) 100%); border: 1px solid rgba(0, 210, 255, 0.3); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; overflow: hidden; }
.trophy-vitrine:hover { transform: translateY(-3px) scale(1.03); }
.trophy-vitrine.locked { filter: grayscale(1) brightness(0.4); }
.trophy-vitrine .trophy-emoji { font-size: 32px; filter: drop-shadow(0 0 6px currentColor); }
.trophy-vitrine .trophy-name { font-size: 9px; color: #fff; margin-top: 4px; text-align: center; font-weight: 700; padding: 0 4px; }
.trophy-vitrine .trophy-lock { position: absolute; top: 4px; right: 4px; font-size: 12px; }
.trophy-vitrine.rarity-bronze { box-shadow: 0 0 12px rgba(255, 138, 0, 0.5); border-color: #ff8a00; color: #ff8a00; }
.trophy-vitrine.rarity-silver { box-shadow: 0 0 12px rgba(200, 230, 255, 0.6); border-color: #c8e6ff; color: #c8e6ff; }
.trophy-vitrine.rarity-gold { box-shadow: 0 0 16px rgba(248, 181, 0, 0.7); border-color: #f8b500; color: #f8b500; }
.trophy-vitrine.rarity-legendary { box-shadow: 0 0 20px rgba(255, 0, 200, 0.8), 0 0 40px rgba(0, 210, 255, 0.4); border-color: #ff00c8; color: #ff00c8; animation: legendaryPulse 2s infinite; }
@keyframes legendaryPulse { 0%, 100% { box-shadow: 0 0 20px rgba(255, 0, 200, 0.8), 0 0 40px rgba(0, 210, 255, 0.4); } 50% { box-shadow: 0 0 30px rgba(255, 0, 200, 1), 0 0 60px rgba(0, 210, 255, 0.7); } }
@keyframes trophyBurst { 0% { transform: translateX(-50%) scale(0.3); opacity: 0; } 50% { transform: translateX(-50%) scale(1.15); opacity: 1; } 100% { transform: translateX(-50%) scale(1); opacity: 1; } }
.trophy-tooltip { position: fixed; background: #0f051d; border: 1px solid #00d2ff; border-radius: 8px; padding: 10px; font-size: 11px; color: #fff; z-index: 10000; pointer-events: none; max-width: 200px; box-shadow: 0 0 20px rgba(0, 210, 255, 0.5); }
.btn-trophy-room { position: relative; width: 100%; margin: 10px 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 18px; background: linear-gradient(135deg, #1a0f00 0%, #2b1a00 50%, #1a0f00 100%); border: 2px solid #f8b500; border-radius: 14px; color: #f8b500; font-weight: 900; font-size: 15px; letter-spacing: 2px; cursor: pointer; overflow: hidden; animation: trophyBannerPulse 2.5s infinite; transition: transform 0.15s; }
.btn-trophy-room:hover { transform: scale(1.03); }
.btn-trophy-room .trophy-room-icon { font-size: 22px; filter: drop-shadow(0 0 6px rgba(248, 181, 0, 0.9)); }
.btn-trophy-room .trophy-room-shine { position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 230, 150, 0.35), transparent); transform: skewX(-20deg); animation: bannerShine 3s infinite; }
@keyframes bannerShine { 0% { left: -60%; } 60%, 100% { left: 130%; } }
@keyframes trophyBannerPulse { 0%, 100% { box-shadow: 0 0 14px rgba(248, 181, 0, 0.3), inset 0 0 20px rgba(248, 181, 0, 0.06); } 50% { box-shadow: 0 0 26px rgba(248, 181, 0, 0.55), inset 0 0 28px rgba(248, 181, 0, 0.12); } }
.trophy-enter-flash { position: fixed; inset: 0; z-index: 10002; background: radial-gradient(circle, #2b1a00 0%, #0f051d 70%); display: flex; align-items: center; justify-content: center; font-size: 90px; pointer-events: none; animation: enterRoom 1s ease forwards; }
@keyframes enterRoom { 0% { opacity: 0; transform: scale(0.5); } 40% { opacity: 1; transform: scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(1.2); } }

/* ============================================================
18. FOND ANIMÉ DU MENU
============================================================ */
#bg-fx { position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; z-index: -1; opacity: 0; transition: opacity 0.8s ease; }
#bg-glow { position: absolute; top: 50%; left: 50%; width: 120vmax; height: 120vmax; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(0, 210, 255, 0.10) 0%, rgba(255, 0, 127, 0.05) 40%, transparent 70%); opacity: 0.08; transition: opacity 0.5s ease; }
.bg-shape { position: absolute; top: 110%; opacity: 0.14; animation: bgFloat linear infinite; text-shadow: 0 0 12px currentColor; }
@keyframes bgFloat { 0% { transform: translateY(0) rotate(0deg); } 100% { transform: translateY(-130vh) rotate(360deg); } }

/* ============================================================
19. PANEL ADMIN FLOTTANT
============================================================ */
#admin-modal.admin-floating { background: transparent; pointer-events: none; align-items: flex-start; justify-content: flex-end; padding: 10px; }
#admin-modal.admin-floating .modal-card { pointer-events: auto; width: 350px !important; max-width: 94vw !important; max-height: 85vh; overflow-y: auto; padding: 16px !important; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8); }
#admin-modal .modal-card.admin-minimized > *:not(.admin-drag-bar) { display: none; }
#admin-modal .modal-card.admin-minimized { max-height: none; overflow: hidden; }
.admin-drag-bar { cursor: grab; background: rgba(0, 210, 255, 0.15); border: 1px solid #00d2ff; border-radius: 8px; padding: 5px 8px; font-size: 10px; font-weight: 900; color: #00d2ff; margin-bottom: 8px; user-select: none; touch-action: none; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: center; gap: 8px; }
.admin-drag-bar:active { cursor: grabbing; }
.admin-min-btn { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; border-radius: 6px; padding: 0 8px; font-size: 12px; cursor: pointer; }

/* ============================================================
20. BADGE MODE DE JEU
============================================================ */
#game-mode-badge { font-family: inherit; }

/* ============================================================
21. RESPONSIVE
============================================================ */
@media (min-width: 601px) {
  .header-bar { max-width: 520px; }
  .header-bar h1 { font-size: 19px; }
  #game-mode-badge { font-size: 10px !important; padding: 4px 12px !important; }
}
@media (min-width: 601px) and (max-width: 900px) {
  #game-mode-badge { font-size: 10px !important; padding: 4px 12px !important; }
}
@media (min-width: 768px) {
  #admin-modal .modal-card { max-width: 650px !important; padding: 24px !important; }
  #admin-dashboard-section > div { display: grid; grid-template-columns: 1fr; gap: 8px; }
}
@media (min-width: 901px) {
  #game-mode-badge { font-size: 11px !important; padding: 5px 14px !important; }
}
@media (max-width: 700px) {
  #blitz-pass-container { overflow-y: auto !important; }
  .bp-track-scroll { flex-direction: column; overflow-x: visible; overflow-y: visible; gap: 18px; }
  .bp-track-scroll::before { left: 50%; right: auto; top: 0; bottom: 0; width: 6px; height: auto; transform: translateX(-50%); }
  .bp-tier-col { flex: none; width: 100%; flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; }
  .bp-cell.bp-free { width: 42%; min-height: 96px; order: 1; transform: rotate(-1deg); }
  .bp-tier-num { order: 2; margin: 0; }
  .bp-cell.bp-prem { width: 48%; min-height: 120px; order: 3; transform: rotate(1.5deg); }
}
@media (max-width: 600px) {
  .header-bar { max-width: 96vw; }
  .header-bar h1 { font-size: 17px; }
  .header-bar .user-pill { padding: 3px; border-radius: 50%; max-width: none; }
  .user-pill > div:not(#user-avatar-badge) { display: none !important; }
  .user-pill .tft-avatar-container { width: 40px; height: 40px; }
  .user-pill .tft-avatar-container .lottie-avatar-badge { width: 34px !important; height: 34px !important; }
  .user-pill .tft-flag-overlay { width: 15px; height: 15px; font-size: 10px; }
  :root { --game-width: min(82vw, 68vh, 380px) !important; }
  #grid { gap: 8px !important; width: var(--game-width) !important; }
  #grid .tile, #grid .tile.empty { aspect-ratio: 1 / 1.15 !important; font-size: clamp(26px, 8vw, 34px) !important; }
  #game-mode-badge { font-size: 11px !important; padding: 4px 12px !important; letter-spacing: 1px !important; }
  .tile { background: rgba(42, 24, 69, 0.72) !important; }
  .tile.alt-theme { background: linear-gradient(135deg, rgba(248, 181, 0, 0.75), rgba(255, 138, 0, 0.75)) !important; }
  .tile.glacial-theme { background: linear-gradient(135deg, rgba(10, 42, 77, 0.75), rgba(14, 165, 201, 0.75)) !important; }
  .tile.eclair-theme { background: linear-gradient(135deg, rgba(40, 40, 5, 0.75), rgba(255, 243, 77, 0.75)) !important; }
  .tile.neon-theme { background: linear-gradient(135deg, rgba(255, 0, 127, 0.75), rgba(0, 229, 255, 0.75), rgba(118, 255, 3, 0.75), rgba(255, 234, 0, 0.75), rgba(157, 117, 203, 0.75)) !important; }
  .tile.obsidian-theme { background: linear-gradient(135deg, rgba(10, 5, 10, 0.75), rgba(35, 5, 15, 0.75)) !important; }
  .tile.citrouille-theme { background: linear-gradient(135deg, rgba(26, 13, 0, 0.75), rgba(255, 138, 0, 0.75)) !important; }
  .tile.fantome-theme { background: linear-gradient(135deg, rgba(26, 0, 51, 0.75), rgba(123, 47, 247, 0.75)) !important; }
}
