/* css/packs/mm.css | Source: MonarqueXD_v95L_GUILDORIGINS.html lignes 66514-66739 (id="mx-fx-pack-mm-styles") */
/* ============================================================ */
/*  PACK MM — 5 features multijoueur (styles)                   */
/* ============================================================ */

/* ==================== AVATAR CUSTOM ==================== */
.mx-avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffd84a;
  box-shadow: 0 0 14px rgba(255, 215, 74, .35);
}
#mx-avatar-upload-zone {
  padding: 20px;
  border: 2px dashed rgba(255, 215, 74, .4);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: rgba(255, 215, 74, .05);
}
#mx-avatar-upload-zone:hover {
  background: rgba(255, 215, 74, .1);
  border-color: #ffd84a;
}
#mx-avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 10px auto;
  display: block;
  border: 3px solid #ffd84a;
  box-shadow: 0 0 20px rgba(255, 215, 74, .5);
}

/* ==================== MÉTÉO ==================== */
#meteo_banner {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9800;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(20, 10, 30, .95), rgba(10, 5, 20, .95));
  border: 1px solid rgba(170, 80, 255, .5);
  border-radius: 12px;
  color: #fff;
  font-family: 'Cinzel', 'Rajdhani', sans-serif;
  font-size: .85em;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 20px rgba(170, 80, 255, .35);
  display: none;
  animation: meteoIn .4s ease-out;
}
#meteo_banner.visible { display: block; }
@keyframes meteoIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
#meteo_banner .m-icon { font-size: 1.3em; margin-right: 6px; }
#meteo_banner .m-name { color: #ffd84a; font-weight: 800; }
#meteo_banner .m-effect { color: #aaaab7; font-size: .85em; display: block; margin-top: 2px; }

#meteo_fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

/* Météo animations - simplifiées GPU */
#meteo_fx.m_eclipse { background: radial-gradient(ellipse at center, rgba(100,0,0,.25), rgba(0,0,0,.4)); animation: meteoPulseRed 3s ease-in-out infinite; }
@keyframes meteoPulseRed { 0%,100% { opacity: .7; } 50% { opacity: 1; } }

#meteo_fx.m_tide::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 30vh; background: linear-gradient(180deg, transparent, rgba(60, 120, 200, .25)); animation: meteoTide 4s ease-in-out infinite; }
@keyframes meteoTide { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10%); } }

