/* ═══════════════════════════════════════════════════════
   MOMENTOS — overlay interactivo de partido en vivo
   ═══════════════════════════════════════════════════════ */

/* ── Overlay base ── */
.momento-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}
.momento-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Card del momento ── */
.momento-card {
  background: var(--bg-surface, #fff);
  border: 1.5px solid rgba(117, 170, 219, 0.35);
  border-radius: 18px;
  box-shadow: 0 12px 48px rgba(0, 56, 168, 0.22),
              0 0 0 3px rgba(0, 56, 168, 0.06);
  padding: 24px 28px 20px;
  max-width: 420px;
  width: calc(100% - 32px);
  text-align: center;
  animation: momento-in 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes momento-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Header del momento ── */
.momento-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold, #ffb800);
  margin-bottom: 6px;
}
.momento-titulo {
  font-family: var(--font-title, 'Inter', sans-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--black, #0d1117);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 6px;
}
.momento-desc {
  font-size: 0.82rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.45;
  margin-bottom: 16px;
}

/* ── Opciones / Botones ── */
.momento-choices {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.momento-btn {
  border: 2px solid rgba(117, 170, 219, 0.4);
  border-radius: 10px;
  background: var(--bg-surface, #fff);
  color: var(--text-bright, #0d1117);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-body, 'Inter', sans-serif);
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.momento-btn:hover {
  background: rgba(117, 170, 219, 0.12);
  border-color: var(--azul, #0038a8);
  color: var(--azul, #0038a8);
  transform: translateY(-1px);
}
.momento-btn:active {
  transform: translateY(0);
}
.momento-btn.selected {
  background: var(--azul, #0038a8);
  border-color: var(--azul, #0038a8);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 56, 168, 0.3);
}
.momento-btn.correcto {
  background: var(--green, #27ae60);
  border-color: var(--green, #27ae60);
  color: #fff;
  box-shadow: 0 2px 10px rgba(39, 174, 96, 0.3);
}
.momento-btn.incorrecto {
  background: var(--red, #e74c3c);
  border-color: var(--red, #e74c3c);
  color: #fff;
}
.momento-btn:disabled,
.momento-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

/* ── Botón grande dramático (momento_historico, debut, etc.) ── */
.momento-btn.big {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
}

/* ── Timer bar ── */
.momento-timer {
  width: 100%;
  height: 4px;
  background: var(--bg-secondary, #f4f6f9);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.momento-timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--azul, #0038a8), var(--gold, #ffb800));
  border-radius: 3px;
  transition: width 0.1s linear;
}
.momento-timer-bar.urgent {
  background: linear-gradient(90deg, var(--red, #e74c3c), var(--gold, #ffb800));
}

/* ── Timing track (corner_timing, pelota_dividida) ── */
.momento-timing-track {
  position: relative;
  width: 100%;
  height: 40px;
  background: var(--bg-secondary, #f4f6f9);
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
  border: 1px solid rgba(117, 170, 219, 0.25);
}
.momento-timing-zone {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(39, 174, 96, 0.2);
  border-left: 2px solid var(--green, #27ae60);
  border-right: 2px solid var(--green, #27ae60);
}
.momento-timing-cursor {
  position: absolute;
  top: 4px;
  width: 4px;
  height: calc(100% - 8px);
  background: var(--azul, #0038a8);
  border-radius: 2px;
  transition: none;
  z-index: 2;
}
@keyframes timing-pendulum {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(100% - 4px)); }
}

/* ── Reveal de columnas (mano_a_mano) ── */
.momento-reveal {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.momento-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 2px solid var(--border, #e0e4ea);
  border-radius: 10px;
  background: var(--bg-secondary, #f4f6f9);
  transition: all 0.2s ease;
}
.momento-col.elegida {
  border-color: var(--azul, #0038a8);
  background: rgba(0, 56, 168, 0.06);
}
.momento-col.ia {
  border-color: var(--gold, #ffb800);
  background: rgba(255, 184, 0, 0.08);
}
.momento-col.gol {
  border-color: var(--green, #27ae60);
  background: rgba(39, 174, 96, 0.1);
}
.momento-col.atajada {
  border-color: var(--red, #e74c3c);
  background: rgba(231, 76, 60, 0.08);
}
.momento-col-label {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted, #6b7280);
}
.momento-col-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.momento-col-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-bright, #0d1117);
}

/* ── Texto resultado (gol / fallo) ── */
.momento-resultado-texto {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 8px;
}
.momento-resultado-texto.gol {
  color: var(--green, #27ae60);
  background: rgba(39, 174, 96, 0.1);
}
.momento-resultado-texto.fallo {
  color: var(--text-muted, #6b7280);
  background: var(--bg-secondary, #f4f6f9);
}

/* ── Grid 3x3 (tiro_libre) ── */
.momento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0;
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
}
.momento-grid-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border, #e0e4ea);
  border-radius: 10px;
  background: var(--bg-surface, #fff);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-bright, #0d1117);
  transition: all 0.15s ease;
}
.momento-grid-cell:hover {
  border-color: var(--azul, #0038a8);
  background: rgba(0, 56, 168, 0.05);
}
.momento-grid-cell.barrera {
  background: rgba(231, 76, 60, 0.08);
  border-color: rgba(231, 76, 60, 0.4);
  color: var(--red, #e74c3c);
  font-size: 1rem;
}
.momento-grid-cell.elegida {
  border-color: var(--azul, #0038a8);
  background: rgba(0, 56, 168, 0.12);
  box-shadow: 0 0 0 3px rgba(0, 56, 168, 0.15);
}
.momento-grid-cell.gol-cell {
  border-color: var(--green, #27ae60);
  background: rgba(39, 174, 96, 0.1);
}
.momento-grid-cell.fallo-cell {
  border-color: var(--red, #e74c3c);
  background: rgba(231, 76, 60, 0.08);
}

/* ── Aura pulsante (pelota_dividida) ── */
@keyframes aura-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 56, 168, 0.2); }
  50%      { box-shadow: 0 0 20px rgba(0, 56, 168, 0.5); }
}
.momento-btn.aura {
  animation: aura-pulse 0.8s ease-in-out infinite;
  border-color: var(--azul, #0038a8);
  font-size: 1.1rem;
  padding: 16px 24px;
}

/* ── Badge de jugador en llamas ── */
.momento-llamas-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #e67e22;
  background: rgba(230, 126, 34, 0.1);
  border: 1.5px solid rgba(230, 126, 34, 0.35);
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

/* ── Resultado del momento en el feed ── */
.ml-event.momento-resultado {
  border-left: 3px solid var(--gold, #ffb800);
  padding-left: 8px;
  background: rgba(255, 184, 0, 0.04);
  border-radius: 0 6px 6px 0;
}
.ml-event.momento-resultado.gol {
  border-left-color: var(--green, #27ae60);
  background: rgba(39, 174, 96, 0.06);
}

/* ── Badge llamas en feed ── */
.ml-event.llamas-badge .ml-gname {
  color: #e67e22;
  font-weight: 700;
  font-style: italic;
}

/* ── Indicador de atajadas disponibles (guantes) en el header del live ── */
.cml-guantes {
  display: inline-flex;
  gap: 1px;
  margin-right: 6px;
  vertical-align: middle;
}
.cml-guante {
  font-size: 0.85em;
  line-height: 1;
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.cml-guante.gastado {
  opacity: 0.28;
  filter: grayscale(1);
}

/* ═══════════════════════════════════════════════════════
   DEFENSA — momento interactivo al recibir un gol rival
   ═══════════════════════════════════════════════════════ */
.momento-card.momento-def {
  border-color: rgba(8, 145, 178, 0.45);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(8, 145, 178, 0.12);
}
.momento-label.def {
  color: #0891b2;
}
.def-btn {
  border-color: rgba(8, 145, 178, 0.5);
}
.def-btn:hover {
  background: rgba(8, 145, 178, 0.12);
  border-color: #0891b2;
  color: #0891b2;
}
.momento-btn.big.def-btn {
  background: linear-gradient(135deg, #0891b2, #0e7490);
  border-color: #0e7490;
  color: #fff;
  letter-spacing: 0.04em;
  animation: def-pulse 0.7s ease-in-out infinite;
}
.momento-btn.big.def-btn:hover {
  filter: brightness(1.08);
  color: #fff;
}
@keyframes def-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 2px 12px rgba(8, 145, 178, 0.4); }
  50%      { transform: scale(1.04); box-shadow: 0 4px 22px rgba(8, 145, 178, 0.6); }
}

/* ═══════════════════════════════════════════════════════
   DISCURSO DEL TÉCNICO (pre-partido)
   ═══════════════════════════════════════════════════════ */
.momento-discurso-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted, #6b7280);
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════
   LOGROS SECRETOS
   ═══════════════════════════════════════════════════════ */
.logros-section {
  margin-top: 20px;
}
.logros-title {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim, #9ca3af);
  margin-bottom: 8px;
}
.logro-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: background 0.15s;
}
.logro-item.ok {
  background: rgba(39, 174, 96, 0.06);
}
.logro-item.bloqueado {
  opacity: 0.45;
}
.logro-icono {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.logro-nombre {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--black, #0d1117);
}
.logro-item.bloqueado .logro-nombre {
  color: var(--text-muted, #6b7280);
}
.logro-desc {
  font-size: 0.7rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════
   RACHA DORADA / MERCADO RELÁMPAGO
   ═══════════════════════════════════════════════════════ */
.momento-racha-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}
.momento-racha-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid var(--border, #e0e4ea);
  border-radius: 10px;
  background: var(--bg-surface, #fff);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.momento-racha-opt:hover {
  border-color: var(--gold, #ffb800);
  background: rgba(255, 184, 0, 0.06);
}
.momento-racha-opt.selected {
  border-color: var(--gold, #ffb800);
  background: rgba(255, 184, 0, 0.1);
  box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.15);
}
.momento-racha-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.momento-racha-info {
  flex: 1;
}
.momento-racha-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--black, #0d1117);
}
.momento-racha-desc {
  font-size: 0.72rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.3;
}

/* ── Info del jugador (mercado relámpago) ── */
.momento-jugador-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-secondary, #f4f6f9);
  border-radius: 12px;
  margin: 10px 0;
  text-align: left;
}
.momento-jugador-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--azul, #0038a8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}
.momento-jugador-datos {
  flex: 1;
  min-width: 0;
}
.momento-jugador-nombre {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--black, #0d1117);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.momento-jugador-meta {
  font-size: 0.72rem;
  color: var(--text-muted, #6b7280);
}
.momento-jugador-rating {
  font-family: var(--font-title, 'Inter', sans-serif);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--azul, #0038a8);
}

/* ═══════════════════════════════════════════════════════
   CRISIS DEL VESTUARIO (modo liga)
   ═══════════════════════════════════════════════════════ */

/* Usa la misma estructura de momento-racha-choices */

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .momento-card {
    padding: 20px 18px 16px;
  }
  .momento-titulo {
    font-size: 1.1rem;
  }
  .momento-btn {
    padding: 9px 14px;
    font-size: 0.78rem;
  }
  .momento-grid {
    max-width: 180px;
  }
  .momento-racha-opt {
    padding: 8px 10px;
  }
}

/* ═══════════════════════════════════════════════════════
   GRILLA DE PENAL (3x3 sectores)
   ═══════════════════════════════════════════════════════ */

.momento-penal-marcador {
  font-family: var(--font-title, 'Inter', sans-serif);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--azul, #0038a8);
  margin: 2px 0 6px;
}
.dark .momento-penal-marcador { color: #60a5fa; }

.momento-penal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 12px auto;
  max-width: 260px;
}

.momento-penal-sector {
  aspect-ratio: 1;
  background: var(--bg-surface, #f4f5f7);
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s;
  padding: 6px 4px;
  user-select: none;
}
.momento-penal-sector:hover:not(:disabled) {
  background: rgba(0, 56, 168, 0.1);
  border-color: var(--azul, #0038a8);
  transform: scale(1.06);
}
.momento-penal-sector:disabled {
  cursor: default;
}
.momento-penal-sector.elegida {
  background: rgba(0, 56, 168, 0.18);
  border-color: var(--azul, #0038a8);
  border-width: 2.5px;
}
.momento-penal-sector.atajada {
  background: rgba(22, 163, 74, 0.18);
  border-color: #16a34a;
}
.momento-penal-sector.keeper {
  background: rgba(249, 115, 22, 0.18);
  border-color: #f97316;
}
.momento-penal-sector.shooter {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
}
.dark .momento-penal-sector {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.dark .momento-penal-sector:hover:not(:disabled) {
  background: rgba(96, 165, 250, 0.15);
  border-color: #60a5fa;
}
.mom-sector-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.mom-sector-name {
  font-size: 0.5rem;
  color: var(--text-muted, #9ca3af);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .momento-penal-grid {
    max-width: 210px;
    gap: 5px;
  }
  .mom-sector-icon { font-size: 1.1rem; }
  .mom-sector-name { font-size: 0.44rem; }
}
