/* ==============================================================================
   CREDIOLIMPIADAS / CREDIJUEGOS - ESTILOS ARCADE BÉISBOL LVBP (HOMERUN DERBY)
   Archivo: Frontend/public/styles/baseball.css
   Estilo diurno claro institucional, profesional, en un solo cuadro, sin scroll
   ============================================================================== */

/* Contenedor Principal del Juego */
.baseball-game-card {
  width: 100%;
  max-width: 980px;
  background: #FFFFFF;
  border: 2px solid #D2E4F8;
  border-radius: 24px;
  box-shadow: 0 16px 45px rgba(18, 44, 92, 0.08), 0 2px 8px rgba(0, 0, 0, 0.03);
  padding: 1.15rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-sizing: border-box;
  margin: 0 auto;
}

/* 1. Marcador TV Broadcast Superior (Estilo Transmisión Deportiva Profesional) */
.baseball-scoreboard-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(180deg, #071E3D 0%, #031326 100%);
  border: 2px solid #1E40AF;
  border-radius: 18px;
  padding: 0.55rem 1.1rem;
  box-shadow: 0 8px 24px rgba(2, 19, 38, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  box-sizing: border-box;
  overflow: hidden;
}

.baseball-score-team {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  overflow: hidden;
}

.baseball-score-team--p2 {
  justify-content: flex-end;
}

.baseball-team-mini-shield {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
}

.baseball-team-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 0 1 auto;
}

.baseball-team-info--right {
  flex-direction: row-reverse;
}

.baseball-team-short {
  font-family: var(--cc-font-sans, 'Montserrat', 'Inter', sans-serif);
  font-size: 0.74rem;
  color: #FFFFFF;
  font-weight: 900;
  letter-spacing: 0.03em;
  max-width: clamp(65px, 10vw, 125px);
  min-width: 0;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.baseball-runs-digit {
  font-family: var(--cc-font-sans, 'Montserrat', 'Inter', sans-serif);
  font-size: 1.65rem;
  font-weight: 900;
  color: #FFB703;
  background: #020617;
  border: 1.8px solid #F59E0B;
  border-radius: 10px;
  padding: 0.1rem 0.6rem;
  min-width: 38px;
  flex-shrink: 0;
  text-align: center;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 12px rgba(245, 158, 11, 0.35);
  text-shadow: 0 0 10px rgba(255, 183, 3, 0.7);
}

.baseball-inning-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.24rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  padding: 0.32rem 0.85rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.baseball-inning-top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
}

.baseball-inning-badge {
  font-family: var(--cc-font-sans, 'Montserrat', 'Inter', sans-serif);
  font-size: 0.74rem;
  font-weight: 900;
  color: #38BDF8;
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  white-space: nowrap;
}

.baseball-outs-box {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
}

.baseball-outs-text {
  font-family: var(--cc-font-sans, 'Montserrat', 'Inter', sans-serif);
  font-size: 0.64rem;
  font-weight: 900;
  color: #F8FAFC;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.baseball-outs-lights {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.baseball-out-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.28);
  border: 1.5px solid rgba(148, 163, 184, 0.55);
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.baseball-out-light.is-on {
  background: #EF4444;
  border-color: #FECACA;
  box-shadow: 0 0 8px #EF4444, 0 0 12px rgba(245, 158, 11, 0.8);
  transform: scale(1.12);
}

.baseball-outs-counter {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #E2E8F0;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.baseball-count-dot {
  color: #22C55E;
  font-size: 0.9rem;
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.8);
}

/* 2. Barra de Instrucción Dinámica (Ticker Broadcast) */
.baseball-instruction-banner {
  background: linear-gradient(90deg, #F0F9FF 0%, #E0F2FE 100%);
  border: 1.5px solid #7DD3FC;
  border-radius: 12px;
  padding: 0.5rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-sizing: border-box;
}

.bb-inst-step {
  font-family: var(--cc-font-sans, 'Montserrat', 'Inter', sans-serif);
  font-size: 0.78rem;
  font-weight: 900;
  color: #0369A1;
  background: #BAE6FD;
  border: 1px solid #7DD3FC;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.bb-inst-text {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0C4A6E;
  line-height: 1.35;
}

/* 3. Escenario del Diamante - Perspectiva Realista del Estadio Oficial */
.baseball-diamond-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.8;
  min-height: 410px;
  max-height: 510px;
  border-radius: 20px;
  border: 3px solid #002855;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 14px 38px rgba(0, 40, 85, 0.22), inset 0 0 20px rgba(0, 0, 0, 0.3);
  display: block;
}

/* Botón Flotante para Encender / Apagar el Sonido en Pleno Juego */
.baseball-sound-toggle-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.75rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.82);
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  color: #F8FAFC;
  font-family: var(--cc-font-sans, 'Inter', system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  transition: all 0.18s ease;
  user-select: none;
}

.baseball-sound-toggle-btn:hover {
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.94);
  border-color: #38BDF8;
}

.baseball-sound-toggle-btn:active {
  transform: translateY(0) scale(0.96);
}

.baseball-sound-toggle-btn.is-off {
  background: rgba(127, 29, 29, 0.86);
  border-color: rgba(248, 113, 113, 0.7);
  color: #FECACA;
}

.bb-sound-icon {
  font-size: 0.92rem;
  line-height: 1;
}