#meteo_fx.m_ember::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at bottom, rgba(255, 100, 30, .35), transparent 70%); animation: meteoEmber 2s ease-in-out infinite; }
@keyframes meteoEmber { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

#meteo_fx.m_bloodrain::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(12deg, rgba(160, 0, 20, .25) 0 2px, transparent 2px 8px); animation: meteoRain 1.5s linear infinite; }
@keyframes meteoRain { from { background-position: 0 0; } to { background-position: 0 60px; } }

#meteo_fx.m_storm::before { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0); animation: meteoFlash 2.5s steps(1) infinite; }
@keyframes meteoFlash { 0%,92%,100% { background: transparent; } 95% { background: rgba(255,255,255,.7); } }

#meteo_fx.m_web::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at top left, rgba(200,200,200,.15), transparent 40%), radial-gradient(circle at bottom right, rgba(200,200,200,.15), transparent 40%); filter: grayscale(.5); }

#meteo_fx.m_fog::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(200,200,210,.35), rgba(180,180,200,.2), rgba(200,200,210,.35)); animation: meteoFog 8s linear infinite; }
@keyframes meteoFog { 0% { transform: translateX(-10%); } 100% { transform: translateX(10%); } }

#meteo_fx.m_dawn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 220, 100, .25), transparent 60%); animation: meteoDawn 4s ease-in-out infinite; }
@keyframes meteoDawn { 0%,100% { opacity: .7; } 50% { opacity: 1; } }

#meteo_fx.m_predator::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 30%, rgba(20, 0, 40, .55) 100%); }

#meteo_fx.m_fortune::before { content: ''; position: absolute; inset: 0; background: linear-gradient(45deg, transparent, rgba(255, 220, 100, .1), transparent); animation: meteoFortune 6s linear infinite; background-size: 200% 200%; }
@keyframes meteoFortune { 0% { background-position: 0 0; } 100% { background-position: 200% 200%; } }

#meteo_fx.m_inverted { filter: hue-rotate(180deg) saturate(1.3); }

#meteo_fx.m_sand::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(218, 165, 32, .1), rgba(184, 134, 11, .15)); }

#meteo_fx.m_insta::before { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 8px rgba(255, 0, 30, .6); animation: meteoInstaBlink 1s ease-in-out infinite; }
@keyframes meteoInstaBlink { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

#meteo_fx.m_magnet::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 25% 50%, rgba(120, 80, 200, .25), transparent 40%), radial-gradient(circle at 75% 50%, rgba(120, 80, 200, .25), transparent 40%); }

/* ==================== MARKETPLACE ==================== */
#market_screen {
  position: fixed;
  inset: 0;
  z-index: 9700;
  background: linear-gradient(160deg, #0a0618 0%, #060410 100%);
  color: #fff;
  font-family: 'Rajdhani', 'Cinzel', sans-serif;
  overflow-y: auto;
  padding: 20px;
  display: none;
}
#market_screen.visible { display: block; }
.market-tabs { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 2px solid rgba(255,215,74,.3); padding-bottom: 10px; }
.market-tab { padding: 10px 18px; background: rgba(255,255,255,.05); border: 0; border-radius: 10px 10px 0 0; color: #aaa; cursor: pointer; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; font-size: .85em; }
.market-tab.active { background: linear-gradient(135deg, #ffd84a, #ff8c1a); color: #1a0c00; }
.market-counters { font-size: .8em; color: #80e8ff; letter-spacing: 1.5px; margin-bottom: 14px; }
.market-item { background: linear-gradient(135deg, rgba(20,20,40,.9), rgba(10,10,25,.95)); border: 1.5px solid rgba(170, 80, 255, .3); border-radius: 12px; padding: 12px; margin-bottom: 10px; display: flex; gap: 12px; align-items: center; }
.market-item img { width: 60px; height: 60px; object-fit: contain; border-radius: 8px; background: rgba(0,0,0,.3); }
.market-item .info { flex: 1; }
.market-item .name { font-family: 'Cinzel', serif; color: #ffd84a; font-weight: 800; margin-bottom: 4px; }
.market-item .stats { font-size: .8em; color: #aaa; }
.market-item .price { color: #ffd84a; font-weight: 900; font-size: 1.1em; }
.market-item .seller { font-size: .75em; color: #80e8ff; }
.market-item .btn-buy, .market-item .btn-cancel, .market-item .btn-claim {
  padding: 8px 16px; border-radius: 8px; border: 0; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; font-size: .8em;
}
.market-item .btn-buy { background: linear-gradient(135deg, #6bff8a, #1ea35a); color: #0a1a08; }
.market-item .btn-cancel { background: rgba(255, 80, 80, .2); border: 1px solid #ff5050; color: #ff8090; }
.market-item .btn-claim { background: linear-gradient(135deg, #ffd84a, #ff8c1a); color: #1a0c00; }
#market_close_btn { position: absolute; top: 16px; right: 16px; background: rgba(255,80,80,.2); border: 1px solid rgba(255,80,80,.4); color: #ff8090; border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 700; }

/* ==================== PVP ARENA ==================== */
#pvp_arena_screen {
  position: fixed;
  inset: 0;
  z-index: 9600;
  background: linear-gradient(160deg, #1a0008 0%, #0a0004 100%);
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  display: none;
  padding: 16px;
  overflow-y: auto;
}
#pvp_arena_screen.visible { display: block; }
.pvp-header { text-align: center; font-family: 'Cinzel', serif; color: #ff5070; letter-spacing: 3px; font-size: 1.3em; margin-bottom: 14px; text-shadow: 0 0 14px rgba(255, 80, 110, .5); }
.pvp-vs-row { display: flex; gap: 12px; justify-content: space-between; align-items: stretch; margin-bottom: 20px; }
.pvp-player { flex: 1; background: linear-gradient(160deg, rgba(20,12,30,.9), rgba(10,6,18,.95)); border: 2px solid rgba(255, 80, 110, .4); border-radius: 14px; padding: 14px; text-align: center; }
.pvp-player.me { border-color: #50dcff; }
.pvp-player img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; border: 2px solid currentColor; }
.pvp-player .name { font-family: 'Cinzel', serif; font-weight: 800; letter-spacing: 1.5px; color: #ffd84a; margin-bottom: 2px; }
.pvp-player .rank { font-size: .75em; color: #80e8ff; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.pvp-hp-bar { height: 18px; background: rgba(0,0,0,.6); border: 1px solid currentColor; border-radius: 9px; overflow: hidden; position: relative; }
.pvp-hp-fill { height: 100%; background: linear-gradient(90deg, #ff3050, #b00010); transition: width .5s ease; }
.pvp-player.me .pvp-hp-fill { background: linear-gradient(90deg, #6bff8a, #1ea35a); }
.pvp-hp-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8em; text-shadow: 0 1px 3px #000; }
.pvp-vs { font-family: 'Cinzel', serif; color: #ff5070; font-size: 2em; align-self: center; font-weight: 900; text-shadow: 0 0 14px rgba(255, 80, 110, .6); }
.pvp-actions { display: flex; flex-direction: column; gap: 10px; }
.pvp-ex-btn { padding: 14px; background: linear-gradient(135deg, rgba(80,220,255,.2), rgba(170,80,255,.2)); border: 1.5px solid rgba(80,220,255,.5); border-radius: 12px; color: #fff; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; font-size: .95em; }
.pvp-ex-btn:hover { background: linear-gradient(135deg, rgba(80,220,255,.4), rgba(170,80,255,.4)); }
.pvp-ex-btn:disabled { opacity: .4; cursor: not-allowed; }
#pvp_exit_btn { background: rgba(255, 80, 80, .2); border: 1px solid rgba(255,80,80,.4); color: #ff8090; border-radius: 10px; padding: 10px 18px; cursor: pointer; font-weight: 700; margin-top: 16px; width: 100%; }

/* ==================== COOP ==================== */
.coop-welcome-avatar {
  display: inline-block;
  margin-left: 14px;
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: visible;
}
.coop-welcome-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #50dcff; }
.coop-welcome-avatar .coop-name { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: .7em; color: #80e8ff; white-space: nowrap; font-weight: 700; }
.coop-crown { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 1.4em; filter: drop-shadow(0 0 6px #ffd84a); }

#coop_death_modal {
  position: fixed;
  inset: 0;
  z-index: 9900;
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#coop_death_modal.visible { display: flex; }
#coop_death_modal .card { background: linear-gradient(160deg, #2a0010, #10000a); border: 2px solid #ff5050; border-radius: 18px; padding: 28px; max-width: 380px; text-align: center; }
#coop_death_modal h2 { color: #ff5050; font-family: 'Cinzel', serif; margin: 0 0 12px; letter-spacing: 2px; }
#coop_death_modal button { width: 100%; padding: 12px; margin-top: 8px; border-radius: 10px; border: 0; font-family: inherit; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; }
#coop_death_modal .revive { background: linear-gradient(135deg, #aa44ff, #50dcff); color: #fff; }
#coop_death_modal .flee   { background: rgba(255,80,80,.2); border: 1px solid #ff5050; color: #ff8090; }

/* Battle result overlay */
#battle_result_overlay {
  position: fixed;
  inset: 0;
  z-index: 9950;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
}
#battle_result_overlay.visible { display: flex; }
#battle_result_overlay .result-card { background: linear-gradient(160deg, #11132a, #06081a); border-radius: 20px; padding: 36px 28px; max-width: 400px; text-align: center; border: 2px solid; }
#battle_result_overlay.win .result-card { border-color: #ffd84a; box-shadow: 0 0 60px rgba(255, 215, 74, .5); }
#battle_result_overlay.lose .result-card { border-color: #ff5050; box-shadow: 0 0 60px rgba(255, 80, 80, .5); }
#battle_result_overlay h1 { font-family: 'Cinzel', serif; font-size: 2.2em; letter-spacing: 3px; margin: 0 0 14px; }
#battle_result_overlay.win h1 { color: #ffd84a; }
#battle_result_overlay.lose h1 { color: #ff5050; }
#battle_result_overlay p { color: #ccc; font-size: 1em; margin: 8px 0; }
#battle_result_overlay button { margin-top: 18px; padding: 14px 28px; background: linear-gradient(135deg, #50dcff, #aa44ff); border: 0; border-radius: 12px; color: #fff; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; font-size: 1em; }
