/* =========================================================================
   mapa-tutorial.css — extras del tutorial "¿cómo funciona?" de la sección MUNDO (mapa-tutorial.js)
   El velo, el personaje guía y la nube de texto usan las clases .ct-* de cartas-tutorial.css (cargar ese archivo antes).
   Aquí solo van el HUD de la simulación (reloj / día / % del mapa / marcador), los +1 / -1 flotantes,
   los avisos grandes (¡FIN DEL DÍA!, ¡MUNDO CONQUISTADO!) y el confeti.
   ========================================================================= */

/* el personaje se esconde mientras corre la simulación para dejar ver el mapa */
.mt-root .ct-guia.mt-oculta { opacity: 0; pointer-events: none; transition: opacity .25s ease, top .5s cubic-bezier(.3, 1.25, .5, 1); }

/* ---------- HUD de la simulación ---------- */
.mt-hud {
  position: fixed; top: 48px; z-index: 5; box-sizing: border-box; pointer-events: none;
  display: none; flex-direction: column; gap: 5px; padding: 7px 9px 8px;
  background: linear-gradient(180deg, rgba(14, 22, 48, .94), rgba(6, 10, 26, .94));
  border: 3px solid #05070a; border-radius: 16px; box-shadow: 0 4px 0 #05070a, 0 0 18px rgba(255, 209, 0, .35);
  font-family: 'Lilita One', sans-serif; color: #fff;
}
.mt-hud.mt-on { display: flex; animation: mt-entra .35s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes mt-entra { from { transform: translateY(-14px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.mt-fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mt-reloj { display: flex; align-items: center; gap: 6px; }
.mt-reloj i { font-style: normal; font-size: 20px; line-height: 1; }
.mt-reloj b { font-weight: 400; font-size: 26px; line-height: 1; letter-spacing: 1px; color: #7dff9a; font-variant-numeric: tabular-nums; text-shadow: 0 0 10px rgba(80, 255, 140, .6); }
.mt-reloj b.mt-cero { color: #ff4d4d; text-shadow: 0 0 14px rgba(255, 60, 60, .9); animation: mt-late .28s ease-in-out infinite; }
@keyframes mt-late { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
.mt-dia { font-size: 14px; color: #FFD100; letter-spacing: .5px; text-align: right; text-shadow: 0 2px 0 #05070a; }

.mt-prog { position: relative; height: 20px; border-radius: 10px; background: #0a0f22; border: 2px solid #05070a; overflow: hidden; }
.mt-prog-in { position: absolute; left: 0; top: 0; bottom: 0; width: 5%; background: linear-gradient(180deg, #FFE066, #FFA800); box-shadow: 0 0 10px rgba(255, 209, 0, .8); transition: width .12s linear; }
.mt-prog span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; letter-spacing: .4px; color: #fff; text-shadow: 0 1px 0 #05070a, 0 0 4px #05070a; }

.mt-marc { display: flex; flex-direction: column; gap: 4px; }
.mt-marc:empty { display: none; }
.mt-marc-fila { display: flex; align-items: center; gap: 7px; padding: 3px 8px; border-radius: 10px; background: rgba(255, 255, 255, .08); font-size: 13px; animation: mt-fila .4s cubic-bezier(.3, 1.4, .5, 1) both; }
.mt-marc-fila b { flex: 1; font-weight: 400; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-marc-fila em { font-style: normal; font-size: 18px; }
.mt-marc-fila.mt-ganador em { color: #7dff9a; text-shadow: 0 0 10px rgba(80, 255, 140, .7); }
.mt-marc-fila.mt-segundo em { color: #8fd8ff; text-shadow: 0 0 10px rgba(100, 200, 255, .7); }
.mt-pod { font-size: 17px; line-height: 1; }
.mt-flag { width: 22px; height: 15px; object-fit: cover; border-radius: 3px; border: 1px solid #05070a; }
@keyframes mt-fila { from { transform: translateX(-26px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- avisos grandes en el centro ---------- */
.mt-alerta {
  position: fixed; top: 44%; z-index: 6; pointer-events: none; box-sizing: border-box; text-align: center; padding: 0 10px;
  font-family: 'Lilita One', sans-serif; font-size: 22px; line-height: 1.05; color: #FFE066; opacity: 0;
  -webkit-text-stroke: 2px #05070a; paint-order: stroke fill; text-shadow: 0 4px 0 #05070a, 0 0 20px rgba(255, 190, 0, .9);
}
.mt-alerta-on { animation: mt-pop 1.15s cubic-bezier(.3, 1.5, .5, 1) both; }
.mt-alerta-grande { font-size: 34px; animation: mt-pop-fijo .7s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes mt-pop { 0% { transform: scale(.3); opacity: 0; } 22% { transform: scale(1.18); opacity: 1; } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.04) translateY(-14px); opacity: 0; } }
@keyframes mt-pop-fijo { 0% { transform: scale(.3) rotate(-4deg); opacity: 0; } 60% { transform: scale(1.18) rotate(1.5deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }

/* ---------- +1 / -1 sobre los cuadritos ---------- */
.mt-flota {
  position: fixed; z-index: 6; pointer-events: none; font-family: 'Lilita One', sans-serif; font-size: 22px; line-height: 1;
  transform: translate(-50%, -50%); white-space: nowrap; -webkit-text-stroke: 2px #05070a; paint-order: stroke fill;
  animation: mt-sube 1.3s ease-out both;
}
.mt-mas { color: #7dff9a; text-shadow: 0 0 12px rgba(80, 255, 140, .9), 0 3px 0 #05070a; }
.mt-mas2 { color: #8fd8ff; text-shadow: 0 0 12px rgba(100, 200, 255, .9), 0 3px 0 #05070a; }
.mt-menos { color: #ff5a5a; font-size: 18px; text-shadow: 0 0 10px rgba(255, 60, 60, .9), 0 3px 0 #05070a; }
@keyframes mt-sube {
  0%   { transform: translate(-50%, -30%) scale(.4); opacity: 0; }
  18%  { transform: translate(-50%, -80%) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -230%) scale(1); opacity: 0; }
}

/* ---------- confeti ---------- */
.mt-confeti { position: fixed; left: 0; top: 0; z-index: 7; pointer-events: none; }

@media (max-height: 640px) {
  .mt-reloj b { font-size: 22px; }
  .mt-alerta-grande { font-size: 28px; }
}

/* ---------- reloj REAL de la pantalla Mundo usado por la simulacion ---------- */
.mt-hud.mt-real .mt-reloj { display: none; }
.mt-hud.mt-real .mt-fila { justify-content: center; }
.wmn-canvas #wn255.mt-real-on { color: #7dff9a !important; text-shadow: 0 0 10px rgba(80, 255, 140, .7) !important; }
.wmn-canvas #wn255.mt-real-cero { color: #ff4d4d !important; text-shadow: 0 0 14px rgba(255, 60, 60, .95) !important; animation: mt-late .28s ease-in-out infinite; }

/* ---------- nuevo guion: RESULTADOS DEL DÍA, burbuja del rey, UNA SOLA FUERZA, premios +2/+1 ---------- */
.mt-hud.mt-sinprog .mt-prog { display: none; }
.mt-marc-tit { text-align: center; font-size: 13px; letter-spacing: 1px; color: #FFD100; text-shadow: 0 2px 0 #05070a; animation: mt-fila .4s cubic-bezier(.3, 1.4, .5, 1) both; }
.mt-marc-fila b small { display: block; font-size: 10px; line-height: 1; letter-spacing: .8px; color: #FFD100; font-weight: 400; }
.mt-menos.mt-origen { font-size: 14px; }

/* burbuja pequeña del rey que narra durante la simulación (el personaje grande está oculto) */
.mt-narra {
  position: fixed; z-index: 5; display: none; align-items: center; gap: 8px; box-sizing: border-box; pointer-events: none;
  padding: 6px 12px 6px 8px; background: linear-gradient(180deg, rgba(14, 22, 48, .96), rgba(6, 10, 26, .96));
  border: 3px solid #05070a; border-radius: 14px; box-shadow: 0 4px 0 #05070a, 0 0 14px rgba(255, 209, 0, .3);
  font-family: 'Lilita One', sans-serif; font-size: 15px; line-height: 1.1; color: #fff; letter-spacing: .3px;
}
.mt-narra.mt-on { display: flex; animation: mt-entra .35s cubic-bezier(.3, 1.4, .5, 1) both; }
.mt-narra img { width: 30px; height: 48px; object-fit: contain; flex: none; }

/* UNA SOLA FUERZA: avatares -> bandera */
.mt-fuerza {
  position: fixed; top: 64px; z-index: 5; display: none; box-sizing: border-box; padding: 6px; pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 22, 48, .94), rgba(6, 10, 26, .94));
  border: 3px solid #05070a; border-radius: 16px; box-shadow: 0 4px 0 #05070a, 0 0 18px rgba(255, 209, 0, .35);
}
.mt-fuerza.mt-on { display: block; animation: mt-entra .35s cubic-bezier(.3, 1.4, .5, 1) both; }
.mt-fuerza svg { display: block; width: 100%; height: auto; overflow: visible; }
.mt-f-av { opacity: 0; transform-box: fill-box; transform-origin: center; animation: mt-f-pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes mt-f-pop { 0% { opacity: 0; transform: scale(.2); } 100% { opacity: 1; transform: scale(1); } }
.mt-f-lin { stroke: #FFD100; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 8; opacity: 0; animation: mt-f-lin-in .3s ease both, mt-f-flujo .8s linear infinite; }
@keyframes mt-f-lin-in { from { opacity: 0; } to { opacity: .9; } }
@keyframes mt-f-flujo { from { stroke-dashoffset: 14; } to { stroke-dashoffset: 0; } }
.mt-f-flag { transform-box: fill-box; transform-origin: center; animation: mt-f-pulso 1.3s ease-in-out 2.2s infinite; }
@keyframes mt-f-pulso { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* premios del día (+2 / +1) sobre el mapa */
.mt-premios { position: fixed; top: 30%; z-index: 6; display: none; justify-content: center; gap: 22px; box-sizing: border-box; pointer-events: none; }
.mt-premios.mt-on { display: flex; }
.mt-premio {
  font-family: 'Lilita One', sans-serif; font-size: 38px; line-height: 1; opacity: 0; -webkit-text-stroke: 2px #05070a; paint-order: stroke fill;
  animation: mt-premio-in .6s cubic-bezier(.3, 1.6, .5, 1) both, mt-latir .9s ease-in-out infinite;
}
.mt-p1 { color: #FFE066; text-shadow: 0 0 16px rgba(255, 190, 0, .95), 0 4px 0 #05070a; }
.mt-p2 { color: #8fd8ff; text-shadow: 0 0 16px rgba(100, 200, 255, .95), 0 4px 0 #05070a; }
@keyframes mt-premio-in { 0% { opacity: 0; transform: translateY(34px) scale(.2); } 100% { opacity: 1; transform: none; } }
@keyframes mt-latir { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* TOP DEL DÍA real: las banderas y números de ejemplo entran con un destello (solo brillo/opacidad, sin tocar su posición) */
.wmn-canvas .mt-top-pop { animation: mt-top-pop .8s ease-out both; }
@keyframes mt-top-pop {
  0% { opacity: 0; filter: brightness(2.6) drop-shadow(0 0 8px #FFD100); }
  60% { opacity: 1; filter: brightness(1.6) drop-shadow(0 0 8px #FFD100); }
  100% { opacity: 1; filter: none; }
}