/* Reloj de Pitcheo de 10 segundos (Visible para el Lanzador) */
.baseball-pitch-clock {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.85rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.88);
  border: 2px solid #F59E0B;
  color: #FEF08A;
  font-family: var(--cc-font-sans, 'Inter', system-ui, sans-serif);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.48), 0 0 10px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
  user-select: none;
}

.bb-pitch-clock-val {
  font-family: var(--cc-font-sans, 'Montserrat', 'Inter', sans-serif);
  font-size: 0.88rem;
  color: #FFFFFF;
  min-width: 28px;
  text-align: center;
}

.baseball-pitch-clock.is-critical {
  background: rgba(153, 27, 27, 0.94);
  border-color: #FCA5A5;
  color: #FFFFFF;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.85), 0 4px 14px rgba(0, 0, 0, 0.5);
  animation: pitchClockCriticalPulse 0.55s ease-in-out infinite alternate;
}

@keyframes pitchClockCriticalPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.07); }
}

/* Aviso Central cuando el Lanzador no lanza en 10 segundos (+1 Carrera al Bateador) */
.baseball-pitch-timeout-banner {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 48;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: min(90%, 440px);
  padding: 0.95rem 1.35rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.96) 0%, rgba(127, 29, 29, 0.98) 100%);
  border: 2.5px solid #FDE047;
  color: #FFFFFF;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(239, 68, 68, 0.6);
  animation: bannerPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bb-timeout-title {
  font-family: var(--cc-font-sans, 'Montserrat', 'Inter', sans-serif);
  font-size: 0.95rem;
  font-weight: 900;
  color: #FEF08A;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.bb-timeout-sub {
  font-family: var(--cc-font-sans, 'Inter', sans-serif);
  font-size: 0.86rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.3;
}

.bb-sound-text {
  line-height: 1;
}

/* Lienzo del Estadio (Fondo Ilustrado Clásico Deportivo) */
.baseball-stadium-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.bb-stadium-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
}

.bb-stadium-bg-img--batter {
  display: block !important;
}

.bb-stadium-bg-img--pitcher {
  display: none !important;
  object-position: center center;
}

.baseball-diamond-stage:not(.is-pitcher-view) .bb-role-pitcher {
  display: none !important;
}

.baseball-diamond-stage.is-pitcher-view .bb-role-batter {
  display: none !important;
}

/* Zepelín Publicitario AccessPay en el Cielo del Estadio (Vuelo de derecha a izquierda siguiendo la cabina) */
.baseball-blimp-container {
  position: absolute;
  top: 1.5%;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.bb-blimp-sprite {
  position: absolute;
  top: 0;
  left: 0;
  width: 82px;
  height: auto;
  object-fit: contain;
  /* Cabina hacia la izquierda con logo al derecho (scaleX(1)), desplazándose de derecha a izquierda */
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
  animation: blimpFlyLeft 30s linear infinite;
  will-change: transform;
}

@keyframes blimpFlyLeft {
  0% {
    transform: translateX(100vw) translateY(0) scaleX(1) scale(0.85);
  }
  25% {
    transform: translateX(75vw) translateY(-2px) scaleX(1) scale(0.88);
  }
  50% {
    transform: translateX(50vw) translateY(2px) scaleX(1) scale(0.90);
  }
  75% {
    transform: translateX(25vw) translateY(-2px) scaleX(1) scale(0.88);
  }
  100% {
    transform: translateX(-140px) translateY(0) scaleX(1) scale(0.85);
  }
}

/* Capa de Flashes de Cámaras en las Gradas del Estadio */
.baseball-crowd-flashes-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.bb-camera-flash {
  position: absolute;
  width: 52px;
  height: 52px;
  background: url('/olimpiadas/assets/sprites/camera-flash.png') no-repeat center center;
  background-size: contain;
  mix-blend-mode: screen;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  pointer-events: none;
}

/* Posiciones orgánicas en gradas izquierdas, centrales y derechas */
.bb-flash--1 { top: 22%; left: 13%; animation: cameraFlashPulse 3.8s ease-out infinite 0.4s; }
.bb-flash--2 { top: 32%; left: 23%; animation: cameraFlashPulse 4.6s ease-out infinite 1.8s; }
.bb-flash--3 { top: 26%; left: 35%; animation: cameraFlashPulse 5.2s ease-out infinite 3.1s; }
.bb-flash--4 { top: 38%; left: 46%; animation: cameraFlashPulse 4.1s ease-out infinite 0.9s; }
.bb-flash--5 { top: 37%; left: 56%; animation: cameraFlashPulse 5.7s ease-out infinite 2.5s; }
.bb-flash--6 { top: 27%; left: 68%; animation: cameraFlashPulse 3.5s ease-out infinite 1.2s; }
.bb-flash--7 { top: 32%; left: 79%; animation: cameraFlashPulse 4.4s ease-out infinite 2.9s; }
.bb-flash--8 { top: 23%; left: 89%; animation: cameraFlashPulse 5.0s ease-out infinite 0.2s; }

@keyframes cameraFlashPulse {
  0%, 84%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  87% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.15); filter: drop-shadow(0 0 10px #ffea00); }
  89% { opacity: 0.15; transform: translate(-50%, -50%) scale(0.85); }
  92% { opacity: 1; transform: translate(-50%, -50%) scale(1.35); filter: drop-shadow(0 0 14px #ffffff); }
  95% { opacity: 0.2; transform: translate(-50%, -50%) scale(0.8); }
  98% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
}

/* Montículo y Pitcher al Fondo (Plantado exactamente sobre la Goma del Montículo) */
.baseball-pitcher-container {
  position: absolute;
  top: 57.5%;
  left: 49.6%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}

.baseball-pitcher-figure {
  width: 82px;
  height: 112px;
  position: relative;
  transition: transform 0.2s ease-out;
  animation: pitcherBreathing 2.4s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

@keyframes pitcherBreathing {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.01); }
  100% { transform: translateY(0) scale(1); }
}

.bb-pitcher-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  position: absolute;
  bottom: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

/* En reposo: Solo Frame 1 visible */
.bb-pitcher-sprite--f1 {
  opacity: 1;
}

/* Al lanzar: Secuencia de 6 fotogramas a ritmo natural (0.72s) */
.baseball-pitcher-figure.is-throwing .bb-pitcher-sprite--f1 { animation: playPitcherF1 0.72s steps(1) forwards; }
.baseball-pitcher-figure.is-throwing .bb-pitcher-sprite--f2 { animation: playPitcherF2 0.72s steps(1) forwards; }
.baseball-pitcher-figure.is-throwing .bb-pitcher-sprite--f3 { animation: playPitcherF3 0.72s steps(1) forwards; }
.baseball-pitcher-figure.is-throwing .bb-pitcher-sprite--f4 { animation: playPitcherF4 0.72s steps(1) forwards; }
.baseball-pitcher-figure.is-throwing .bb-pitcher-sprite--f5 { animation: playPitcherF5 0.72s steps(1) forwards; }
.baseball-pitcher-figure.is-throwing .bb-pitcher-sprite--f6 { animation: playPitcherF6 0.72s steps(1) forwards; }

@keyframes playPitcherF1 {
  0% { opacity: 1; }
  15% { opacity: 0; }
  94% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes playPitcherF2 {
  0% { opacity: 0; }
  15% { opacity: 1; }
  32% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes playPitcherF3 {
  0% { opacity: 0; }
  32% { opacity: 1; }
  49% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes playPitcherF4 {
  0% { opacity: 0; }
  49% { opacity: 1; }
  66% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes playPitcherF5 {
  0% { opacity: 0; }
  66% { opacity: 1; }
  83% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes playPitcherF6 {
  0% { opacity: 0; }
  83% { opacity: 1; }
  94% { opacity: 1; }
  100% { opacity: 0; }
}

/* Bateador en Primer Plano dentro de la Caja de Bateo Izquierda Oficial */
.baseball-batter-container {
  position: absolute;
  bottom: auto;
  top: 95.5%;
  left: 42.5%;
  transform: translate(-50%, -100%);
  z-index: 15;
  pointer-events: none;
}

.baseball-batter-figure {
  width: 170px;
  height: 186px;
  position: relative;
  animation: batterStanceIdle 2.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.55));
  transform-origin: bottom center;
}

@keyframes batterStanceIdle {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-3px) rotate(0.4deg); }
}

.bb-batter-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  position: absolute;
  bottom: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

/* En reposo (espera): Solo se muestra el Frame 1 */
.bb-batter-sprite--f1 {
  opacity: 1;
}

/* Al ejecutar Swing: secuencia fluida de 8 fotogramas continuos (0.72s) */
.baseball-batter-figure.is-swinging .bb-batter-sprite--f1 { animation: playBatterF1 0.72s steps(1) forwards; }
.baseball-batter-figure.is-swinging .bb-batter-sprite--f2 { animation: playBatterF2 0.72s steps(1) forwards; }
.baseball-batter-figure.is-swinging .bb-batter-sprite--f3 { animation: playBatterF3 0.72s steps(1) forwards; }
.baseball-batter-figure.is-swinging .bb-batter-sprite--f4 { animation: playBatterF4 0.72s steps(1) forwards; }
.baseball-batter-figure.is-swinging .bb-batter-sprite--f8 { animation: playBatterF8 0.72s steps(1) forwards; }
.baseball-batter-figure.is-swinging .bb-batter-sprite--f9 { animation: playBatterF9 0.72s steps(1) forwards; }
.baseball-batter-figure.is-swinging .bb-batter-sprite--f10 { animation: playBatterF10 0.72s steps(1) forwards; }
.baseball-batter-figure.is-swinging .bb-batter-sprite--f11 { animation: playBatterF11 0.72s steps(1) forwards; }

@keyframes playBatterF1 { 0% { opacity: 1; } 12% { opacity: 0; } 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes playBatterF2 { 0% { opacity: 0; } 12% { opacity: 1; } 25% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playBatterF3 { 0% { opacity: 0; } 25% { opacity: 1; } 37% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playBatterF4 { 0% { opacity: 0; } 37% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playBatterF8 { 0% { opacity: 0; } 50% { opacity: 1; } 63% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playBatterF9 { 0% { opacity: 0; } 63% { opacity: 1; } 75% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playBatterF10 { 0% { opacity: 0; } 75% { opacity: 1; } 87% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playBatterF11 { 0% { opacity: 0; } 87% { opacity: 1; } 96% { opacity: 1; } 100% { opacity: 0; } }

/* ==============================================================================
   PERSPECTIVA DE LANZADOR (.is-pitcher-view): DESDE EL MONTÍCULO AL HOME PLATE
   ============================================================================== */

/* Ocultar zepelín y flashes de cámaras de los aficionados cuando la vista sea del lanzador */
.baseball-diamond-stage.is-pitcher-view .baseball-blimp-container,
.baseball-diamond-stage.is-pitcher-view .baseball-crowd-flashes-layer {
  display: none !important;
}

/* Centrar verticalmente la ilustración de la vista de lanzador y ocultar el estadio de bateador */
.baseball-diamond-stage.is-pitcher-view .bb-stadium-bg-img--batter {
  display: none !important;
}

.baseball-diamond-stage.is-pitcher-view .bb-stadium-bg-img,
.baseball-diamond-stage.is-pitcher-view .bb-stadium-bg-img--pitcher {
  display: block !important;
  object-position: center center;
}

/* Catcher y Árbitro ocultos por defecto (en vista de bateador) */
.baseball-umpire-container,
.baseball-catcher-container {
  display: none;
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: none;
}

/* En vista de lanzador: Árbitro parado justo detrás del Catcher dentro del cajón del receptor */
.baseball-diamond-stage.is-pitcher-view .baseball-umpire-container {
  display: block;
  top: 36.2%;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 6;
}

.baseball-umpire-figure {
  width: 80px;
  height: 98px;
  position: relative;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.bb-umpire-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  position: absolute;
  bottom: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

.bb-umpire-sprite--f1 {
  opacity: 1;
}

/* Árbitro cantando OUT / STRIKE (f1 -> f2 -> f4 -> f5 -> f6) */
.baseball-umpire-figure.is-calling-out .bb-umpire-sprite--f1 { animation: playUmpOutF1 0.9s steps(1) forwards; }
.baseball-umpire-figure.is-calling-out .bb-umpire-sprite--f2 { animation: playUmpOutF2 0.9s steps(1) forwards; }
.baseball-umpire-figure.is-calling-out .bb-umpire-sprite--f4 { animation: playUmpOutF4 0.9s steps(1) forwards; }
.baseball-umpire-figure.is-calling-out .bb-umpire-sprite--f5 { animation: playUmpOutF5 0.9s steps(1) forwards; }
.baseball-umpire-figure.is-calling-out .bb-umpire-sprite--f6 { animation: playUmpOutF6 0.9s steps(1) forwards; }

@keyframes playUmpOutF1 { 0% { opacity: 1; } 12% { opacity: 0; } 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes playUmpOutF2 { 0% { opacity: 0; } 12% { opacity: 1; } 32% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playUmpOutF4 { 0% { opacity: 0; } 32% { opacity: 1; } 58% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playUmpOutF5 { 0% { opacity: 0; } 58% { opacity: 1; } 80% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playUmpOutF6 { 0% { opacity: 0; } 80% { opacity: 1; } 95% { opacity: 1; } 100% { opacity: 0; } }

/* Árbitro cantando SAFE / HIT (f1 -> f3 -> f2) */
.baseball-umpire-figure.is-calling-safe .bb-umpire-sprite--f1 { animation: playUmpSafeF1 0.9s steps(1) forwards; }
.baseball-umpire-figure.is-calling-safe .bb-umpire-sprite--f3 { animation: playUmpSafeF3 0.9s steps(1) forwards; }
.baseball-umpire-figure.is-calling-safe .bb-umpire-sprite--f2 { animation: playUmpSafeF2 0.9s steps(1) forwards; }

@keyframes playUmpSafeF1 { 0% { opacity: 1; } 15% { opacity: 0; } 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes playUmpSafeF3 { 0% { opacity: 0; } 15% { opacity: 1; } 72% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playUmpSafeF2 { 0% { opacity: 0; } 72% { opacity: 1; } 95% { opacity: 1; } 100% { opacity: 0; } }

/* En vista de lanzador: Catcher agachado dentro del cajón del receptor detrás del Home Plate */
.baseball-diamond-stage.is-pitcher-view .baseball-catcher-container {
  display: block;
  top: 40.2%;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 8;
}

.baseball-catcher-figure {
  width: 78px;
  height: 86px;
  position: relative;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.55));
}

.bb-catcher-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  position: absolute;
  bottom: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

.bb-catcher-sprite--f1 {
  opacity: 1;
}

/* Catcher recibiendo lanzamiento (f1 -> f2 -> f3) */
.baseball-catcher-figure.is-receiving .bb-catcher-sprite--f1 { animation: playCatcherRecF1 0.72s steps(1) forwards; }
.baseball-catcher-figure.is-receiving .bb-catcher-sprite--f2 { animation: playCatcherRecF2 0.72s steps(1) forwards; }
.baseball-catcher-figure.is-receiving .bb-catcher-sprite--f3 { animation: playCatcherRecF3 0.72s steps(1) forwards; }

@keyframes playCatcherRecF1 { 0% { opacity: 1; } 20% { opacity: 0; } 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes playCatcherRecF2 { 0% { opacity: 0; } 20% { opacity: 1; } 62% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playCatcherRecF3 { 0% { opacity: 0; } 62% { opacity: 1; } 94% { opacity: 1; } 100% { opacity: 0; } }

/* Catcher celebrando el Out (f3 -> f4 -> f5 -> f6) */
.baseball-catcher-figure.is-celebrating-out .bb-catcher-sprite--f1 { animation: playCatcherOutF1 0.9s steps(1) forwards; }
.baseball-catcher-figure.is-celebrating-out .bb-catcher-sprite--f3 { animation: playCatcherOutF3 0.9s steps(1) forwards; }
.baseball-catcher-figure.is-celebrating-out .bb-catcher-sprite--f4 { animation: playCatcherOutF4 0.9s steps(1) forwards; }
.baseball-catcher-figure.is-celebrating-out .bb-catcher-sprite--f5 { animation: playCatcherOutF5 0.9s steps(1) forwards; }
.baseball-catcher-figure.is-celebrating-out .bb-catcher-sprite--f6 { animation: playCatcherOutF6 0.9s steps(1) forwards; }

@keyframes playCatcherOutF1 { 0% { opacity: 0; } 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes playCatcherOutF3 { 0% { opacity: 1; } 25% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playCatcherOutF4 { 0% { opacity: 0; } 25% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playCatcherOutF5 { 0% { opacity: 0; } 50% { opacity: 1; } 75% { opacity: 0; } 100% { opacity: 0; } }
@keyframes playCatcherOutF6 { 0% { opacity: 0; } 75% { opacity: 1; } 95% { opacity: 1; } 100% { opacity: 0; } }

/* En vista de lanzador: Bateador rival (#7 frontal) parado dentro de la caja de bateo derecha junto al home plate */
.baseball-diamond-stage.is-pitcher-view .baseball-batter-container {
  bottom: auto;
  top: 44.5%;
  left: 59.5%;
  transform: translate(-50%, -100%);
  z-index: 12;
}

.baseball-diamond-stage.is-pitcher-view .baseball-batter-figure {
  width: 88px;
  height: 128px;
}

/* En vista de lanzador: Pitcher #10 de espaldas con los pies plantados exactamente sobre la goma blanca del montículo */
.baseball-diamond-stage.is-pitcher-view .baseball-pitcher-container {
  top: 86.5%;
  left: 50.2%;
  transform: translate(-50%, -100%);
  z-index: 18;
}

.baseball-diamond-stage.is-pitcher-view .baseball-pitcher-figure {
  width: 155px;
  height: 205px;
}

/* ==============================================================================
   OVERLAY DE BANNERS CÓMIC EXPLOSIÓN (HIT, OUT, FOUL, ERES EL BATEADOR/LANZADOR)
   ============================================================================== */
.baseball-comic-splash-overlay {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.bb-comic-splash-img {
  max-width: 580px;
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 24px rgba(255, 255, 255, 0.75));
  transform: scale(0.3) rotate(-8deg);
  opacity: 0;
}

.baseball-comic-splash-overlay.is-active .bb-comic-splash-img {
  animation: comicSplashPop 1.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes comicSplashPop {
  0% {
    transform: scale(0.2) rotate(-14deg);
    opacity: 0;
  }
  16% {
    transform: scale(1.18) rotate(3deg);
    opacity: 1;
  }
  26% {
    transform: scale(1.05) rotate(0deg);
    opacity: 1;
  }
  84% {
    transform: scale(1.08) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(1.18) rotate(5deg);
    opacity: 0;
  }
}

/* ==============================================================================
   CRUZ DIRECCIONAL TRANSPARENTE ARCADE (D-PAD)
   ============================================================================== */
.baseball-cross-dpad-wrapper {
  position: absolute;
  bottom: 12px;
  right: 24px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 10px 14px 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.bb-dpad-title {
  font-family: var(--cc-font-sans, 'Montserrat', 'Inter', sans-serif);
  font-size: 0.72rem;
  font-weight: 900;
  color: #F8FAFC;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.bb-cross-dpad {
  position: relative;
  width: 140px;
  height: 140px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  align-items: center;
  justify-items: center;
}

.bb-dpad-center {
  grid-column: 2;
  grid-row: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(15, 23, 42, 0.5) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.bb-dpad-center-core {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.bb-dpad-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  width: 44px;
  height: 44px;
  transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  outline: none;
}

.bb-dpad-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

.bb-dpad-btn.is-selected {
  background: linear-gradient(135deg, rgba(242, 140, 40, 0.9) 0%, rgba(217, 119, 6, 0.95) 100%);
  border-color: #FEF08A;
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(242, 140, 40, 0.8), 0 4px 12px rgba(0, 0, 0, 0.5);
  transform: scale(1.08);
}

.bb-dpad-btn--up {
  grid-column: 2;
  grid-row: 1;
}

.bb-dpad-btn--down {
  grid-column: 2;
  grid-row: 3;
}

.bb-dpad-btn--left {
  grid-column: 1;
  grid-row: 2;
}

.bb-dpad-btn--right {
  grid-column: 3;
  grid-row: 2;
}

.bb-dpad-arrow {
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0.85;
}

.bb-dpad-label {
  font-family: var(--cc-font-sans, 'Montserrat', 'Inter', sans-serif);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Pelota Voladora en Perspectiva Realista */
.baseball-flying-ball {
  position: absolute;
  z-index: 30;
  display: none;
  pointer-events: none;
  transform-origin: center center;
}

.bb-ball-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
}

/* Banner Flotante de Resultado */
.baseball-result-banner {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 45;
  display: none !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.8rem;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  animation: bannerPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.baseball-result-banner__main {
  font-family: var(--cc-font-sans, 'Montserrat', 'Inter', sans-serif);
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.baseball-result-banner__sub {
  font-size: 0.85rem;
  font-weight: 800;
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
}

.baseball-result-banner--homerun {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border: 3px solid #FDE68A;
  color: #FFFFFF;
}

.baseball-result-banner--hit {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: 3px solid #A7F3D0;
  color: #FFFFFF;
}

.baseball-result-banner--out {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  border: 3px solid #FECACA;
  color: #FFFFFF;
}

.baseball-result-banner--foul {
  background: linear-gradient(135deg, #64748B 0%, #475569 100%);
  border: 3px solid #CBD5E1;
  color: #FFFFFF;
}

.baseball-result-banner--rival-hr {
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  border: 3px solid #C7D2FE;
  color: #FFFFFF;
}

.baseball-result-banner--rival-hit {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  border: 3px solid #BFDBFE;
  color: #FFFFFF;
}

.baseball-result-banner--rival-out {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: 3px solid #A7F3D0;
  color: #FFFFFF;
}

.baseball-result-banner--sudden-death {
  background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
  border: 3px solid #FCA5A5;
  color: #FFFFFF;
}

@keyframes bannerPop {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* 4. Barra Inferior de Control de Swing (Paso 2) */
.baseball-control-deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 18px;
  padding: 0.75rem 1.25rem;
  box-sizing: border-box;
}

.baseball-deck-left {
  flex: 1;
}

.baseball-selected-pill {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.bb-pill-lbl {
  font-size: 0.65rem;
  font-weight: 800;
  color: #64748B;
  letter-spacing: 0.04em;
}

.bb-pill-val {
  font-family: var(--cc-font-sans, 'Montserrat', 'Inter', sans-serif);
  font-size: 0.88rem;
  font-weight: 900;
  color: #002855;
}

.baseball-deck-center {
  flex: 2;
}

.baseball-swing-meter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bb-meter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 800;
  color: #002855;
}

.bb-meter-target {
  color: #047857;
  font-weight: 900;
}

.baseball-swing-track {
  position: relative;
  width: 100%;
  height: 24px;
  background: #CBD5E1;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.bb-zone-red {
  flex: 1;
  background: #EF4444;
}

.bb-zone-yellow {
  width: 18%;
  background: #F59E0B;
}

.bb-zone-green {
  width: 25%;
  background: #10B981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  transition: width 0.3s ease;
}

.baseball-swing-needle {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 6px;
  background: #FFFFFF;
  border: 1.5px solid #002855;
  border-radius: 3px;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 5;
}

.baseball-deck-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* 5. Barra Inferior de Estadísticas */
.baseball-match-footer {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.75rem;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 0.45rem 1rem;
  flex-wrap: wrap;
}

.baseball-stat-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
}

.baseball-stat-label {
  color: #64748B;
}

.baseball-stat-val {
  font-family: var(--cc-font-sans, 'Montserrat', 'Inter', sans-serif);
  font-size: 0.95rem;
  color: #002855;
  font-weight: 800;
}

.baseball-forfeit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.38rem 0.85rem;
  border-radius: 9999px;
  border: 1.5px solid #EF4444;
  background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
  color: #B91C1C;
  font-family: var(--cc-font-sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
}

.baseball-forfeit-btn:hover {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.baseball-forfeit-btn:active {
  transform: translateY(0);
}

/* Responsividad móvil y pantallas compactas */
@media (max-width: 768px) {
  .baseball-game-card {
    padding: 0.55rem 0.6rem;
    gap: 0.45rem;
    border-radius: 16px;
  }

  /* Marcador TV Broadcast Responsive */
  .baseball-scoreboard-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 14px;
  }

  .baseball-score-team {
    flex: none;
    gap: 0.3rem;
    min-width: 0;
  }

  .baseball-team-info {
    gap: 0.3rem;
    min-width: 0;
  }

  .baseball-team-short {
    font-size: 0.68rem;
    max-width: 70px;
  }

  .baseball-runs-digit {
    font-size: 1.1rem;
    min-width: 28px;
    padding: 0.1rem 0.35rem;
    border-radius: 7px;
  }

  .baseball-inning-pill {
    padding: 0.22rem 0.45rem;
    border-radius: 9px;
    gap: 0.14rem;
    min-width: 0;
    width: 100%;
    max-width: 205px;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .baseball-inning-top-row {
    gap: 0.35rem;
    width: 100%;
    justify-content: center;
  }

  .baseball-inning-badge {
    font-size: 0.52rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .baseball-outs-box {
    gap: 0.25rem;
    padding: 0.08rem 0.35rem;
  }

  .baseball-outs-text {
    font-size: 0.5rem;
    letter-spacing: 0.02em;
  }

  .baseball-outs-lights {
    gap: 0.16rem;
  }

  .baseball-out-light {
    width: 7px;
    height: 7px;
  }

  .baseball-outs-counter {
    font-size: 0.52rem;
    gap: 0.22rem;
    white-space: nowrap;
  }

  .baseball-team-mini-shield svg {
    width: 28px !important;
    height: 28px !important;
  }

  /* Barra de Instrucción Dinámica Apilada Limpiamente en Móvil */
  .baseball-instruction-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
  }

  .bb-inst-step {
    font-size: 0.52rem;
    padding: 0.12rem 0.45rem;
    border-radius: 5px;
    letter-spacing: 0.03em;
  }

  .bb-inst-text {
    font-size: 0.76rem;
    line-height: 1.25;
    width: 100%;
  }

  /* Escenario del Diamante Compacto en Móvil */
  .baseball-diamond-stage {
    min-height: 205px;
    max-height: 245px;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    border-width: 2px;
  }

  .baseball-sound-toggle-btn {
    top: 7px;
    right: 7px;
    padding: 0.25rem 0.55rem;
    font-size: 0.62rem;
    gap: 0.25rem;
  }

  .bb-sound-icon {
    font-size: 0.78rem;
  }

  .baseball-pitch-clock {
    top: 7px;
    left: 7px;
    padding: 0.24rem 0.55rem;
    font-size: 0.62rem;
    gap: 0.25rem;
  }

  .bb-pitch-clock-val {
    font-size: 0.72rem;
    min-width: 22px;
  }

  .baseball-pitch-timeout-banner {
    width: 92%;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
  }

  .bb-timeout-title {
    font-size: 0.72rem;
  }

  .bb-timeout-sub {
    font-size: 0.72rem;
  }

  .baseball-blimp-container {
    top: 1%;
    height: 38px;
  }

  .bb-blimp-sprite {
    width: 52px;
  }

  /* Bateador proporcionado dentro de la caja de bateo izquierda en móvil */
  .baseball-batter-container {
    bottom: auto;
    top: 95.5%;
    left: 42.5%;
    transform: translate(-50%, -100%);
  }

  .baseball-batter-figure {
    width: 86px;
    height: 96px;
  }

  /* Pitcher en el montículo */
  .baseball-pitcher-container {
    top: 57%;
    left: 49.5%;
  }

  .baseball-pitcher-figure {
    width: 48px;
    height: 66px;
  }

  /* Vista de Lanzador (.is-pitcher-view) proporcionada en Móvil */
  .baseball-diamond-stage.is-pitcher-view .baseball-umpire-container {
    top: 36.2%;
    left: 50%;
    transform: translate(-50%, -100%);
  }

  .baseball-umpire-figure {
    width: 38px;
    height: 46px;
  }

  .baseball-diamond-stage.is-pitcher-view .baseball-catcher-container {
    top: 40.2%;
    left: 50%;
    transform: translate(-50%, -100%);
  }

  .baseball-catcher-figure {
    width: 37px;
    height: 41px;
  }

  .baseball-diamond-stage.is-pitcher-view .baseball-batter-container {
    bottom: auto;
    top: 44.5%;
    left: 59.5%;
    transform: translate(-50%, -100%);
  }

  .baseball-diamond-stage.is-pitcher-view .baseball-batter-figure {
    width: 42px;
    height: 62px;
  }

  .baseball-diamond-stage.is-pitcher-view .baseball-pitcher-container {
    top: 86.5%;
    left: 50.2%;
    transform: translate(-50%, -100%);
  }

  .baseball-diamond-stage.is-pitcher-view .baseball-pitcher-figure {
    width: 72px;
    height: 96px;
  }

  /* Cruz Direccional Compacta y Esquinada en Móvil: NO tapa al lanzador ni al bateador */
  .baseball-cross-dpad-wrapper {
    bottom: 6px;
    right: 6px;
    padding: 5px 7px 6px;
    border-radius: 12px;
    width: 126px;
    max-width: 42%;
    transform: none;
    gap: 4px;
    background: rgba(15, 23, 42, 0.76);
  }

  .bb-dpad-title {
    font-family: var(--cc-font-sans, 'Inter', sans-serif);
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.1;
    white-space: normal;
  }

  .bb-cross-dpad {
    width: 104px;
    height: 96px;
  }

  .bb-dpad-btn {
    width: 34px;
    height: 30px;
    padding: 1px 2px;
    border-radius: 6px;
    gap: 1px;
  }

  .bb-dpad-label {
    font-family: var(--cc-font-sans, 'Inter', sans-serif);
    font-size: 0.48rem;
    font-weight: 800;
    letter-spacing: 0;
  }

  .bb-dpad-arrow {
    font-size: 0.52rem;
  }

  .bb-dpad-center {
    width: 20px;
    height: 20px;
  }

  .bb-dpad-center-core {
    width: 7px;
    height: 7px;
  }

  /* Deck de control en móvil */
  .baseball-control-deck {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 0.5rem 0.65rem;
    border-radius: 14px;
  }

  .baseball-selected-pill {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
  }

  .bb-pill-lbl {
    font-size: 0.6rem;
  }

  .bb-pill-val {
    font-family: var(--cc-font-sans, 'Inter', sans-serif);
    font-size: 0.72rem;
    font-weight: 900;
  }

  .bb-meter-label {
    font-size: 0.6rem;
  }

  .baseball-swing-track {
    height: 18px;
    border-radius: 9px;
  }

  .baseball-deck-right .btn-arcade--lg,
  .baseball-deck-right button {
    width: 100%;
    padding: 0.55rem 0.85rem;
    font-size: 0.88rem;
    min-height: 44px;
    border-radius: 12px;
  }

  /* Footer de Estadísticas Compacto en Grid 2x2 */
  .baseball-match-footer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem 0.5rem;
    padding: 0.35rem 0.6rem;
    border-radius: 10px;
  }

  .baseball-stat-chip {
    font-size: 0.65rem;
    justify-content: space-between;
  }

  .baseball-stat-val {
    font-size: 0.75rem;
  }

  .baseball-forfeit-btn {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0.15rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.68rem;
  }

  .bb-comic-splash-img {
    max-width: 90%;
    max-height: 190px;
  }
}

@media (max-width: 640px) {
  .baseball-team-short {
    display: none;
  }
}

@media (max-width: 480px) {
  .baseball-scoreboard-bar {
    padding: 0.3rem 0.45rem;
    gap: 0.25rem;
  }

  .baseball-runs-digit {
    font-size: 1.05rem;
    min-width: 26px;
    padding: 0.08rem 0.3rem;
  }

  .baseball-inning-pill {
    max-width: 190px;
    padding: 0.18rem 0.32rem;
  }

  .baseball-inning-top-row {
    gap: 0.25rem;
  }

  .baseball-inning-badge {
    font-size: 0.46rem;
  }

  .baseball-outs-text {
    font-size: 0.45rem;
  }

  .baseball-out-light {
    width: 6px;
    height: 6px;
  }

  .baseball-outs-counter {
    font-size: 0.46rem;
  }

  .baseball-diamond-stage {
    min-height: 195px;
    max-height: 225px;
  }

  .baseball-batter-figure {
    width: 112px;
    height: 128px;
  }

  .baseball-diamond-stage.is-pitcher-view .baseball-umpire-figure {
    width: 34px;
    height: 40px;
  }

  .baseball-diamond-stage.is-pitcher-view .baseball-catcher-figure {
    width: 34px;
    height: 39px;
  }

  .baseball-diamond-stage.is-pitcher-view .baseball-batter-figure {
    width: 48px;
    height: 56px;
  }

  .baseball-diamond-stage.is-pitcher-view .baseball-pitcher-figure {
    width: 84px;
    height: 110px;
  }
}

/* ==============================================================================
   MODAL DE FIN DE PARTIDO BÉISBOL LVBP (ELEGANTE, PROFESIONAL Y CLARO)
   ============================================================================== */
.baseball-endmatch-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(16, 34, 85, 0.78) 0%, rgba(4, 12, 34, 0.92) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem;
  overflow-y: auto;
  animation: fadeIn 0.25s ease-out;
}

.baseball-endmatch-card {
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  background: #FFFFFF;
  border-radius: 28px;
  border: 3px solid #10B981;
  box-shadow: 0 25px 60px rgba(0, 40, 85, 0.35), 0 0 40px rgba(16, 185, 129, 0.25);
  padding: 1.6rem 1.8rem 1.8rem;
  text-align: center;
  animation: modalScaleUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}

.baseball-endmatch-card--win {
  border-color: #F59E0B;
  box-shadow: 0 25px 60px rgba(0, 40, 85, 0.4), 0 0 45px rgba(245, 158, 11, 0.35);
}

.baseball-endmatch-card--loss {
  border-color: #3B82F6;
  box-shadow: 0 25px 60px rgba(0, 40, 85, 0.35), 0 0 40px rgba(59, 130, 246, 0.25);
}

/* Ilustración Oficial 'YOU WIN!' de Béisbol */
.baseball-youwin-hero-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -0.5rem;
  margin-bottom: 0.65rem;
  animation: heroBounce 1s ease-in-out infinite alternate;
}

.baseball-youwin-hero-img {
  max-width: 290px;
  max-height: 190px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
}

@keyframes heroBounce {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-6px) scale(1.02); }
}

@keyframes modalScaleUp {
  0% { transform: scale(0.88); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.baseball-endmatch-icon {
  font-size: 3.8rem;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.baseball-endmatch-marquee {
  display: inline-block;
  padding: 0.65rem 1.6rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 2px solid #10B981;
  color: #047857;
  font-family: var(--cc-font-sans, system-ui, -apple-system, sans-serif);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.baseball-endmatch-marquee--loss {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border-color: #3B82F6;
  color: #1D4ED8;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

.baseball-abandon-win-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border: 1.5px solid #F59E0B;
  color: #92400E;
  border-radius: 14px;
  padding: 0.65rem 1rem;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}

.baseball-endmatch-rolebar {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.15rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 0.75rem;
}

.baseball-role-col {
  text-align: center;
  flex: 1;
}

.baseball-role-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.baseball-role-name {
  font-weight: 900;
  font-size: 1.05rem;
  color: #002855;
  margin-top: 0.15rem;
}

.baseball-role-divider {
  width: 1.5px;
  height: 32px;
  background: #CBD5E1;
}

.baseball-endmatch-scoreboard {
  background: linear-gradient(135deg, #F8FAFC 0%, #EDF2F7 100%);
  border: 2px solid #CBD5E1;
  border-radius: 20px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
}

.baseball-board-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.baseball-board-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.baseball-board-shield {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12));
}

.baseball-board-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.baseball-board-runs {
  font-family: var(--cc-font-sans, system-ui, -apple-system, sans-serif);
  font-size: 2.5rem;
  font-weight: 900;
  color: #002855;
  line-height: 1;
}

.baseball-board-vs {
  font-weight: 900;
  font-size: 1.2rem;
  color: #94A3B8;
  padding: 0 0.5rem;
}

.baseball-endmatch-ticket {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 18px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.baseball-ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.88rem;
  color: #475569;
}

.baseball-ticket-row--highlight {
  border-top: 1.5px dashed #CBD5E1;
  margin-top: 0.5rem;
  padding-top: 0.65rem;
  font-weight: 800;
  color: #002855;
}

.baseball-ticket-pts {
  font-family: var(--cc-font-sans, system-ui, -apple-system, sans-serif);
  font-size: 1.35rem;
  font-weight: 900;
  color: #10B981;
}

.baseball-ticket-pts--blue {
  color: #3B82F6;
}

.baseball-remaining-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  border-radius: 9999px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1E3A8A;
  margin-bottom: 1.35rem;
}

