@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@500;600;700&display=swap');

/* ==========================================================================
   RESET & VARIABLES GLOBALES — ESTILO DARK SCI-FI / CYBER CÓSMICO
   ========================================================================== */
:root {
    --bg-deep: #020308;
    --cyan-glow: #00f3ff;
    --magenta-glow: #d946ef;
    --gold-glow: #ffb703;
    --red-alert: #ff0055;
    --shield-color: #38bdf8;
    --panel-bg: rgba(6, 11, 25, 0.88);
    --panel-border: rgba(0, 243, 255, 0.3);
    --font-heading: 'Orbitron', monospace;
    --font-body: 'Rajdhani', sans-serif;
    --safe-top: env(safe-area-inset-top, 8px);
    --safe-bottom: env(safe-area-inset-bottom, 8px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

body {
    background-color: var(--bg-deep);
    background-image: 
        radial-gradient(circle at 50% 10%, rgba(90, 24, 154, 0.35), transparent 60%),
        radial-gradient(circle at 20% 85%, rgba(0, 243, 255, 0.15), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(217, 70, 239, 0.12), transparent 45%),
        linear-gradient(rgba(0, 243, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    font-family: var(--font-body);
    color: #e0f2fe;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: none;
}

/* ==========================================================================
   VIEWPORT PRINCIPAL (9:16 VERTICAL NATIVO)
   ========================================================================== */
.game-viewport {
    width: 100%;
    max-width: 480px;
    height: 100%;
    max-height: 920px;
    aspect-ratio: 9 / 16;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
    overflow: hidden;
}

/* ==========================================================================
   HUD SUPERIOR MÍNIMO
   ========================================================================== */
.hud-top-bar {
    width: 100%;
    height: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 10px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), 0 0 10px rgba(0, 243, 255, 0.15);
    z-index: 20;
    margin-bottom: 4px;
}

body.state-start .hud-top-bar,
body.state-start .parry-bubble-container,
body.state-start .special-bubble-container,
body.state-start .tactical-right-column,
body.state-start .touch-drag-zone,
body.state-start .arena-sector-badge,
#overlayStart:not(.hidden) ~ * .arena-sector-badge,
#overlayLevelUp:not(.hidden) .arena-sector-badge,
.level-cleared-overlay:not(.hidden) ~ * .arena-sector-badge {
    display: none !important;
}

/* ==========================================================================
/* ==========================================================================
   BARRA UNIFICADA DE VITALIDAD: VIDA (❤️ IZQ) + ESCUDO (🛡️ DER)
   Una sola barra más gruesa, dos colores, dividida, sin texto
   ========================================================================== */
.hud-vitality-bar-unified {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 4px;
}

.vital-edge-icon {
    font-size: 1.15rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.icon-heart {
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.7));
}

.icon-shield {
    filter: drop-shadow(0 0 6px rgba(0, 243, 255, 0.7));
}

.icon-shield.broken {
    filter: grayscale(0.8) drop-shadow(0 0 4px rgba(239, 68, 68, 0.5));
    opacity: 0.6;
}

.vital-unified-track {
    flex: 1;
    height: 20px;
    background: rgba(15, 23, 42, 0.95);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    position: relative;
    display: flex;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Segmento Vida (Izquierda ~77%) */
.vital-segment.segment-hp {
    flex: 100;
    height: 100%;
    position: relative;
    background: rgba(6, 44, 25, 0.35);
    overflow: hidden;
}

.vital-fill.hp-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #059669, #10b981);
    box-shadow: 0 0 10px #10b981;
    transition: width 0.18s ease-out;
}

.vital-fill.hp-fill.low-hp {
    background: linear-gradient(90deg, #dc2626, #ef4444);
    box-shadow: 0 0 10px #ef4444;
}

/* Divisor sutil entre Vida y Escudo */
.vital-divider {
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 4px #ffffff;
    z-index: 5;
    flex-shrink: 0;
}

/* Segmento Escudo (Derecha ~23% base, ampliable por sobrecarga) */
.vital-segment.segment-shield {
    flex: 30;
    height: 100%;
    position: relative;
    background: rgba(3, 44, 60, 0.35);
    overflow: hidden;
    transition: flex 0.85s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.vital-segment.segment-shield.shield-expanding {
    box-shadow: 0 0 16px #00f3ff, inset 0 0 10px rgba(0, 243, 255, 0.8);
}

.vital-edge-icon.icon-shield.shield-expanding {
    transform: scale(1.35) rotate(12deg);
    filter: drop-shadow(0 0 14px #00f3ff);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vital-edge-icon.icon-heart.hp-expanding {
    transform: scale(1.35) rotate(-10deg);
    filter: drop-shadow(0 0 14px #10b981) drop-shadow(0 0 20px #ef4444);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animación de crecimiento y sobrecarga visual de la barra unificada */
@keyframes shieldBarGrow {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(0, 243, 255, 0));
    }
    40% {
        transform: scale(1.06);
        filter: drop-shadow(0 0 16px #00f3ff) drop-shadow(0 0 28px rgba(0, 243, 255, 0.6));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(0, 243, 255, 0.35));
    }
}

.hud-vitality-bar-unified.shield-expanding {
    animation: shieldBarGrow 0.85s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vital-fill.shield-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #0284c7, #00f3ff);
    box-shadow: 0 0 10px #00f3ff;
    transition: width 0.15s ease-out;
}

.vital-segment.segment-shield.broken {
    background: rgba(45, 10, 15, 0.85);
}

.vital-segment.segment-shield.broken .shield-fill {
    width: 0% !important;
}

.vital-segment.segment-shield.regenerating .shield-fill {
    animation: shieldRegenPulse 0.75s ease-in-out infinite alternate;
}

@keyframes shieldRegenPulse {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.75) drop-shadow(0 0 10px #00f3ff); }
}

/* Zona táctil central invisible de pausa */
.center-pause-hotspot {
    position: absolute;
    top: 44%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 160px;
    z-index: 12;
    background: transparent;
    border: 0;
    outline: none;
    box-shadow: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.center-pause-hotspot:focus,
.center-pause-hotspot:focus-visible,
.center-pause-hotspot:active {
    background: transparent;
    border: 0;
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}

.canvas-arena-container,
#gameCanvas {
    -webkit-tap-highlight-color: transparent;
}

/* Etiqueta sutil de Sector/Nivel en la esquina superior izquierda de la arena */
.arena-sector-badge {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 15;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    background: rgba(4, 10, 24, 0.65);
    border: 1px solid rgba(0, 243, 255, 0.28);
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(0, 243, 255, 0.85);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.arena-sector-badge .sector-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cyan-glow);
    box-shadow: 0 0 6px var(--cyan-glow);
}

/* Superjefe: identificación del rango CAPITÁN sin un rojo agresivo. */
.arena-sector-badge.captain-mode {
    background: rgba(38, 8, 13, 0.72);
    border-color: rgba(196, 68, 83, 0.42);
    color: rgba(238, 128, 139, 0.92);
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.55), 0 0 8px rgba(145, 36, 49, 0.12);
}

.arena-sector-badge.captain-mode .sector-dot {
    background: #c45562;
    box-shadow: 0 0 5px rgba(196, 85, 98, 0.65);
}

.hud-crystal-badge {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    background: rgba(0, 243, 255, 0.12);
    border: 1px solid rgba(0, 243, 255, 0.4);
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cyan-glow);
    text-shadow: 0 0 6px var(--cyan-glow);
    white-space: nowrap;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center right;
}

.hud-crystal-badge.inflated {
    animation: crystalBadgeInflate 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes crystalBadgeInflate {
    0% {
        transform: scale(1);
        background: rgba(0, 243, 255, 0.12);
        box-shadow: 0 0 0 rgba(0, 243, 255, 0);
    }
    30% {
        transform: scale(1.42);
        background: rgba(0, 243, 255, 0.45);
        border-color: #ffffff;
        box-shadow: 0 0 16px rgba(0, 243, 255, 0.95), 0 0 30px rgba(0, 243, 255, 0.7);
        color: #ffffff;
        text-shadow: 0 0 10px #ffffff, 0 0 18px var(--cyan-glow);
    }
    65% {
        transform: scale(1.12);
        background: rgba(0, 243, 255, 0.25);
        box-shadow: 0 0 12px rgba(0, 243, 255, 0.6);
    }
    100% {
        transform: scale(1);
        background: rgba(0, 243, 255, 0.12);
        box-shadow: 0 0 6px rgba(0, 243, 255, 0.3);
    }
}

.hud-crystal-icon {
    font-size: 0.75rem;
    filter: drop-shadow(0 0 4px var(--cyan-glow));
    transition: transform 0.2s ease;
}

.hud-crystal-badge.inflated .hud-crystal-icon {
    animation: crystalIconSpin 0.5s ease-out;
}

@keyframes crystalIconSpin {
    0% {
        transform: scale(1) rotate(0deg);
    }
    30% {
        transform: scale(1.5) rotate(-22deg);
        filter: drop-shadow(0 0 10px #ffffff) drop-shadow(0 0 18px var(--cyan-glow));
    }
    65% {
        transform: scale(1.15) rotate(12deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 4px var(--cyan-glow));
    }
}

.hud-score-combo {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 60px;
}

.hud-score-val {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffea00;
    text-shadow: 0 0 8px rgba(255, 234, 0, 0.6);
    line-height: 1;
}

.hud-combo-tag {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--cyan-glow);
    text-shadow: 0 0 6px var(--cyan-glow);
    animation: comboPulse 0.4s ease-in-out infinite alternate;
}

@keyframes comboPulse {
    0% { transform: scale(0.95); }
    100% { transform: scale(1.08); }
}

.hud-btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    padding: 4px 7px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hud-btn-icon:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--cyan-glow);
}

/* ==========================================================================
   ARENA DE COMBATE Y CANVAS (9:16)
   ========================================================================== */
.canvas-arena-container {
    flex: 1;
    width: 100%;
    position: relative;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 243, 255, 0.25);
    background: #020308;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.08), inset 0 0 30px rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Lienzo Superior de Superposición de Bolas (Pasa por encima de los pufos tácticos) */
.ball-overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    z-index: 35; /* Superior a la columna de pufos tácticos (z-index: 30) */
    pointer-events: none; /* Cero interferencia con eventos táctiles y pulsaciones de pufos */
}

/* Zona táctil amplia e invisible alrededor de la nave.
   Ocupa laterales, franja inferior y sube claramente por encima del caza para que
   el pulgar no tenga que acertar sobre la silueta. */
.touch-drag-zone {
    position: absolute;
    bottom: -3%;
    left: -8%;
    width: 116%;
    height: 78%;
    z-index: 10;
    cursor: grab;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.touch-drag-zone:active {
    cursor: grabbing;
}

/* Banner de Alerta Táctica Flotante */
.tactical-banner {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(255, 0, 85, 0.85), transparent);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 20px;
    border-radius: 4px;
    text-shadow: 0 0 8px #ff0055;
    z-index: 15;
    pointer-events: none;
    animation: bannerFade 2s ease-in-out forwards;
}

@keyframes bannerFade {
    0% { opacity: 0; transform: translate(-50%, -10px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -10px); }
}

/* ==========================================================================
   PUFOS TÁCTICOS SUPERIORES (Alineados en la línea del sector a la derecha)
   ========================================================================== */
.tactical-right-column {
    position: absolute;
    top: 6px;
    right: 10px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    z-index: 30;
    pointer-events: auto;
    transition: opacity 0.2s ease;
}

.tactical-col-bubble {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: radial-gradient(circle, rgba(10, 16, 32, 0.78) 45%, rgba(2, 6, 18, 0.90) 100%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.28) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 243, 255, 0.16) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Reactividad sutil cuando la bola pasa por lo alto de los pufos */
.tactical-right-column.ball-over .tactical-col-bubble {
    border-color: rgba(0, 243, 255, 0.55) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8), 0 0 14px rgba(0, 243, 255, 0.35) !important;
}

.tactical-col-bubble:hover {
    transform: scale(1.06);
}

.tactical-col-bubble .bubble-icon {
    font-size: 1.05rem;
}

.tactical-col-bubble .bubble-label {
    font-size: 0.35rem;
    letter-spacing: 0.4px;
}

.tactical-col-bubble .bubble-badge {
    top: -4px;
    right: -4px;
    font-size: 0.46rem;
    padding: 1px 4px;
}

/* ==========================================================================
   GLOBO TÁCTICO FLOTANTE PARA ACCIONES ESPECIALES (LATERAL DERECHO)
   ========================================================================== */
.special-bubble-container {
    position: absolute;
    bottom: 180px; /* Muy por encima del área de arrastre inferior de la nave */
    right: 14px;
    z-index: 30;
    pointer-events: auto;
}

.special-bubble-container.hand-mode-left {
    right: auto;
    left: 14px;
}

/* Pufo del Parry (Lateral Izquierdo Flotante) */
.parry-bubble-container {
    position: absolute;
    bottom: 180px;
    left: 14px;
    z-index: 30;
    pointer-events: auto;
}

.parry-bubble-container.hand-mode-left {
    left: auto;
    right: 14px;
}

.parry-bubble {
    border-color: rgba(0, 243, 255, 0.35);
}

.parry-bubble.ready {
    border-color: var(--cyan-glow) !important;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.28), inset 0 0 6px rgba(0, 243, 255, 0.15) !important;
}

.parry-bubble.ready .bubble-badge {
    background: rgba(0, 243, 255, 0.2) !important;
    color: var(--cyan-glow) !important;
    border-color: var(--cyan-glow) !important;
    box-shadow: 0 0 6px rgba(0, 243, 255, 0.45) !important;
}

.parry-bubble.ready .bubble-pulse-ring {
    border-color: rgba(0, 243, 255, 0.35) !important;
}

.parry-bubble.disabled {
    opacity: 0.42;
    filter: grayscale(0.85);
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

.parry-bubble.disabled .bubble-badge {
    background: #1e293b !important;
    color: #94a3b8 !important;
    border-color: #64748b !important;
    box-shadow: none !important;
}

.parry-bubble.disabled .bubble-pulse-ring {
    display: none !important;
}

.parry-bubble.cooldown {
    opacity: 0.65;
    filter: saturate(0.6);
    border-color: rgba(255, 170, 0, 0.5) !important;
}

.parry-bubble.cooldown .bubble-badge {
    background: rgba(255, 170, 0, 0.2) !important;
    color: #ffaa00 !important;
    border-color: #ffaa00 !important;
}

.parry-bubble.active-parry {
    border-color: #ffffff !important;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.3) 30%, rgba(2, 6, 18, 0.98) 100%) !important;
    box-shadow: 0 0 14px rgba(0, 243, 255, 0.55), inset 0 0 8px rgba(255, 255, 255, 0.6) !important;
    transform: scale(1.08);
}

/* 4. Arquetipo Escudo Parry: Parry Supercargado x2 (Aura Ámbar / Dorada de Alta Potencia) */
.parry-bubble.parry-supercharged {
    border-color: #ffb703 !important;
    background: radial-gradient(circle, rgba(255, 183, 3, 0.28) 25%, rgba(2, 6, 18, 0.98) 100%) !important;
    box-shadow: 0 0 22px rgba(255, 183, 3, 0.65), 0 0 38px rgba(255, 234, 0, 0.45), inset 0 0 12px rgba(255, 234, 0, 0.35) !important;
    animation: superchargedPulse 2s ease-in-out infinite alternate !important;
}

@keyframes superchargedPulse {
    0% {
        box-shadow: 0 0 16px rgba(255, 183, 3, 0.55), 0 0 28px rgba(255, 234, 0, 0.35), inset 0 0 8px rgba(255, 234, 0, 0.25);
    }
    100% {
        box-shadow: 0 0 28px rgba(255, 183, 3, 0.88), 0 0 48px rgba(255, 234, 0, 0.65), inset 0 0 16px rgba(255, 234, 0, 0.55);
    }
}

.parry-bubble.parry-supercharged .bubble-badge {
    background: rgba(255, 183, 3, 0.3) !important;
    color: #ffea00 !important;
    border-color: #ffb703 !important;
    box-shadow: 0 0 10px rgba(255, 183, 3, 0.75) !important;
    font-weight: 900 !important;
}

.parry-bubble.parry-supercharged .bubble-pulse-ring {
    border-color: rgba(255, 234, 0, 0.7) !important;
    border-width: 2px !important;
    animation: ringOrbit 2.8s linear infinite !important;
}

.parry-bubble.parry-supercharged .bubble-label {
    color: #ffea00 !important;
    text-shadow: 0 0 8px rgba(255, 183, 3, 0.85) !important;
}

.parry-bubble.parry-supercharged .bubble-icon {
    filter: drop-shadow(0 0 10px #ffb703) !important;
}

.parry-bubble.parry-supercharged.active-parry {
    border-color: #ffffff !important;
    background: radial-gradient(circle, rgba(255, 234, 0, 0.45) 30%, rgba(2, 6, 18, 0.98) 100%) !important;
    box-shadow: 0 0 28px rgba(255, 234, 0, 0.9), inset 0 0 12px rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.12);
}

.special-action-bubble {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.95) 45%, rgba(2, 6, 18, 0.98) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    padding: 0;
}

.special-action-bubble.hidden {
    display: none !important;
    opacity: 0;
    transform: scale(0.3);
    pointer-events: none;
}

.special-action-bubble:not(.hidden) {
    animation: bubblePopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bubblePopIn {
    0% { transform: scale(0.3); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.special-action-bubble:hover {
    transform: scale(1.08);
}

.special-action-bubble:active {
    transform: scale(0.92);
}

/* Animación de inflado elástico al absorber recargas de armas */
.special-action-bubble.inflated {
    animation: bubbleInflate 0.52s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes bubbleInflate {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
    }
    35% {
        transform: scale(1.38);
        filter: drop-shadow(0 0 18px #ffffff) drop-shadow(0 0 32px currentColor);
        border-color: #ffffff !important;
    }
    70% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 12px currentColor);
    }
    100% {
        transform: scale(1);
    }
}

.special-action-bubble.inflated .bubble-icon {
    animation: bubbleIconBounce 0.52s ease-out;
}

@keyframes bubbleIconBounce {
    0% { transform: scale(1); }
    35% { transform: scale(1.45) rotate(-12deg); filter: drop-shadow(0 0 12px #ffffff); }
    70% { transform: scale(1.1) rotate(6deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.special-action-bubble.inflated .bubble-badge {
    animation: bubbleBadgePop 0.52s ease-out;
}

@keyframes bubbleBadgePop {
    0% { transform: scale(1); }
    35% { transform: scale(1.5); background: #ffffff !important; color: #000000 !important; box-shadow: 0 0 16px #ffffff !important; }
    100% { transform: scale(1); }
}

.special-action-bubble.empty {
    opacity: 0.52;
    filter: grayscale(0.6);
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

.special-action-bubble.empty .bubble-badge {
    background: #475569 !important;
    color: #e2e8f0 !important;
    border-color: #64748b !important;
    box-shadow: none !important;
}

.special-action-bubble.empty .bubble-pulse-ring {
    display: none !important;
}

.bubble-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    z-index: 2;
}

.bubble-icon {
    font-size: 1.45rem;
    line-height: 1;
    filter: drop-shadow(0 0 6px currentColor);
}

.bubble-label {
    font-family: var(--font-heading);
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #ffffff;
    line-height: 1;
    margin-top: 1px;
}

.bubble-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-family: var(--font-heading);
    font-size: 0.58rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 9999px;
    background: #0f172a;
    color: #ffffff;
    border: 1.5px solid currentColor;
    line-height: 1;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
    z-index: 5;
}

/* Anillo de pulso holográfico exterior */
.bubble-pulse-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px dashed rgba(255, 255, 255, 0.25);
    animation: ringOrbit 6s linear infinite;
    pointer-events: none;
}

@keyframes ringOrbit {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Temas Neón por Tipo de Arma Especial */
/* 1. Misil Táctico (Ámbar Dorado) */
.special-action-bubble.type-missile {
    border-color: #ffaa00;
    box-shadow: 0 0 22px rgba(255, 170, 0, 0.5), inset 0 0 14px rgba(255, 170, 0, 0.2);
}
.special-action-bubble.type-missile .bubble-badge {
    color: #ffaa00;
    border-color: #ffaa00;
}
.special-action-bubble.type-missile .bubble-pulse-ring {
    border-color: rgba(255, 170, 0, 0.45);
}

/* 2. Rayo Láser Orbital (Cian Plasma) */
.special-action-bubble.type-laser {
    border-color: #00f3ff;
    box-shadow: 0 0 24px rgba(0, 243, 255, 0.6), inset 0 0 16px rgba(0, 243, 255, 0.25);
}
.special-action-bubble.type-laser .bubble-badge {
    color: #00f3ff;
    border-color: #00f3ff;
}
.special-action-bubble.type-laser .bubble-pulse-ring {
    border-color: rgba(0, 243, 255, 0.5);
}

/* 3. Onda Expansiva / Nova EMP (Púrpura / Magenta) */
.special-action-bubble.type-shockwave {
    border-color: #d946ef;
    box-shadow: 0 0 24px rgba(217, 70, 239, 0.6), inset 0 0 16px rgba(217, 70, 239, 0.25);
}
.special-action-bubble.type-shockwave .bubble-badge {
    color: #d946ef;
    border-color: #d946ef;
}
.special-action-bubble.type-shockwave .bubble-pulse-ring {
    border-color: rgba(217, 70, 239, 0.5);
}

.tactical-bottom-bar {
    display: none;
}

/* Modo Zurdo */
.tactical-bottom-bar.hand-mode-left {
    flex-direction: row-reverse;
}

.tactical-btn {
    flex: 1;
    position: relative;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(4, 9, 20, 0.98));
    border: 1.5px solid rgba(0, 243, 255, 0.35);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.1s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    padding: 4px;
}

.tactical-btn:active {
    transform: scale(0.96);
}

.btn-tactical-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    gap: 2px;
}

.btn-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.btn-name {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    line-height: 1;
}

.btn-charge-badge, .btn-status-sub {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-top: 1px;
    line-height: 1.2;
}

/* Botón Misil */
.btn-missile {
    border-color: rgba(255, 170, 0, 0.4);
}

.btn-missile .btn-charge-badge {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    border: 1px solid #ffaa00;
}

.btn-missile.ready {
    border-color: #ffaa00;
    box-shadow: 0 0 14px rgba(255, 170, 0, 0.4);
}

/* Botón Central Deflector (Parry) — Destacado */
.btn-deflector {
    flex: 1.25;
    border-color: var(--cyan-glow);
    background: linear-gradient(180deg, rgba(0, 243, 255, 0.1), rgba(8, 14, 32, 0.95));
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.25);
}

.btn-deflector .btn-icon {
    font-size: 1.45rem;
}

.btn-deflector .btn-name {
    font-size: 0.72rem;
    color: var(--cyan-glow);
    text-shadow: 0 0 8px var(--cyan-glow);
}

.btn-deflector .btn-status-sub {
    background: rgba(0, 243, 255, 0.2);
    color: var(--cyan-glow);
    border: 1px solid var(--cyan-glow);
}

.btn-deflector.active-parry {
    border-color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 243, 255, 0.4), rgba(0, 243, 255, 0.1));
    box-shadow: 0 0 25px #00f3ff, inset 0 0 15px #ffffff;
    animation: parryPulse 0.15s ease-in-out infinite alternate;
}

@keyframes parryPulse {
    0% { transform: scale(1.02); }
    100% { transform: scale(1.08); }
}

.btn-deflector.blocked {
    border-color: #ef4444;
    opacity: 0.6;
}

.btn-deflector.blocked .btn-status-sub {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: #ef4444;
}

/* Botón Warp */
.btn-warp {
    border-color: rgba(217, 70, 239, 0.4);
}

.btn-warp .btn-charge-badge {
    background: rgba(217, 70, 239, 0.2);
    color: var(--magenta-glow);
    border: 1px solid var(--magenta-glow);
}

.btn-warp.ready {
    border-color: var(--magenta-glow);
    box-shadow: 0 0 14px rgba(217, 70, 239, 0.4);
}

/* Barras de Enfriamiento en Botones */
.tactical-cooldown-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: rgba(0, 243, 255, 0.18);
    z-index: 1;
    pointer-events: none;
    transition: height 0.1s linear;
}

/* ==========================================================================
   PORTADA Y HANGAR DE NAVES (METAPROGRESIÓN)
   ========================================================================== */
.cover-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: var(--safe-top) 16px var(--safe-bottom) 16px;
    pointer-events: auto;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.cover-content {
    width: 100%;
    max-width: 440px;
    min-height: 100%;
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    padding: 2px 0 8px 0;
    box-sizing: border-box;
}

/* Contenedor de Flujo Principal (Top Group + Hangar) para aprovechar el alto de pantalla */
.cover-main-flow {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: space-evenly;
}

/* Cabecera Superior Agrupada (Sin espacios vacíos) */
.cover-top-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* 1. Hueco Libre Superior (Full Width, Altura Compacta 48px) */
.ad-banner-top {
    width: 100%;
    max-width: 420px;
    height: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.ad-banner-tag {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 2px;
    color: #475569;
    text-transform: uppercase;
    font-weight: 700;
}

/* 2. Insignia Superior */
.cover-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.80rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: #94a3b8;
    margin: 2px 0;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--cyan-glow);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--cyan-glow);
}

/* 3. Título Principal GameBallCard & Descriptor Minimalista */
.cover-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1px;
}

.brand-pill {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    padding: 2px 10px;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.cover-logo-main {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 900;
    letter-spacing: 4px;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 243, 255, 0.4);
    margin: 1px 0 5px 0;
}

.brand-accent {
    color: var(--cyan-glow);
}

/* Bucle de juego instantáneo en 3 pasos (Comprensión en 1 segundo) */
.cover-gameplay-glance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 4px 12px;
    margin-top: 2px;
}

.glance-step {
    display: flex;
    align-items: center;
    gap: 5px;
}

.step-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pulse-cyan {
    background: #00f3ff;
    box-shadow: 0 0 6px #00f3ff;
}

.pulse-purple {
    background: #c084fc;
    box-shadow: 0 0 6px #c084fc;
}

.pulse-gold {
    background: #ffb703;
    box-shadow: 0 0 6px #ffb703;
}

.step-text {
    font-size: 0.70rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #e2e8f0;
}

.glance-sep {
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
}

/* 4. Panel de Moneda Permanente */
.core-fragments-display {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 183, 3, 0.08);
    border: 1px solid rgba(255, 183, 3, 0.35);
    border-radius: 16px;
    padding: 3px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fef08a;
    margin: 3px 0 2px 0;
}

.fragment-icon {
    font-size: 0.95rem;
}

.fragment-label {
    letter-spacing: 1px;
    font-size: 0.70rem;
    color: #fde047;
}

.fragment-value {
    font-family: var(--font-heading);
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 1px;
}

/* 5. Hangar de Cazas — Estilo Minimalista Glassmorphism */
.hangar-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 1px;
}

.hangar-title {
    font-family: var(--font-heading);
    font-size: 0.76rem;
    letter-spacing: 2px;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.ship-select-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.ship-card {
    background: rgba(13, 20, 36, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    min-height: 92px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

.ship-card:hover {
    border-color: rgba(0, 243, 255, 0.4);
    background: rgba(16, 27, 48, 0.9);
}

.ship-card.active {
    border-color: #00f3ff !important;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.12), rgba(15, 23, 42, 0.9)) !important;
    box-shadow: 0 0 18px rgba(0, 243, 255, 0.3) !important;
}

.ship-card.locked {
    background: rgba(8, 12, 22, 0.7);
    border-color: rgba(255, 255, 255, 0.07);
    opacity: 0.85;
}

.ship-card.locked:hover {
    opacity: 0.95;
    border-color: rgba(255, 255, 255, 0.15);
}

.ship-icon-box {
    width: 56px;
    height: 56px;
    min-width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.ship-card.active .ship-icon-box {
    border-color: rgba(0, 243, 255, 0.55);
    background: rgba(0, 243, 255, 0.12);
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.25);
}

.ship-svg-icon {
    width: 40px;
    height: 40px;
}

.ship-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    min-width: 0;
}

.ship-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.ship-title-box {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.ship-name {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1px;
    line-height: 1;
    flex-shrink: 0;
}

.ship-card.active .ship-name {
    color: #00f3ff;
}

.ship-role-tag {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 4px;
    padding: 1px 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ship-role-tag.viper-tag {
    color: #e879f9;
    background: rgba(232, 121, 249, 0.1);
    border-color: rgba(232, 121, 249, 0.25);
}

.ship-role-tag.bastion-tag {
    color: #facc15;
    background: rgba(250, 204, 21, 0.1);
    border-color: rgba(250, 204, 21, 0.25);
}

.ship-action-box {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    margin-left: auto;
}

/* Icono de Nave Desplegada (sin texto, minimalista con halo pulsante) */
.ship-status-icon.deployed {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 243, 255, 0.14);
    border: 1.5px solid #00f3ff;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: deployedPulseRing 2.4s ease-in-out infinite;
}

@keyframes deployedPulseRing {
    0%, 100% {
        box-shadow: 0 0 6px rgba(0, 243, 255, 0.4);
        border-color: #00f3ff;
    }
    50% {
        box-shadow: 0 0 14px rgba(0, 243, 255, 0.85);
        border-color: #ffffff;
    }
}

/* Grilla de Estadísticas Visuales Minimalista (Solo Iconos Representativos + Medidores) */
.ship-stats-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    width: 100%;
}

.stat-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 5px 8px;
    flex: 1;
    min-width: 0;
    min-height: 28px;
    box-sizing: border-box;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ship-card.active .stat-chip {
    background: rgba(0, 243, 255, 0.08);
    border-color: rgba(0, 243, 255, 0.28);
}

.stat-svg {
    flex-shrink: 0;
    display: inline-block;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.6));
}

.stat-svg-shield {
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.4));
}

.stat-svg-paddle {
    filter: drop-shadow(0 0 4px rgba(0, 243, 255, 0.4));
}

.stat-svg-speed {
    filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.4));
}

.s-val {
    font-size: 0.82rem;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-heading);
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.s-meter {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.s-meter i {
    width: 7px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
}

.s-meter i.on {
    background: #00f3ff;
    box-shadow: 0 0 6px rgba(0, 243, 255, 0.7);
}

.ship-card[data-ship="viper"] .s-meter i.on {
    background: #d946ef;
    box-shadow: 0 0 6px rgba(217, 70, 239, 0.7);
}

.ship-card[data-ship="bastion"] .s-meter i.on {
    background: #ffb703;
    box-shadow: 0 0 6px rgba(255, 183, 3, 0.7);
}

.s-meter i.off {
    background: rgba(255, 255, 255, 0.14);
}

/* Botón de Selección con Candado Abierto, Fondo Verde y Animación de Atención */
.ship-status-pill.select-unlocked-btn,
.ship-card-status.unlocked,
.ship-status-pill.available {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(21, 128, 61, 0.55)) !important;
    border: 1.5px solid #22c55e !important;
    border-radius: 8px;
    color: #86efac !important;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    animation: lockAttentionPulse 2s ease-in-out infinite;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
    transition: all 0.15s ease;
}

.ship-status-pill.select-unlocked-btn:hover,
.ship-status-pill.select-unlocked-btn:active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.45), rgba(21, 128, 61, 0.75)) !important;
    border-color: #4ade80 !important;
    transform: scale(1.04);
}

.lock-anim-icon {
    display: inline-block;
    font-size: 0.85rem;
    line-height: 1;
    transform-origin: center bottom;
    animation: lockWiggle 2s ease-in-out infinite;
}

@keyframes lockAttentionPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
        border-color: #22c55e;
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 16px rgba(74, 222, 128, 0.85), inset 0 0 8px rgba(74, 222, 128, 0.25);
        border-color: #4ade80;
    }
}

@keyframes lockWiggle {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(-12deg) scale(1.12); }
    30% { transform: rotate(12deg) scale(1.12); }
    45% { transform: rotate(-8deg) scale(1.05); }
    60% { transform: rotate(0deg) scale(1); }
}

/* Estado de Nave Desbloqueable */
.ship-card.can-unlock {
    border: 1px solid #22c55e !important;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(15, 23, 42, 0.85)) !important;
    opacity: 1 !important;
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.3) !important;
}

.btn-unlock-ship {
    background: rgba(255, 183, 3, 0.12);
    border: 1px solid rgba(255, 183, 3, 0.45);
    color: #ffea00;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-unlock-ship.can-unlock {
    background: rgba(34, 197, 94, 0.18);
    border-color: #22c55e;
    color: #4ade80;
}

@keyframes iconBounceSubtle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Botón de Desbloqueo con Candado Animado */
.btn-unlock-ship {
    background: rgba(255, 183, 3, 0.16);
    border: 1.5px solid var(--gold-glow);
    color: var(--gold-glow);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 10px rgba(255, 183, 3, 0.25);
    transition: all 0.15s ease;
    white-space: nowrap;
    z-index: 6;
    position: relative;
    animation: lockGlowPulse 2.8s ease-in-out infinite;
}

.btn-unlock-ship.can-unlock {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(16, 185, 129, 0.35));
    border: 1.5px solid #22c55e;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
    animation: unlockBtnReadyPulse 1.6s ease-in-out infinite;
}

.btn-unlock-ship.can-unlock b {
    color: #86efac;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

@keyframes unlockBtnReadyPulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 22px rgba(74, 222, 128, 0.85);
        transform: scale(1.04);
    }
}

.btn-unlock-ship b {
    color: #ffea00;
    font-size: 0.88rem;
    font-weight: 900;
}

.btn-unlock-ship:active {
    transform: scale(0.95);
}

/* Icono del Candado Abierto cuando está disponible */
.btn-unlock-ship .lock-icon.open {
    display: inline-block;
    font-size: 1.05rem;
    line-height: 1;
    transform-origin: center bottom;
    animation: openLockBounce 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.9));
}

@keyframes openLockBounce {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.2) translateY(-2px);
    }
}

/* Icono del Candado con sacudida y brillo llamativo */
.btn-unlock-ship .lock-icon {
    display: inline-block;
    font-size: 0.95rem;
    line-height: 1;
    transform-origin: center bottom;
    animation: lockJiggle 2.8s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8));
}

@keyframes lockJiggle {
    0%, 72% {
        transform: scale(1) rotate(0deg);
    }
    76% {
        transform: scale(1.22) rotate(-14deg);
    }
    80% {
        transform: scale(1.25) rotate(14deg);
    }
    84% {
        transform: scale(1.22) rotate(-10deg);
    }
    88% {
        transform: scale(1.18) rotate(8deg);
    }
    92% {
        transform: scale(1.1) rotate(-3deg);
    }
    96%, 100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes lockGlowPulse {
    0%, 72% {
        box-shadow: 0 0 8px rgba(255, 183, 3, 0.25);
        border-color: rgba(255, 183, 3, 0.5);
    }
    82% {
        box-shadow: 0 0 18px rgba(255, 183, 3, 0.8), inset 0 0 8px rgba(255, 183, 3, 0.3);
        border-color: #ffea00;
    }
    100% {
        box-shadow: 0 0 8px rgba(255, 183, 3, 0.25);
        border-color: rgba(255, 183, 3, 0.5);
    }
}

.ship-category-tag {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--cyan-glow);
}

.ship-card[data-ship="viper"] .ship-category-tag {
    color: var(--magenta-glow);
}

.ship-card[data-ship="bastion"] .ship-category-tag {
    color: var(--gold-glow);
}

.ship-desc {
    font-size: 0.92rem;
    color: #cbd5e1;
    font-weight: 500;
    margin: 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ship-desc b {
    color: #ffffff;
    font-weight: 700;
}

/* 6. Botón Principal de Lanzamiento */
.btn-arcade {
    font-family: var(--font-heading);
    font-weight: 900;
    padding: 12px 24px;
    background: linear-gradient(180deg, #0284c7, #0369a1);
    color: #ffffff;
    border: 1.5px solid var(--cyan-glow);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
    letter-spacing: 1.5px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-arcade:active {
    transform: scale(0.96);
}

.btn-start-glow {
    width: 86%;
    max-width: 310px;
    min-height: 52px;
    font-size: 1.12rem;
    padding: 12px 24px;
    border-radius: 26px;
    background: linear-gradient(135deg, #00f3ff, #0284c7);
    border: none;
    color: #020308;
    font-weight: 900;
    text-shadow: none;
    letter-spacing: 2px;
    margin: 6px auto 8px auto;
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.4);
    animation: startPulseCTA 2.5s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}

@keyframes startPulseCTA {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 18px rgba(0, 243, 255, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 26px rgba(0, 243, 255, 0.65);
    }
}

.btn-start-glow:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 28px rgba(0, 243, 255, 0.7);
}

.btn-danger {
    background: linear-gradient(180deg, #e11d48, #be123c);
    border-color: #ff0055;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.4);
}

/* 7. Herramientas Inferiores de Portada Minimalistas */
.cover-footer-settings {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 410px;
    justify-content: space-between;
}

.cover-tool-btn {
    flex: 1;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.cover-tool-btn:hover, .cover-tool-btn:active {
    border-color: rgba(0, 243, 255, 0.4);
    color: #ffffff;
    background: rgba(0, 243, 255, 0.08);
}

/* ==========================================================================
   MODAL DE ROGUELITE PERKS (3 CARTAS)
   ========================================================================== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(2, 3, 8, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 120;
    padding: var(--safe-top) 16px var(--safe-bottom) 16px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.hidden,
.overlay.hidden,
.cover-overlay.hidden,
.cover-help-modal.hidden {
    display: none !important;
}

.perk-modal-content {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.perk-header {
    text-align: center;
}

.perk-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--gold-glow);
    text-shadow: 0 0 15px rgba(255, 183, 3, 0.7);
    margin-bottom: 2px;
}

.perk-sub {
    font-size: 0.72rem;
    color: #94a3b8;
}

.perk-cards-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 2px 0;
}

.perk-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(8, 14, 30, 0.98));
    border: 1.8px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    min-height: 72px;
    transition: all 0.18s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65);
    position: relative;
    overflow: hidden;
}

.perk-card:hover {
    transform: translateY(-2px);
    border-color: #fff;
    box-shadow: 0 0 22px rgba(0, 243, 255, 0.45);
}

.perk-card.rarity-common {
    border-color: var(--cyan-glow);
}

.perk-card.rarity-rare {
    border-color: var(--magenta-glow);
    box-shadow: 0 0 16px rgba(217, 70, 239, 0.35);
}

.perk-card.rarity-epic {
    border-color: var(--gold-glow);
    box-shadow: 0 0 20px rgba(255, 183, 3, 0.45);
}

.perk-card.selected {
    border-color: var(--gold-glow) !important;
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.25), rgba(15, 23, 42, 0.98)) !important;
    box-shadow: 0 0 28px rgba(255, 183, 3, 0.8) !important;
    transform: scale(1.02);
}

.perk-card.selected .perk-name {
    color: var(--gold-glow);
    text-shadow: 0 0 10px rgba(255, 183, 3, 0.8);
}

.perk-icon-box {
    font-size: 1.85rem;
    min-width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.perk-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    min-width: 0;
}

.perk-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.perk-name {
    font-family: var(--font-heading);
    font-size: 1.0rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.4px;
    line-height: 1.2;
    flex: 1;
}

.perk-tier {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    color: var(--gold-glow);
    font-weight: 800;
    background: rgba(255, 183, 3, 0.18);
    border: 1px solid rgba(255, 183, 3, 0.4);
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.perk-desc {
    font-size: 0.74rem;
    color: #cbd5e1;
    line-height: 1.25;
}

.perk-category-tag {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cyan-glow);
}

.perk-card.rarity-rare .perk-category-tag {
    color: var(--magenta-glow);
}

.perk-card.rarity-epic .perk-category-tag {
    color: var(--gold-glow);
}

.perk-desc {
    font-size: 0.90rem;
    color: #e2e8f0;
    line-height: 1.35;
    font-weight: 500;
    margin: 0;
}

.btn-reroll, .btn-reroll-compact {
    background: rgba(217, 70, 239, 0.15);
    border: 1.5px solid var(--magenta-glow);
    border-radius: 8px;
    color: #fdf4ff;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 0 12px rgba(217, 70, 239, 0.25);
    transition: all 0.15s ease;
}

.btn-reroll:hover, .btn-reroll-compact:hover {
    background: var(--magenta-glow);
    color: #000;
}

.btn-reroll:disabled, .btn-reroll-compact:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #64748b;
    background: rgba(100, 116, 139, 0.1);
    color: #94a3b8;
    box-shadow: none;
}


/* Al pausar el Capitán también se congelan sus animaciones CSS. */
body.game-paused .super-boss-tactical-ui,
body.game-paused .super-boss-tactical-ui * {
    animation-play-state: paused !important;
}

/* ==========================================================================
   MODALES DE PAUSA, SECTOR SUPERADO, GAMEOVER Y VICTORIA
   ========================================================================== */
.pause-modal-overlay {
    /* Debe quedar por encima del HUD del Capitán (z-index: 5000). */
    z-index: 7000 !important;
    flex-direction: column !important;
    justify-content: space-evenly !important;
    align-items: center !important;
    gap: 14px;
    padding: calc(var(--safe-top) + 10px) 16px calc(var(--safe-bottom) + 10px) 16px;
    height: 100%;
    box-sizing: border-box;
}

.victory-modal-overlay {
    flex-direction: column;
    justify-content: safe center;
    gap: 10px;
}

.victory-modal-overlay .victory-box {
    flex-shrink: 0;
    margin: 0;
}

.pause-box, .clear-box, .gameover-box {
    width: 100%;
    max-width: 400px;
    background: rgba(15, 23, 42, 0.96);
    border: 1.5px solid var(--panel-border);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    margin: auto 0;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.tactical-hangar-box {
    max-width: 440px;
    width: 95%;
    padding: 10px 14px 14px 14px;
    gap: 8px;
    background: rgba(10, 15, 30, 0.98);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 243, 255, 0.15);
    margin: auto 0;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

/* Cabecera Compacta del Hangar */
.hangar-compact-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hangar-title-clean {
    font-family: var(--font-heading);
    font-size: 1.28rem;
    font-weight: 900;
    color: var(--gold-glow);
    text-shadow: 0 0 16px rgba(255, 183, 3, 0.7);
    letter-spacing: 1.2px;
    margin: 0;
}

/* Barra de Cristales Integrada (Recompensa de sector + Saldo total disponible) */
.sector-fragments-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 4px 0;
    width: 100%;
}

.frag-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    user-select: none;
}

.frag-reward-pill {
    background: rgba(255, 183, 3, 0.18);
    border: 1.5px solid var(--gold-glow);
    color: #ffea00;
    box-shadow: 0 0 12px rgba(255, 183, 3, 0.4);
}

.frag-total-pill {
    background: rgba(0, 243, 255, 0.14);
    border: 1.5px solid var(--cyan-glow);
    color: #e0f2fe;
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.25);
}

.frag-icon {
    font-size: 0.88rem;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.frag-lbl {
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 700;
}

.frag-val {
    font-weight: 800;
    font-size: 0.82rem;
}

.hangar-sub-clean {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
    letter-spacing: 0.4px;
}

/* Distribución de Botones en Pila (Sin Cortes en Móvil) */
.hangar-footer-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}

.btn-next-full {
    width: 100% !important;
    height: 50px;
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin: 0 !important;
}

.btn-next-full:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    background: #334155;
    color: #94a3b8;
    border-color: #475569;
}


.overlay-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.title-cyan {
    color: var(--cyan-glow);
    text-shadow: 0 0 15px var(--cyan-glow);
}

.title-gold {
    color: var(--gold-glow);
    text-shadow: 0 0 15px var(--gold-glow);
}

.title-red {
    color: var(--red-alert);
    text-shadow: 0 0 15px var(--red-alert);
}

.overlay-subtitle {
    font-size: 1.10rem; /* +2pt adicional */
    color: #cbd5e1;
    letter-spacing: 0.3px;
    line-height: 1.35;
}

.pause-buttons-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 240px;
}

/* REANUDAR queda separado de la coordenada central usada para pausar. */
.pause-buttons-row #btnResume {
    margin-top: 8px;
}

/* Confirmación secundaria al salir desde SISTEMAS EN ESPERA. */
.pause-exit-confirm-overlay {
    z-index: 7200 !important;
    background: rgba(2, 6, 23, 0.78) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    justify-content: center !important;
    align-items: center !important;
    padding: calc(var(--safe-top) + 16px) 18px calc(var(--safe-bottom) + 16px);
    box-sizing: border-box;
}

.pause-exit-confirm-box {
    width: min(92vw, 390px);
    background: rgba(15, 23, 42, 0.98);
    border: 1.5px solid rgba(239, 68, 68, 0.58);
    border-radius: 14px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.86), 0 0 28px rgba(239, 68, 68, 0.16);
}

.pause-exit-confirm-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.pause-exit-confirm-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.45));
}

.pause-exit-confirm-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 1.1px;
    color: #f87171;
}

.pause-exit-confirm-desc {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.45;
}

.pause-exit-confirm-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pause-exit-confirm-buttons .btn-arcade {
    width: 100%;
}

.sector-reward-badge {
    background: rgba(255, 183, 3, 0.15);
    border: 1px solid var(--gold-glow);
    border-radius: 6px;
    padding: 6px 14px;
    color: #ffea00;
    font-size: 0.85rem;
    font-weight: 700;
}

.stats-summary-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 8px 0;
}

.stat-card {
    background: rgba(8, 14, 30, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-card.highlight-frag {
    border: 1.5px solid var(--gold-glow);
    background: rgba(255, 183, 3, 0.12);
    box-shadow: 0 0 12px rgba(255, 183, 3, 0.22);
}

.sc-label {
    font-size: 0.85rem; /* +2pt adicional */
    color: #94a3b8;
    font-weight: 800;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.stat-card.highlight-frag .sc-label {
    color: #ffea00;
}

.sc-val {
    font-family: var(--font-heading);
    font-size: 1.20rem; /* +2pt adicional */
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.stat-card.highlight-frag .sc-val {
    color: #ffea00;
    font-size: 1.24rem;
    text-shadow: 0 0 8px rgba(255, 234, 0, 0.55);
}

/* Inscripción de Récords */
.record-input-section {
    width: 100%;
}

.record-input-row {
    display: flex;
    gap: 6px;
    width: 100%;
}

.record-input {
    flex: 1;
    min-width: 0;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 243, 255, 0.4);
    border-radius: 6px;
    padding: 8px 12px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: #fff;
    text-transform: uppercase;
}

.record-input:focus {
    outline: none;
    border-color: var(--cyan-glow);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

.btn-save-record {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 0.8rem;
}

.record-saved-notice {
    font-size: 0.72rem;
    color: #4ade80;
    margin-top: 6px;
}

/* ==========================================================================
   MODAL DE AJUSTES Y RÉCORDS
   ========================================================================== */
.cover-help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 14px;
    z-index: 150;
    padding: calc(var(--safe-top) + 12px) 16px calc(var(--safe-bottom) + 16px) 16px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.help-modal-box {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 23, 42, 0.98);
    border: 1.5px solid var(--panel-border);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    margin: 0 auto;
    flex-shrink: 0;
    box-sizing: border-box;
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cyan-glow);
    margin-bottom: 14px;
}

.btn-close-modal {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
}

.btn-close-modal:hover {
    color: #fff;
}

.settings-content-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-toggle-setting {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #94a3b8;
    padding: 6px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-toggle-setting.on {
    border-color: var(--cyan-glow);
    background: rgba(0, 243, 255, 0.15);
    color: var(--cyan-glow);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.setting-slider {
    width: 120px;
    accent-color: var(--cyan-glow);
}

.records-table-scroll {
    max-height: 240px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
    text-align: left;
}

.records-table th {
    color: var(--cyan-glow);
    font-family: var(--font-heading);
    font-size: 0.65rem;
    padding: 6px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
}

.records-table td {
    padding: 6px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.help-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.help-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.help-badge {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    color: var(--cyan-glow);
    font-weight: 700;
}

.help-desc {
    font-size: 0.72rem;
    color: #cbd5e1;
}

.help-tip {
    font-size: 0.7rem;
    color: #ffaa00;
    line-height: 1.3;
}

/* ==========================================================================
   SISTEMA DE PUBLICIDAD MODULAR // AD CONTAINERS & MOCKS
   ========================================================================== */
.ad-banner-top,
.ad-banner-container {
    width: 100%;
    max-width: 420px;
    min-height: 50px;
    height: 50px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    position: relative;
    z-index: 50;
    transition: opacity 0.25s ease;
}

.ad-banner-top {
    width: 100%;
    max-width: 420px;
    height: 90px;
    min-height: 90px;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.ad-banner-pause-top,
.ad-banner-modal-top {
    margin-bottom: 0px;
    width: 100%;
    max-width: 420px;
    height: 160px;
    min-height: 140px;
    flex-shrink: 0;
}

.ad-banner-pause-bottom,
.ad-banner-modal-bottom {
    margin-top: 0px;
    width: 100%;
    max-width: 420px;
    height: 160px;
    min-height: 140px;
    flex-shrink: 0;
}

.ad-banner-cards {
    width: 100%;
    max-width: 400px;
    height: 52px;
    min-height: 52px;
    margin: 0 auto 6px auto;
    flex-shrink: 0;
    overflow: hidden;
}

.ad-banner-modal {
    width: 100%;
    max-width: 420px;
    height: 160px;
    min-height: 140px;
    margin: 0 auto;
    flex-shrink: 0;
}

/* Maqueta Visual en Modo Web / Pruebas */
.ad-mock-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(10, 16, 29, 0.98) 100%);
    border: 1px dashed rgba(0, 243, 255, 0.42);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 0 16px rgba(0, 243, 255, 0.06);
    user-select: none;
    box-sizing: border-box;
}

.ad-mock-inner.compact-top-banner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 4px 14px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: none;
}

.compact-top-banner .ad-mock-badge {
    font-size: 0.60rem;
    padding: 1px 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #94a3b8;
}

.compact-top-banner .ad-mock-text {
    font-size: 0.70rem;
    color: #64748b;
    letter-spacing: 1px;
    font-weight: 600;
}

.compact-top-banner .ad-mock-info {
    font-size: 0.65rem;
    color: #475569;
}

/* Banner de Modales Enriquecido (Récords, Ajustes, Tutorial) */
.ad-mock-inner.modal-banner-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(10, 16, 29, 0.99) 100%);
    border: 1px solid rgba(0, 243, 255, 0.5);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(0, 243, 255, 0.08);
    box-sizing: border-box;
}

.modal-banner-card .ad-card-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
    overflow: hidden;
}

.modal-banner-card .ad-mock-badge {
    font-size: 0.55rem;
    font-weight: 800;
    padding: 1px 5px;
    background: rgba(0, 243, 255, 0.18);
    border: 1px solid rgba(0, 243, 255, 0.5);
    color: var(--cyan-glow, #00f3ff);
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.modal-banner-card .ad-card-title {
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.modal-banner-card .ad-card-rating {
    font-size: 0.62rem;
    color: #ffd000;
    letter-spacing: 0.5px;
}

.modal-banner-card .ad-card-cta {
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 0.68rem;
    font-weight: 800;
    color: #020308;
    background: linear-gradient(135deg, #00f3ff 0%, #38bdf8 100%);
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.modal-banner-card .ad-card-cta:active {
    transform: scale(0.94);
}

.ad-mock-top-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ad-mock-badge {
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    background: rgba(0, 243, 255, 0.15);
    border: 1px solid rgba(0, 243, 255, 0.45);
    color: #00f3ff;
    border-radius: 3px;
    text-transform: uppercase;
}

.ad-mock-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ad-mock-icon {
    font-size: 1rem;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.ad-mock-text-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ad-mock-text {
    font-family: var(--font-body, "Rajdhani", sans-serif);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: #e2e8f0;
    text-transform: uppercase;
}

.ad-mock-subtext {
    font-family: var(--font-body, "Rajdhani", sans-serif);
    font-size: 0.66rem;
    color: #94a3b8;
    letter-spacing: 0.3px;
}

.ad-mock-info {
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 0.55rem;
    color: #64748b;
    font-weight: 500;
}

/* Modificadores para Banners de Portada (90px) */
.ad-banner-top .ad-mock-inner {
    flex-direction: column;
    justify-content: space-between;
    padding: 8px 14px;
}

.ad-banner-top .ad-mock-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin: auto 0;
}

.ad-banner-top .ad-mock-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(0, 243, 255, 0.45));
}

.ad-banner-top .ad-mock-text {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #ffffff;
}

.ad-banner-top .ad-mock-subtext {
    display: block;
    font-size: 0.65rem;
    color: #94a3b8;
}

.ad-banner-top .ad-mock-bottom-bar {
    display: none;
}

/* Modificadores para Banners de Cartas (52px Compacto) */
.ad-banner-cards .ad-mock-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.ad-banner-cards .ad-mock-top-bar {
    width: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ad-banner-cards .ad-mock-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ad-banner-cards .ad-mock-icon {
    font-size: 1.15rem;
}

.ad-banner-cards .ad-mock-text {
    font-size: 0.72rem;
}

.ad-banner-cards .ad-mock-subtext,
.ad-banner-cards .ad-mock-bottom-bar {
    display: none !important;
}

/* Modificadores para Banners Altos de Pausa y Modales (160px MREC Fuera de Contenido) */
.ad-banner-pause-top .ad-mock-inner,
.ad-banner-pause-bottom .ad-mock-inner,
.ad-banner-modal-top .ad-mock-inner,
.ad-banner-modal-bottom .ad-mock-inner {
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 16px;
}

.ad-banner-pause-top .ad-mock-content,
.ad-banner-pause-bottom .ad-mock-content,
.ad-banner-modal-top .ad-mock-content,
.ad-banner-modal-bottom .ad-mock-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin: auto 0;
}

.ad-banner-pause-top .ad-mock-icon,
.ad-banner-pause-bottom .ad-mock-icon,
.ad-banner-modal-top .ad-mock-icon,
.ad-banner-modal-bottom .ad-mock-icon {
    font-size: 2.6rem;
    filter: drop-shadow(0 0 12px rgba(0, 243, 255, 0.45));
}

.ad-banner-pause-top .ad-mock-text,
.ad-banner-pause-bottom .ad-mock-text,
.ad-banner-modal-top .ad-mock-text,
.ad-banner-modal-bottom .ad-mock-text {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
}

.ad-banner-pause-top .ad-mock-badge,
.ad-banner-pause-bottom .ad-mock-badge,
.ad-banner-modal-top .ad-mock-badge,
.ad-banner-modal-bottom .ad-mock-badge {
    font-size: 0.62rem;
    padding: 3px 8px;
}

.ad-mock-bottom-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ad-mock-rating {
    font-size: 0.74rem;
    color: #ffb703;
    font-weight: 700;
    letter-spacing: 1px;
}

.ad-mock-cta-btn {
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 0.65rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00f3ff, #00a8cc);
    color: #020617;
    padding: 4px 14px;
    border-radius: 4px;
    letter-spacing: 0.8px;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
    text-transform: uppercase;
}

/* ==========================================================================
   DISEÑO RESPONSIVE ADAPTATIVO MULTI-DISPOSITIVO (SMARTPHONES, TABLETS, PC)
   ========================================================================== */

/* 1. MÓVILES ESTRECHOS (Ancho <= 375px: iPhone SE, Galaxy A, etc.) */
@media (max-width: 375px) {
    .sector-fragments-bar {
        flex-wrap: wrap;
        gap: 5px;
    }

    .frag-pill {
        padding: 3px 7px;
        white-space: nowrap;
    }

    .perk-top-row {
        flex-direction: column;
        gap: 4px;
    }

    .perk-tier {
        align-self: flex-start;
    }

    .records-table th,
    .records-table td {
        padding: 6px 3px;
        font-size: 0.62rem;
        overflow-wrap: anywhere;
    }

    .cover-overlay {
        padding: var(--safe-top) 10px var(--safe-bottom) 10px;
    }

    .cover-badge {
        font-size: 0.72rem;
        letter-spacing: 1.5px;
    }

    .brand-pill {
        font-size: 0.65rem;
        padding: 2px 8px;
    }

    .cover-logo-main {
        font-size: 2.15rem;
    }

    .cover-gameplay-glance {
        padding: 4px 8px;
        gap: 4px;
    }

    .glance-step .step-text {
        font-size: 0.64rem;
    }

    .core-fragments-display {
        padding: 2px 10px;
        font-size: 0.68rem;
    }

    .hangar-title {
        font-size: 0.70rem;
    }

    .ship-card {
        padding: 10px 10px;
        gap: 10px;
        min-height: 84px;
        border-radius: 14px;
    }

    .ship-icon-box {
        width: 48px;
        height: 48px;
        min-width: 48px;
        border-radius: 10px;
    }

    .ship-svg-icon {
        width: 34px;
        height: 34px;
    }

    .ship-name {
        font-size: 1.05rem;
    }

    .ship-role-tag {
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .ship-stats-grid {
        gap: 5px;
    }

    .stat-chip {
        padding: 4px 4px;
        gap: 4px;
        border-radius: 6px;
    }

    .stat-svg {
        transform: scale(0.9);
    }

    .s-val {
        font-size: 0.72rem;
    }

    .s-meter i {
        width: 5.5px;
        height: 10px;
    }

    .btn-start-glow {
        min-height: 48px;
        font-size: 1.02rem;
        padding: 10px 18px;
    }

    .cover-tool-btn {
        font-size: 0.68rem;
        padding: 6px 8px;
    }

    /* HUD en pantallas muy estrechas */
    .hud-top-bar {
        padding: 3px 6px;
        gap: 5px;
    }

    .hud-score-combo {
        min-width: 52px;
    }

    /* Modales y Game Over en pantallas estrechas */
    .stats-summary-grid {
        gap: 5px;
    }

    .stat-card {
        padding: 6px 2px;
    }

    .sc-label {
        font-size: 0.68rem;
    }

    .sc-val {
        font-size: 1.02rem;
    }
}

/* 2. PANTALLAS BAJAS (Altura <= 720px: móviles compactos o con barra de navegación) */
@media (max-height: 720px) {
    .cover-top-group {
        gap: 2px;
    }

    .ad-banner-top {
        height: 50px;
        min-height: 50px;
        margin-bottom: 0;
    }

    .cover-badge {
        margin: 0;
        font-size: 0.72rem;
    }

    .cover-brand {
        gap: 2px;
    }

    .cover-logo-main {
        font-size: 2.05rem;
        margin: 1px 0;
    }

    .cover-gameplay-glance {
        padding: 3px 8px;
        margin: 1px 0;
    }

    .core-fragments-display {
        margin-top: 2px;
        padding: 2px 10px;
    }

    .cover-main-flow {
        gap: 6px;
    }

    .hangar-section {
        gap: 4px;
        margin-top: 0;
    }

    .hangar-title {
        margin-bottom: 0;
        font-size: 0.70rem;
    }

    .ship-select-list {
        gap: 6px;
    }

    .ship-card {
        min-height: 78px;
        padding: 8px 10px;
        gap: 10px;
    }

    .ship-icon-box {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }

    .ship-svg-icon {
        width: 34px;
        height: 34px;
    }

    .btn-start-glow {
        min-height: 46px;
        font-size: 1.02rem;
        padding: 8px 18px;
        margin: 4px auto 6px auto;
    }

    .cover-footer-settings {
        gap: 6px;
    }

    .cover-tool-btn {
        padding: 6px 8px;
        font-size: 0.72rem;
    }
}

/* 3. PANTALLAS ALTAS (Smartphones modernos >= 840px de altura, 19.5:9 o 20:9) */
@media (min-height: 840px) {
    .cover-main-flow {
        gap: 14px;
    }

    .hangar-section {
        gap: 10px;
    }

    .ship-select-list {
        gap: 12px;
    }

    .ship-card {
        min-height: 96px;
        padding: 14px 16px;
    }

    .btn-start-glow {
        min-height: 56px;
        font-size: 1.16rem;
        margin: 12px auto 14px auto;
    }
}

/* 4. MODO HORIZONTAL / LANDSCAPE (Altura <= 540px) */
@media (orientation: landscape) and (max-height: 540px) {
    .cover-overlay,
    .overlay,
    .cover-help-modal {
        align-items: flex-start !important;
        overflow-y: auto !important;
        padding: 8px 16px !important;
    }

    .cover-content,
    .pause-box,
    .clear-box,
    .gameover-box,
    .help-modal-box,
    .tactical-hangar-box {
        margin: 0 auto !important;
        max-height: none !important;
    }

    .ship-select-list {
        gap: 6px;
    }

    .ship-card {
        min-height: 72px;
        padding: 8px 12px;
    }

    .help-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

@media (max-width: 600px) {
    .ad-banner-top .ad-mock-inner.compact-top-banner {
        flex-direction: row;
        justify-content: flex-start;
        gap: 8px;
        padding: 5px 9px;
    }

    .compact-top-banner .ad-mock-badge {
        flex-shrink: 0;
    }

    .ad-banner-top .compact-top-banner .ad-mock-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.66rem;
    }

    .compact-top-banner .ad-mock-info {
        display: none;
    }
}

/* Hangar de escritorio: el combate conserva su formato vertical. */
@media (min-width: 960px) and (min-height: 620px) {
    body.state-start .game-viewport {
        visibility: hidden;
    }

    .cover-overlay {
        padding: 28px;
        background: radial-gradient(circle at 50% 40%, rgba(10, 20, 42, 0.5), rgba(2, 3, 8, 0.55) 72%);
    }

    .cover-content {
        width: min(100%, 1120px);
        max-width: none;
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        grid-template-rows: auto auto auto;
        align-items: stretch;
        column-gap: 28px;
        row-gap: 14px;
        padding: 0;
        margin: auto;
    }

    .cover-main-flow {
        display: contents;
    }

    .cover-top-group,
    .hangar-section {
        border: 1px solid rgba(0, 243, 255, 0.25);
        border-radius: 22px;
        background: linear-gradient(155deg, rgba(16, 23, 48, 0.94), rgba(4, 9, 22, 0.96));
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), inset 0 0 28px rgba(0, 243, 255, 0.035);
    }

    .cover-top-group {
        grid-column: 1;
        grid-row: 1 / 4;
        justify-content: center;
        gap: 18px;
        padding: 32px;
        min-height: 580px;
        background:
            radial-gradient(circle at 50% 70%, rgba(62, 28, 115, 0.42), transparent 60%),
            linear-gradient(155deg, rgba(16, 23, 48, 0.96), rgba(4, 9, 22, 0.96));
    }

    .cover-top-group .ad-banner-top {
        width: min(100%, 420px);
        height: 90px;
        min-height: 90px;
        margin: 0 0 24px;
    }

    .cover-badge {
        font-size: 0.95rem;
    }

    .cover-logo-main {
        font-size: clamp(2.8rem, 3.6vw, 4rem);
        margin: 8px 0 14px;
    }

    .brand-pill {
        font-size: 0.72rem;
    }

    .cover-gameplay-glance {
        padding: 9px 16px;
        gap: 12px;
    }

    .step-text {
        font-size: 0.84rem;
    }

    .core-fragments-display {
        padding: 8px 18px;
        font-size: 1rem;
        margin-top: 22px;
    }

    .hangar-section {
        grid-column: 2;
        grid-row: 1;
        gap: 16px;
        margin: 0;
        padding: 24px;
    }

    .hangar-title {
        font-size: 0.94rem;
        color: #cbd5e1;
        margin: 0;
    }

    .ship-select-list {
        gap: 14px;
    }

    .ship-card {
        min-height: 112px;
        padding: 16px 20px;
    }

    .ship-icon-box {
        width: 64px;
        min-width: 64px;
        height: 64px;
    }

    .ship-svg-icon {
        width: 46px;
        height: 46px;
    }

    #btnStart {
        grid-column: 2;
        grid-row: 2;
        width: 100%;
        max-width: none;
        min-height: 58px;
        margin: 0;
    }

    .cover-footer-settings {
        grid-column: 2;
        grid-row: 3;
        max-width: none;
    }

    .cover-tool-btn {
        min-height: 42px;
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   PANTALLA DE CARGA / LANDING INICIAL (LOADING SCREEN)
   ========================================================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #030712 !important;
    background: #030712 radial-gradient(circle at 50% 40%, #0d1b2a 0%, #030712 75%) !important;
    opacity: 1 !important;
    z-index: 1000 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: var(--safe-top) 20px var(--safe-bottom) 20px;
    box-sizing: border-box;
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), filter 0.65s ease;
    user-select: none;
    -webkit-user-select: none;
}

.loading-screen.fade-out {
    opacity: 0 !important;
    transform: scale(1.05);
    filter: blur(8px);
    pointer-events: none;
}

.loading-container {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.loading-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.3);
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--cyan-glow, #00f3ff);
}

.loading-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan-glow, #00f3ff);
    box-shadow: 0 0 8px var(--cyan-glow, #00f3ff);
    animation: loadingDotPulse 1.2s infinite alternate ease-in-out;
}

@keyframes loadingDotPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.4); opacity: 1; }
}

.loading-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.loading-logo {
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 2.3rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.45);
}

.loading-logo .brand-accent {
    color: var(--cyan-glow, #00f3ff);
    text-shadow: 0 0 25px rgba(0, 243, 255, 0.7);
}

.loading-tagline {
    font-size: 0.74rem;
    letter-spacing: 1.2px;
    color: #94a3b8;
    font-weight: 600;
}

/* Holograma Central de Escaneo */
.loading-holo-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
}

.holo-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.holo-ring-outer {
    inset: 0;
    border: 1.5px dashed rgba(0, 243, 255, 0.35);
    animation: holoSpinClockwise 12s linear infinite;
}

.holo-ring-mid {
    inset: 14px;
    border: 1px dotted rgba(255, 208, 0, 0.45);
    animation: holoSpinCounter 8s linear infinite;
}

@keyframes holoSpinClockwise {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes holoSpinCounter {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

.holo-scanline {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #00f3ff 50%, transparent 100%);
    box-shadow: 0 0 10px #00f3ff;
    opacity: 0.8;
    animation: holoScanMove 2.2s ease-in-out infinite alternate;
}

@keyframes holoScanMove {
    0% { top: 12px; opacity: 0.2; }
    50% { opacity: 0.95; }
    100% { top: 124px; opacity: 0.2; }
}

.holo-ship-box {
    position: relative;
    width: 72px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: holoShipHover 2.6s ease-in-out infinite alternate;
}

@keyframes holoShipHover {
    0% { transform: translateY(-3px) scale(0.98); }
    100% { transform: translateY(3px) scale(1.02); }
}

.holo-ship-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.65));
}

.holo-thruster-glow {
    position: absolute;
    bottom: -6px;
    width: 24px;
    height: 8px;
    background: radial-gradient(ellipse at center, rgba(0, 243, 255, 0.8) 0%, transparent 75%);
    animation: holoThrusterPulse 0.4s ease-in-out infinite alternate;
}

@keyframes holoThrusterPulse {
    0% { transform: scaleX(0.85); opacity: 0.6; }
    100% { transform: scaleX(1.2); opacity: 1; }
}

/* Barra de Carga */
.loading-progress-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loading-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(0, 243, 255, 0.35);
    border-radius: 999px;
    padding: 1.5px;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
    box-sizing: border-box;
}

.loading-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00f3ff 0%, #38bdf8 65%, #ffd000 100%);
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(0, 243, 255, 0.85);
    transition: width 0.08s ease-out;
}

.loading-meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 0.68rem;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

.loading-status-text {
    color: var(--cyan-glow, #00f3ff);
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.loading-percent-text {
    color: #ffd000;
    font-weight: 700;
    letter-spacing: 1px;
}

.loading-footer-tip {
    font-size: 0.62rem;
    color: #64748b;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ==========================================================================
   ANUNCIO INTERSTICIAL A PANTALLA COMPLETA (INTERSTITIAL AD MOCK)
   ========================================================================== */
.interstitial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(2, 3, 8, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--safe-top) 20px var(--safe-bottom) 20px;
    box-sizing: border-box;
    animation: fadeInModal 0.25s ease-out;
}

.interstitial-box {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(8, 14, 30, 0.99) 100%);
    border: 1.5px solid var(--panel-border, rgba(0, 243, 255, 0.35));
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 14px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 243, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-sizing: border-box;
}

.interstitial-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.interstitial-badge {
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 7px;
    background: rgba(0, 243, 255, 0.2);
    border: 1px solid rgba(0, 243, 255, 0.5);
    color: var(--cyan-glow, #00f3ff);
    border-radius: 4px;
}

.interstitial-network {
    font-size: 0.70rem;
    color: #64748b;
    font-weight: 600;
}

.btn-close-interstitial {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-interstitial.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-close-interstitial:not(.disabled):hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #f87171;
}

.interstitial-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    padding: 8px 0;
}

.interstitial-graphic {
    position: relative;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.18) 0%, rgba(15, 23, 42, 0.8) 70%);
    border: 1.5px solid rgba(0, 243, 255, 0.45);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.25);
}

.interstitial-hero-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.6));
}

.interstitial-app-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.interstitial-title {
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.5px;
}

.interstitial-desc {
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.35;
    margin: 0;
    max-width: 320px;
}

.interstitial-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.interstitial-rating .stars {
    color: #ffd000;
    font-size: 0.82rem;
}

.interstitial-rating .rating-num {
    font-weight: 800;
    color: #ffffff;
    font-size: 0.80rem;
}

.interstitial-rating .reviews {
    color: #64748b;
    font-size: 0.70rem;
}

.interstitial-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.interstitial-price {
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 0.85rem;
    font-weight: 800;
    color: #22c55e;
    letter-spacing: 1px;
}

.btn-install-ad {
    flex: 1;
    background: linear-gradient(135deg, #00f3ff 0%, #3b82f6 100%) !important;
    color: #020308 !important;
    font-weight: 800 !important;
    font-size: 0.82rem !important;
    padding: 10px 18px !important;
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.4) !important;
}

/* ==========================================================================
   MODAL DE CONFIRMACIÓN DE SALIDA (BOTÓN ATRÁS DEL MÓVIL EN HANGAR)
   ========================================================================== */
.confirm-exit-overlay {
    z-index: 500 !important;
    background: rgba(2, 6, 23, 0.92) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    justify-content: center !important;
    align-items: center !important;
}

.confirm-exit-box {
    max-width: 360px !important;
    text-align: center;
    border: 1.5px solid rgba(239, 68, 68, 0.45) !important;
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.9), 0 0 25px rgba(239, 68, 68, 0.2) !important;
    padding: 22px 20px !important;
    gap: 14px;
    animation: fadeInModal 0.2s ease-out;
}

.confirm-exit-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.confirm-exit-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.5));
}

.confirm-exit-title {
    font-family: var(--font-heading, "Orbitron", sans-serif);
    font-size: 0.95rem;
    font-weight: 800;
    color: #f87171;
    letter-spacing: 1px;
    margin: 0;
}

.confirm-exit-desc {
    font-size: 0.78rem;
    color: #cbd5e1;
    line-height: 1.4;
    margin: 0;
}

.confirm-exit-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
}

.btn-continue-exit {
    background: linear-gradient(135deg, #00f3ff 0%, #0284c7 100%) !important;
    color: #020617 !important;
    font-weight: 800 !important;
    font-size: 0.82rem !important;
    padding: 11px 18px !important;
    box-shadow: 0 0 14px rgba(0, 243, 255, 0.4) !important;
}

.btn-quit-game {
    font-size: 0.74rem !important;
    padding: 9px 14px !important;
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    color: #fca5a5 !important;
}

.btn-quit-game:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    color: #ffffff !important;
}

/* Pantallas y opciones de escritorio. El combate mantiene su lienzo vertical. */
@media (min-width: 960px) and (min-height: 620px) {
    .cover-help-modal:not(.confirm-exit-overlay) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
        align-content: center;
        align-items: center !important;
        justify-content: center !important;
        gap: 24px;
        padding: 32px;
    }

    .cover-help-modal:not(.confirm-exit-overlay) > .ad-banner-modal-top {
        grid-column: 1;
    }

    .cover-help-modal:not(.confirm-exit-overlay) > .help-modal-box {
        grid-column: 2;
        width: 100%;
        max-width: 680px;
        padding: 28px;
    }

    .cover-help-modal:not(.confirm-exit-overlay) > .ad-banner-modal-bottom {
        grid-column: 3;
    }

    .cover-help-modal:not(.confirm-exit-overlay) > .ad-banner-container {
        width: 100%;
        max-width: 300px;
        height: 180px;
        min-height: 180px;
    }

    .help-modal-header {
        font-size: 1.1rem;
        margin-bottom: 22px;
    }

    .btn-close-modal {
        font-size: 1.5rem;
        min-width: 40px;
        min-height: 40px;
    }

    .settings-content-list {
        gap: 18px;
    }

    .setting-row {
        font-size: 1rem;
    }

    .btn-toggle-setting {
        font-size: 0.85rem;
        padding: 9px 14px;
    }

    .setting-slider {
        width: 190px;
    }

    .records-table-scroll {
        max-height: min(52vh, 460px);
    }

    .records-table {
        font-size: 0.9rem;
    }

    .records-table th {
        font-size: 0.78rem;
        padding: 10px;
    }

    .records-table td {
        padding: 10px;
    }

    #modalCoverHelp .help-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    #modalCoverHelp .help-item {
        padding: 14px;
    }

    #modalCoverHelp .help-badge {
        font-size: 0.74rem;
    }

    #modalCoverHelp .help-desc,
    #modalCoverHelp .help-tip {
        font-size: 0.88rem;
    }

    .overlay {
        padding: 32px;
    }

    .gameover-box {
        max-width: 680px;
        padding: 28px;
        gap: 18px;
    }

    .pause-box {
        max-width: 560px;
        padding: 32px;
        gap: 20px;
    }

    .overlay-title {
        font-size: 2rem;
    }

    .stats-summary-grid {
        gap: 12px;
    }

    .stat-card {
        padding: 16px 10px;
    }

    .sc-label {
        font-size: 0.9rem;
    }

    .sc-val {
        font-size: 1.35rem;
    }

    .record-input-row {
        max-width: 520px;
        margin: 0 auto;
        gap: 10px;
    }

    .record-input {
        min-height: 44px;
    }

    .tactical-hangar-box {
        width: min(100%, 900px);
        max-width: 900px;
        padding: 24px;
        gap: 18px;
    }

    .tactical-hangar-box .ad-banner-cards {
        max-width: 420px;
    }

    .hangar-title-clean {
        font-size: 1.7rem;
    }

    .perk-cards-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .perk-card {
        min-width: 0;
        min-height: 220px;
        padding: 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .perk-top-row {
        flex-direction: column;
        gap: 8px;
    }

    .perk-name {
        font-size: 1.05rem;
    }

    .perk-desc {
        font-size: 0.9rem;
        line-height: 1.35;
    }

    .confirm-exit-box {
        max-width: 500px !important;
        padding: 32px !important;
    }

    .confirm-exit-title {
        font-size: 1.25rem;
    }

    .confirm-exit-desc {
        font-size: 1rem;
    }

    .confirm-exit-buttons {
        flex-direction: row;
    }
}

@media (min-width: 960px) and (min-height: 620px) {
    .pause-modal-overlay,
    .victory-modal-overlay {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
        align-content: center;
        align-items: center !important;
        justify-content: center !important;
        gap: 24px;
    }

    .pause-modal-overlay > .ad-banner-pause-top,
    .victory-modal-overlay > .ad-banner-modal-top {
        grid-column: 1;
    }

    .pause-modal-overlay > .pause-box,
    .victory-modal-overlay > .victory-box {
        grid-column: 2;
        width: 100%;
        margin: 0;
        justify-self: center;
    }

    .pause-modal-overlay > .ad-banner-pause-bottom,
    .victory-modal-overlay > .ad-banner-modal-bottom {
        grid-column: 3;
    }

    .pause-modal-overlay > .ad-banner-container,
    .victory-modal-overlay > .ad-banner-container {
        width: 100%;
        max-width: 300px;
        height: 180px;
        min-height: 180px;
    }
}




/* ========================================================================== 
   ACCESO DIRECTO TEMPORAL A SECTORES 2/3 + SELECTOR DE ARMA
   ========================================================================== */
.direct-sector-launcher {
    width: 86%;
    max-width: 310px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: -2px auto 8px auto;
    flex-shrink: 0;
}

.direct-sector-label {
    font-family: var(--font-heading);
    font-size: 0.58rem;
    letter-spacing: 1.8px;
    color: #64748b;
    font-weight: 800;
}

.direct-sector-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.direct-sector-btn {
    min-height: 36px;
    border-radius: 18px;
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: rgba(15, 23, 42, 0.78);
    color: #7dd3fc;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: inset 0 0 14px rgba(56, 189, 248, 0.06);
}

.direct-sector-btn-boss {
    border-color: rgba(217, 70, 239, 0.5);
    color: #e879f9;
    box-shadow: inset 0 0 14px rgba(217, 70, 239, 0.07);
}


.direct-superboss-btn {
    grid-column: 1 / -1;
    border-color: rgba(239, 68, 68, 0.72);
    color: #fca5a5;
    background: linear-gradient(180deg, rgba(69, 10, 10, 0.88), rgba(24, 8, 18, 0.9));
    box-shadow: inset 0 0 18px rgba(239, 68, 68, 0.10), 0 0 12px rgba(239, 68, 68, 0.10);
}

.direct-superboss-btn:hover {
    border-color: rgba(248, 113, 113, 0.95);
    color: #fee2e2;
    box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.15), 0 0 16px rgba(239, 68, 68, 0.16);
}

.direct-sector-btn:active,
.direct-weapon-card:active {
    transform: scale(0.97);
}

.direct-sector-modal {
    z-index: 260;
    justify-content: center !important;
}

.direct-sector-modal-box {
    max-width: 430px;
    border-color: rgba(56, 189, 248, 0.4);
}

.direct-sector-hint {
    margin: 0 0 14px;
    color: #cbd5e1;
    font-size: 0.78rem;
    line-height: 1.45;
}

.direct-weapon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.direct-weapon-card {
    min-height: 112px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.direct-weapon-card:hover {
    border-color: rgba(0, 243, 255, 0.65);
    box-shadow: 0 0 18px rgba(0, 243, 255, 0.14);
}

.direct-weapon-icon {
    font-size: 1.45rem;
}

.direct-weapon-card strong {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 1px;
}

.direct-weapon-card small {
    min-height: 28px;
    color: #94a3b8;
    font-size: 0.60rem;
    line-height: 1.25;
    text-align: center;
}

.direct-sector-note {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #64748b;
    font-size: 0.65rem;
    line-height: 1.35;
}

@media (max-width: 420px) {
    .direct-sector-launcher {
        width: 90%;
    }

    .direct-weapon-grid {
        gap: 7px;
    }

    .direct-weapon-card {
        min-height: 102px;
        padding: 8px 5px;
    }
}

@media (max-height: 720px) {
    .direct-sector-launcher {
        margin: -4px auto 5px auto;
        gap: 3px;
    }

    .direct-sector-btn {
        min-height: 32px;
        font-size: 0.62rem;
    }
}

/* El modal de despliegue rápido siempre permanece centrado también en escritorio. */
.direct-sector-modal {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.direct-sector-modal.hidden {
    display: none !important;
}

/* ================================================================
   SUPERJEFE TÁCTICO — cierre del Sector 3
   ================================================================ */
.super-boss-tactical-ui {
    position: absolute;
    left: 50%;
    bottom: 18%;
    transform: translateX(-50%);
    z-index: 5000;
    width: min(94%, 430px);
    pointer-events: none;
}
.super-boss-tactical-ui.hidden { display: none !important; }
.super-boss-panel {
    pointer-events: auto;
    border: 1px solid rgba(255, 45, 117, 0.62);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(10, 12, 28, 0.94), rgba(3, 5, 15, 0.97));
    box-shadow: 0 0 28px rgba(255, 23, 68, 0.2), inset 0 0 24px rgba(0, 243, 255, 0.04);
    padding: 12px 14px 11px;
    backdrop-filter: blur(10px);
    color: #f8fafc;
    font-family: 'Orbitron', system-ui, sans-serif;
}
.super-boss-kicker {
    color: #ff5d88;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-align: center;
    margin-bottom: 7px;
}
.super-boss-turn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}
.super-boss-turn-row strong { color: #fff; letter-spacing: .8px; }
#superBossShotCounter { color: #00f3ff; font-size: 11px; font-weight: 800; }
.super-boss-weapon-label {
    margin-top: 4px;
    color: #cbd5e1;
    font-size: 9px;
    letter-spacing: 1px;
}
.super-boss-target-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 9px;
}
.super-boss-target-buttons button {
    min-height: 42px;
    border: 1px solid rgba(0, 243, 255, .55);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(8, 28, 48, .95), rgba(4, 12, 26, .98));
    color: #e6fbff;
    font: 800 11px 'Orbitron', system-ui, sans-serif;
    letter-spacing: .7px;
    cursor: pointer;
    box-shadow: inset 0 0 14px rgba(0, 243, 255, .08);
}
.super-boss-target-buttons button:nth-child(2) { border-color: rgba(255,45,117,.7); color: #ffd6e2; }
.super-boss-target-buttons button:nth-child(3) { border-color: rgba(185,104,255,.68); color: #efd8ff; }
.super-boss-target-buttons button:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.super-boss-target-buttons button:disabled { opacity: .35; cursor: default; }
.super-boss-target-buttons button.zone-destroyed { text-decoration: line-through; filter: grayscale(1); }
.super-boss-queue {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 4px;
    margin-top: 9px;
}
.super-boss-queue span {
    height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(148,163,184,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: rgba(15,23,42,.66);
    font-size: 7px;
    font-weight: 800;
}
.super-boss-queue span.queued { color: #fff; border-color: rgba(255,255,255,.3); }
.super-boss-queue span.zone-left { background: rgba(0,217,255,.16); color: #78ecff; }
.super-boss-queue span.zone-center { background: rgba(255,45,117,.17); color: #ff9eb9; }
.super-boss-queue span.zone-right { background: rgba(185,104,255,.16); color: #ddb4ff; }
.super-boss-hint {
    margin-top: 7px;
    text-align: center;
    color: #94a3b8;
    font-size: 8px;
    line-height: 1.35;
}
@media (max-width: 520px) {
    .super-boss-tactical-ui { width: 96%; bottom: 17%; }
    .super-boss-panel { padding: 9px 10px 8px; border-radius: 13px; }
    .super-boss-target-buttons { gap: 5px; margin-top: 7px; }
    .super-boss-target-buttons button { min-height: 38px; font-size: 9px; }
    .super-boss-queue { gap: 2px; margin-top: 7px; }
    .super-boss-queue span { height: 21px; font-size: 6px; }
    .super-boss-hint { margin-top: 5px; font-size: 7px; }
}
/* Superjefe v1: turnos + carriles + parry */
.super-boss-lanes,.super-boss-actions{display:flex;gap:6px;margin-top:8px}.super-boss-lanes button,.super-boss-actions button{flex:1;min-height:40px;border:1px solid rgba(0,217,255,.45);border-radius:9px;background:rgba(3,10,24,.92);color:#eafcff;font:700 9px Orbitron,monospace}.super-boss-lanes button.active{background:rgba(0,217,255,.25);box-shadow:0 0 12px rgba(0,217,255,.3)}.super-boss-actions #superBossDefend{border-color:rgba(255,210,70,.55)}.super-boss-actions .parry-btn{display:none;border-color:#ff315e;background:rgba(100,0,24,.82);font-size:12px;animation:parryPulse .65s infinite alternate}.super-boss-target-buttons.hidden{display:none!important}@keyframes parryPulse{to{box-shadow:0 0 18px rgba(255,49,94,.7);transform:scale(1.015)}}


/* Superjefe V1 — instrumentación visible de combate */
.super-boss-debug{margin-top:7px;border-top:1px solid rgba(148,163,184,.18);padding-top:5px;color:#cbd5e1}
.super-boss-debug summary{cursor:pointer;font:700 7px Orbitron,monospace;letter-spacing:.6px;color:#94a3b8;user-select:none}
.super-boss-debug-state{margin-top:5px;padding:5px 6px;border-radius:6px;background:rgba(2,6,23,.72);font:600 6px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;color:#9eeaf7;white-space:normal;word-break:break-word}
.super-boss-debug-events{margin-top:4px;max-height:72px;overflow:auto;font:500 6px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;color:#cbd5e1}
.super-boss-debug-events div{padding:2px 3px;border-bottom:1px solid rgba(148,163,184,.08)}
.super-boss-debug-events b{color:#f8fafc}
@media(max-width:600px){.super-boss-debug-state,.super-boss-debug-events{font-size:5.5px}.super-boss-debug-events{max-height:58px}}

/* ================================================================
   SUPERJEFE CAPITÁN — interfaz física v2
   El blanco está en los tres cañones de la nave; el movimiento vive
   únicamente en el riel inferior y las acciones son pufos laterales.
   ================================================================ */
.super-boss-tactical-ui {
    inset: 0 !important;
    left: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    pointer-events: none;
}

.super-boss-status-panel {
    position: absolute;
    top: 46px;
    left: 50%;
    transform: translateX(-50%);
    width: min(72%, 330px);
    padding: 7px 10px 6px;
    border: 1px solid rgba(255, 74, 116, .34);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(8, 10, 22, .72), rgba(3, 5, 14, .58));
    box-shadow: 0 5px 22px rgba(0,0,0,.3), inset 0 0 18px rgba(255,23,68,.035);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #f8fafc;
    font-family: 'Orbitron', system-ui, sans-serif;
    pointer-events: auto;
}

.super-boss-status-panel .super-boss-kicker {
    margin: 0 0 4px;
    font-size: 7px;
    letter-spacing: 1.25px;
    color: rgba(255,112,146,.9);
    text-align: center;
}

.super-boss-status-panel .super-boss-turn-row {
    gap: 8px;
    font-size: 9px;
}

.super-boss-status-panel .super-boss-turn-row span {
    color: #cbd5e1;
    font-size: 7px;
    text-align: right;
}

.super-boss-status-panel .super-boss-hint {
    margin-top: 4px;
    color: #9fb4c9;
    font-size: 6.5px;
    line-height: 1.3;
}

.super-boss-action-column {
    position: absolute;
    right: 10px;
    top: 53%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.super-boss-pufo {
    position: relative;
    width: 66px;
    height: 66px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.3);
    background: radial-gradient(circle at 38% 30%, rgba(44,53,76,.92) 0%, rgba(10,15,30,.94) 42%, rgba(2,5,14,.98) 100%);
    box-shadow: 0 7px 20px rgba(0,0,0,.66), inset 0 0 16px rgba(255,255,255,.035), 0 0 12px rgba(0,243,255,.10);
    color: #eefcff;
    font-family: 'Orbitron', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1px;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform .15s ease, opacity .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.super-boss-pufo:hover:not(:disabled) { transform: scale(1.055); }
.super-boss-pufo:active:not(:disabled) { transform: scale(.96); }
.super-boss-pufo:disabled { opacity: .28; cursor: default; filter: grayscale(.7); }

.super-boss-pufo-icon {
    font-size: 18px;
    line-height: 18px;
    filter: drop-shadow(0 0 7px rgba(255,255,255,.18));
}

.super-boss-pufo-label {
    font-size: 6.5px;
    font-weight: 900;
    letter-spacing: .6px;
}

.super-boss-pufo-badge {
    margin-top: 1px;
    font-size: 4.8px;
    font-weight: 800;
    letter-spacing: .45px;
    color: #8fa8bc;
}

.super-boss-pufo.attack-pufo { border-color: rgba(0,243,255,.5); }
.super-boss-pufo.defend-pufo { border-color: rgba(255,210,70,.52); }
.super-boss-pufo.attack-pufo.active-targeting {
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 7px 22px rgba(0,0,0,.68), 0 0 0 3px rgba(0,243,255,.12), 0 0 25px rgba(0,243,255,.55);
    animation: superBossTargetPufo 0.72s ease-in-out infinite alternate;
}

.super-boss-pufo.attack-pufo.active-targeting .super-boss-pufo-badge {
    color: #bffbff;
}

@keyframes superBossTargetPufo {
    to { transform: scale(1.045); box-shadow: 0 7px 22px rgba(0,0,0,.68), 0 0 0 4px rgba(0,243,255,.15), 0 0 30px rgba(0,243,255,.68); }
}

/* Instrumentación sigue disponible, pero cerrada de serie para no tapar el combate. */
.super-boss-status-panel .super-boss-debug {
    margin-top: 4px;
    padding-top: 3px;
}

.super-boss-status-panel .super-boss-debug summary {
    font-size: 5.5px;
    opacity: .75;
}

.super-boss-status-panel .super-boss-debug-state,
.super-boss-status-panel .super-boss-debug-events {
    font-size: 5.5px;
}

@media (max-width: 520px) {
    .super-boss-status-panel {
        top: 42px;
        width: min(70%, 285px);
        padding: 6px 8px 5px;
    }
    .super-boss-status-panel .super-boss-turn-row { font-size: 8px; }
    .super-boss-status-panel .super-boss-turn-row span { font-size: 6px; }
    .super-boss-status-panel .super-boss-hint { font-size: 5.8px; }
    .super-boss-action-column { right: 7px; gap: 8px; }
    .super-boss-pufo { width: 57px; height: 57px; }
    .super-boss-pufo-icon { font-size: 16px; line-height: 16px; }
    .super-boss-pufo-label { font-size: 5.7px; }
    .super-boss-pufo-badge { font-size: 4.2px; }
}

/* ================================================================
   SUPERJEFE CAPITÁN — V3 timing, parry móvil y guiado progresivo
   ================================================================ */
.super-boss-hint.guide-active {
    color: #fff4bf !important;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(255, 214, 70, .28);
}

/* Pufos principales más grandes y fáciles de alcanzar. */
.super-boss-pufo {
    width: 88px;
    height: 88px;
    border-width: 2px;
}
.super-boss-pufo-icon { font-size: 25px; line-height: 25px; }
.super-boss-pufo-label { font-size: 8px; letter-spacing: .75px; }
.super-boss-pufo-badge { font-size: 5.6px; }
.super-boss-action-column { right: 12px; gap: 13px; }

/* Minijuego de ATACAR: barra futurista minimal, sin recuadro exterior y más elevada sobre la nave. */
.super-boss-minigame {
    position: absolute;
    left: 50%;
    bottom: 108px;
    transform: translateX(-50%);
    width: min(70%, 400px);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: auto;
    z-index: 12;
    font-family: 'Orbitron', system-ui, sans-serif;
}
.super-boss-minigame::before { content: none; }
.super-boss-minigame.hidden { display: none !important; }
.super-boss-minigame-title {
    text-align: center;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.1px;
    color: #ecfeff;
}
.super-boss-minigame-help {
    margin: 4px 0 7px;
    text-align: center;
    font-size: 6.5px;
    line-height: 1.35;
    color: #a8c5d1;
}
.super-boss-attack-minigame.guided .super-boss-minigame-help { color: #fff0a8; }
.super-boss-timing-trigger {
    position: relative;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
    font-family: inherit;
    overflow: visible;
}
.super-boss-timing-trigger:focus-visible { outline: 2px solid rgba(255,255,255,.95); outline-offset: 6px; }
.super-boss-timing-track {
    --perfect-left: 43%;
    --perfect-width: 14%;
    --good-left: 26.5%;
    --good-width: 47%;
    position: relative;
    display: block;
    height: 26px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(125,211,252,.14);
    background:
        linear-gradient(180deg, rgba(7,14,28,.96), rgba(2,5,14,.98)),
        linear-gradient(90deg, rgba(12,20,36,.96), rgba(28,41,67,.96) 50%, rgba(12,20,36,.96));
    box-shadow:
        0 14px 26px rgba(0,0,0,.34),
        inset 0 1px 0 rgba(255,255,255,.05),
        inset 0 -6px 18px rgba(0,0,0,.38),
        0 0 22px rgba(0,243,255,.10);
}
.super-boss-timing-track::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent),
        repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 18px);
    opacity: .55;
    pointer-events: none;
}
.super-boss-timing-track::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.03);
    pointer-events: none;
}
.timing-zone { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.timing-zone-good {
    left: var(--good-left); width: var(--good-width);
    background: linear-gradient(90deg, rgba(0,243,255,.06), rgba(0,243,255,.20), rgba(0,243,255,.06));
    border-left: 1px solid rgba(0,243,255,.28);
    border-right: 1px solid rgba(0,243,255,.28);
}
.timing-zone-perfect {
    left: var(--perfect-left); width: var(--perfect-width);
    background: linear-gradient(90deg, rgba(255,214,10,.28), rgba(255,245,173,.85), rgba(255,214,10,.28));
    border-left: 1px solid rgba(255,241,161,.98);
    border-right: 1px solid rgba(255,241,161,.98);
    box-shadow: 0 0 18px rgba(255,224,72,.28);
}
.timing-marker {
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 7px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff, #dbfbff);
    box-shadow: 0 0 10px rgba(255,255,255,.92), 0 0 20px rgba(0,243,255,.64);
    pointer-events: none;
}
.super-boss-timing-legend {
    display: grid;
    grid-template-columns: 1fr 1fr 1.35fr 1fr 1fr;
    gap: 2px;
    margin-top: 5px;
    align-items: center;
    font-size: 5.3px;
    color: #94a3b8;
}
.super-boss-timing-legend > * { text-align: center; font-style: normal; }
.super-boss-timing-legend strong { color: #80eff8; }
.super-boss-timing-legend em { color: #ffe65f; font-weight: 900; }
.super-boss-timing-cta {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    padding: 6px 18px;
    border-radius: 999px;
    border: 1px solid rgba(0,243,255,.18);
    background: linear-gradient(180deg, rgba(0,243,255,.08), rgba(255,255,255,.04));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 0 12px rgba(0,243,255,.48);
    box-shadow: 0 4px 16px rgba(0,0,0,.25), inset 0 0 14px rgba(255,255,255,.04);
    pointer-events: none;
}

/* PARRY: objetivo espacial móvil, no un pufo fijo. */
.super-boss-parry-target {
    --parry-duration: 1600ms;
    position: absolute;
    width: 78px;
    height: 78px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.92);
    background: radial-gradient(circle at 38% 34%, #fff 0 4%, #27f5ff 6%, #08718a 23%, #061627 56%, #02050c 100%);
    box-shadow: 0 0 0 5px rgba(0,243,255,.12), 0 0 25px rgba(0,243,255,.68), inset 0 0 17px rgba(255,255,255,.18);
    color: #fff;
    z-index: 13;
    pointer-events: auto;
    cursor: pointer;
    touch-action: manipulation;
    font-family: 'Orbitron', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: left .17s ease, top .17s ease, width .18s ease, height .18s ease, transform .12s ease;
    animation: superBossParryTargetPulse .52s ease-in-out infinite alternate, superBossParryUrgency var(--parry-duration) linear 1;
}
.super-boss-parry-target.hidden { display: none !important; }
.super-boss-parry-target::after {
    content: '';
    position: absolute;
    inset: -11px;
    border-radius: 50%;
    border: 2px dashed rgba(0,243,255,.52);
    animation: superBossParrySpin 1.15s linear infinite;
}
.super-boss-parry-target.defending {
    width: 98px;
    height: 98px;
    border-color: #fff6b5;
    box-shadow: 0 0 0 7px rgba(255,224,72,.12), 0 0 30px rgba(255,224,72,.48), inset 0 0 18px rgba(255,255,255,.2);
}
.super-boss-parry-target.relocated { transform: translate(-50%, -50%) scale(1.14); }
.parry-target-core { font-size: 10px; font-weight: 1000; letter-spacing: .8px; text-shadow: 0 0 8px #00f3ff; }
.parry-target-sub { margin-top: 2px; font-size: 5px; font-weight: 800; color: #bffbff; }
@keyframes superBossParryTargetPulse { to { box-shadow: 0 0 0 7px rgba(0,243,255,.13), 0 0 34px rgba(0,243,255,.82), inset 0 0 19px rgba(255,255,255,.22); } }
@keyframes superBossParryUrgency {
    0% { filter: saturate(.85) brightness(.88); }
    72% { filter: saturate(1.05) brightness(1); }
    100% { filter: saturate(1.55) brightness(1.32); }
}
@keyframes superBossParrySpin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
    .super-boss-action-column { right: 6px; gap: 10px; }
    .super-boss-pufo { width: 74px; height: 74px; }
    .super-boss-pufo-icon { font-size: 21px; line-height: 21px; }
    .super-boss-pufo-label { font-size: 6.9px; }
    .super-boss-pufo-badge { font-size: 4.8px; }
    .super-boss-minigame { bottom: 94px; width: min(76%, 350px); }
    .super-boss-minigame-title { font-size: 8px; }
    .super-boss-minigame-help { font-size: 5.8px; }
    .super-boss-timing-track { height: 24px; }
    .super-boss-timing-legend { font-size: 4.7px; }
    .super-boss-parry-target { width: 70px; height: 70px; }
    .super-boss-parry-target.defending { width: 88px; height: 88px; }
}


/* ================================================================
   SUPERJEFE V4 — HUD limpio: sin cartel CAPITÁN ni pufos de acción
   El jugador se mueve por el riel y dispara hacia arriba desde su carril.
   ================================================================ */
.super-boss-action-column,
.super-boss-pufo {
    display: none !important;
}

.super-boss-status-panel {
    top: 44px;
    width: min(78%, 390px);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
}

.super-boss-status-panel .super-boss-turn-row {
    justify-content: center;
    text-align: center;
}

.super-boss-status-panel .super-boss-turn-row strong {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(2, 6, 18, .54);
    font-size: 8px;
    letter-spacing: .9px;
    text-shadow: 0 0 8px rgba(255,255,255,.2);
}

.super-boss-status-panel .super-boss-turn-row span {
    display: none;
}

.super-boss-ball-status {
    width: fit-content;
    max-width: 100%;
    margin: 4px auto 0;
    padding: 4px 10px;
    border: 1px solid rgba(0, 243, 255, .18);
    border-radius: 999px;
    background: rgba(1, 13, 24, .54);
    color: #d9fbff;
    font: 800 6.5px/1.2 'Orbitron', system-ui, sans-serif;
    letter-spacing: .68px;
    text-align: center;
    text-shadow: 0 0 8px rgba(0, 243, 255, .24);
    box-shadow: inset 0 0 12px rgba(0, 243, 255, .03);
    pointer-events: none;
}

.super-boss-ball-status.intercept-ready {
    border-color: rgba(255, 234, 0, .5);
    background: rgba(30, 24, 2, .62);
    color: #fff2a8;
    text-shadow: 0 0 10px rgba(255, 234, 0, .34);
    animation: superBossBallStatusPulse 1s ease-in-out infinite alternate;
}

.super-boss-ball-status.empty {
    border-color: rgba(148, 163, 184, .18);
    color: #94a3b8;
    text-shadow: none;
}

.super-boss-ammo-hud {
    position: absolute;
    top: 44px;
    right: 18px;
    min-width: 118px;
    max-width: 200px;
    padding: 9px 12px 10px;
    border: 1px solid rgba(0,243,255,.28);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(6,14,26,.92), rgba(1,6,16,.96));
    box-shadow: 0 14px 34px rgba(0,0,0,.45), inset 0 0 20px rgba(0,243,255,.05);
    z-index: 14;
    pointer-events: none;
    text-align: left;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}
.super-boss-ammo-hud::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,.04);
}
.super-boss-ammo-title {
    position: relative;
    font: 900 7px/1 'Orbitron', system-ui, sans-serif;
    letter-spacing: 1.4px;
    color: #d7fbff;
    text-shadow: 0 0 10px rgba(0,243,255,.22);
}
.super-boss-ammo-pips {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 7px;
}
.super-boss-ammo-dot {
    font-size: 12px;
    line-height: 1;
    transition: transform .18s ease, opacity .18s ease, filter .18s ease;
}
.super-boss-ammo-dot.is-full {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255,255,255,.45), 0 0 18px rgba(0,243,255,.25);
}
.super-boss-ammo-dot.is-empty {
    color: rgba(148,163,184,.33);
    text-shadow: none;
    filter: grayscale(.25);
}
.super-boss-ammo-hud.intercept-ready {
    border-color: rgba(255,224,72,.48);
    box-shadow: 0 14px 34px rgba(0,0,0,.45), inset 0 0 20px rgba(255,224,72,.06), 0 0 18px rgba(255,224,72,.12);
}
.super-boss-ammo-hud.intercept-ready .super-boss-ammo-title {
    color: #fff3ad;
}
.super-boss-ammo-hud.intercept-ready .super-boss-ammo-dot.is-full {
    color: #fff3ad;
    text-shadow: 0 0 12px rgba(255,224,72,.5);
}
.super-boss-ammo-hud.empty {
    border-color: rgba(148,163,184,.18);
}

@keyframes superBossBallStatusPulse {
    from { transform: scale(1); filter: brightness(1); }
    to { transform: scale(1.025); filter: brightness(1.18); }
}

.super-boss-status-panel .super-boss-hint {
    width: fit-content;
    max-width: 100%;
    margin: 4px auto 0;
    padding: 3px 7px;
    border-radius: 8px;
    background: rgba(2, 6, 18, .46);
    color: #cbd5e1;
    text-align: center;
    font-size: 6.5px;
    line-height: 1.3;
    pointer-events: none;
}

.super-boss-status-panel .super-boss-debug {
    width: min(94%, 330px);
    margin: 5px auto 0;
    padding: 0;
    border: 0;
    pointer-events: auto;
    text-align: center;
}

.super-boss-status-panel .super-boss-debug summary {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(2, 6, 18, .42);
}

.super-boss-status-panel .super-boss-debug[open] {
    padding: 4px 6px 6px;
    border-radius: 8px;
    background: rgba(2, 6, 18, .78);
}

@media (max-width: 520px) {
    .super-boss-status-panel {
        top: 40px;
        width: min(84%, 320px);
        padding: 0;
    }
    .super-boss-ball-status { font-size: 5.9px; padding: 3px 7px; }
    .super-boss-status-panel .super-boss-hint { font-size: 5.9px; }
    .super-boss-ammo-hud { top: 40px; right: 10px; min-width: 104px; padding: 8px 10px 9px; }
    .super-boss-ammo-title { font-size: 6.4px; }
    .super-boss-ammo-dot { font-size: 11px; }
}

/* ================================================================
   SUPERJEFE V5 — cartel central de turno / feedback de fase
   Aparece SIEMPRE al comenzar el turno del jugador y dura 2 s.
   ================================================================ */
.super-boss-turn-splash {
    position: absolute;
    left: 50%;
    top: 43%;
    width: min(86%, 440px);
    transform: translate(-50%, -50%);
    z-index: 40;
    pointer-events: none;
    text-align: center;
    font-family: 'Orbitron', system-ui, sans-serif;
    color: #f7feff;
    opacity: 0;
    isolation: isolate;
}

.super-boss-turn-splash::before,
.super-boss-turn-splash::after {
    content: '';
    position: absolute;
    left: 50%;
    pointer-events: none;
    z-index: -1;
}

.super-boss-turn-splash::before {
    top: 50%;
    width: 100%;
    height: 112px;
    transform: translate(-50%, -50%);
    background:
        linear-gradient(90deg, transparent 0%, rgba(0,243,255,.07) 16%, rgba(3,12,27,.92) 50%, rgba(0,243,255,.07) 84%, transparent 100%);
    border-top: 1px solid rgba(124,247,255,.48);
    border-bottom: 1px solid rgba(124,247,255,.30);
    box-shadow: inset 0 0 34px rgba(0,243,255,.055);
}

.super-boss-turn-splash::after {
    top: 50%;
    width: 76%;
    height: 2px;
    transform: translate(-50%, 48px) scaleX(.2);
    background: linear-gradient(90deg, transparent, #d9fdff 25%, #00f3ff 50%, #d9fdff 75%, transparent);
    box-shadow: 0 0 15px rgba(0,243,255,.95), 0 0 32px rgba(0,243,255,.38);
    opacity: 0;
}

.super-boss-turn-splash.is-visible {
    animation: superBossTurnSplashLife 2s cubic-bezier(.2,.8,.2,1) forwards;
}
.super-boss-turn-splash.is-visible::after {
    animation: superBossTurnSlash 2s ease-out forwards;
}

.super-boss-turn-splash-kicker {
    margin-bottom: 2px;
    color: rgba(139,244,255,.72);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.super-boss-turn-splash-title {
    font-size: clamp(30px, 8vw, 54px);
    line-height: .98;
    font-weight: 1000;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow:
        0 0 7px rgba(255,255,255,.92),
        0 0 18px rgba(0,243,255,.92),
        0 0 42px rgba(0,137,255,.52);
}

.super-boss-turn-splash-sub {
    margin-top: 7px;
    color: #bffbff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(0,243,255,.46);
}

@keyframes superBossTurnSplashLife {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(.72); filter: blur(6px) brightness(2.1); }
    10%  { opacity: 1; transform: translate(-50%, -50%) scale(1.07); filter: blur(0) brightness(1.55); }
    22%  { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0) brightness(1); }
    72%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.045); filter: blur(1px); }
}

@keyframes superBossTurnSlash {
    0%, 8% { opacity: 0; transform: translate(-50%, 48px) scaleX(.08); }
    18%    { opacity: 1; transform: translate(-50%, 48px) scaleX(1); }
    70%    { opacity: .78; transform: translate(-50%, 48px) scaleX(.82); }
    100%   { opacity: 0; transform: translate(-50%, 48px) scaleX(.18); }
}

/* Cuando el splash lleva TU TURNO, el panel superior no lo repite de forma persistente. */
.super-boss-turn-row.player-phase {
    justify-content: center;
}
.super-boss-turn-row.player-phase #superBossIntent {
    text-align: center;
}

@media (max-width: 520px) {
    .super-boss-turn-splash { top: 42%; width: 92%; }
    .super-boss-turn-splash::before { height: 94px; }
    .super-boss-turn-splash::after { transform: translate(-50%, 41px) scaleX(.2); }
    .super-boss-turn-splash-kicker { font-size: 6px; letter-spacing: 3px; }
    .super-boss-turn-splash-title { font-size: clamp(28px, 10vw, 44px); letter-spacing: 3px; }
    .super-boss-turn-splash-sub { font-size: 7px; letter-spacing: 1.7px; }
    @keyframes superBossTurnSlash {
        0%, 8% { opacity: 0; transform: translate(-50%, 41px) scaleX(.08); }
        18%    { opacity: 1; transform: translate(-50%, 41px) scaleX(1); }
        70%    { opacity: .78; transform: translate(-50%, 41px) scaleX(.82); }
        100%   { opacity: 0; transform: translate(-50%, 41px) scaleX(.18); }
    }
}

@media (prefers-reduced-motion: reduce) {
    .super-boss-turn-splash.is-visible { animation: superBossTurnSplashReduced 2s ease forwards; }
    .super-boss-turn-splash.is-visible::after { animation: none; opacity: .5; transform: translate(-50%, 48px) scaleX(.7); }
}
@keyframes superBossTurnSplashReduced {
    0%,100% { opacity: 0; }
    12%,80% { opacity: 1; }
}

/* ================================================================
   SUPERJEFE V6 — fase del Capitán y derrota cinematográfica
   ================================================================ */
.arena-captain-phase {
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
    padding-left: 7px;
    border-left: 1px solid rgba(255, 95, 116, .34);
    color: rgba(255, 155, 168, .96);
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: 1.05px;
    text-shadow: 0 0 8px rgba(220, 48, 73, .28);
    white-space: nowrap;
}

.super-boss-turn-splash.boss-phase-splash::before {
    background: linear-gradient(90deg, transparent 0%, rgba(255,35,72,.075) 16%, rgba(24,3,10,.94) 50%, rgba(255,35,72,.075) 84%, transparent 100%);
    border-top-color: rgba(255,108,127,.55);
    border-bottom-color: rgba(255,73,100,.34);
    box-shadow: inset 0 0 38px rgba(255,23,68,.07);
}
.super-boss-turn-splash.boss-phase-splash::after {
    background: linear-gradient(90deg, transparent, #ffd8df 25%, #ff315d 50%, #ffd8df 75%, transparent);
    box-shadow: 0 0 15px rgba(255,49,93,.95), 0 0 34px rgba(255,23,68,.42);
}
.super-boss-turn-splash.boss-phase-splash .super-boss-turn-splash-kicker {
    color: rgba(255,170,184,.78);
}
.super-boss-turn-splash.boss-phase-splash .super-boss-turn-splash-title {
    font-size: clamp(25px, 6.8vw, 46px);
    letter-spacing: 2.6px;
    color: #fff6f7;
    text-shadow: 0 0 8px rgba(255,255,255,.9), 0 0 20px rgba(255,49,93,.9), 0 0 46px rgba(170,0,35,.58);
}
.super-boss-turn-splash.boss-phase-splash .super-boss-turn-splash-sub {
    color: #ffc0cb;
    text-shadow: 0 0 12px rgba(255,49,93,.42);
}

/* Game Over del Capitán: la escena queda visible detrás del cartel. */
.gameover-modal-overlay.super-boss-transparent-gameover {
    background: rgba(2, 3, 8, .22);
    backdrop-filter: blur(1.5px) saturate(.88);
    -webkit-backdrop-filter: blur(1.5px) saturate(.88);
}
.gameover-modal-overlay.super-boss-transparent-gameover .gameover-box {
    background: rgba(9, 13, 24, .70);
    border-color: rgba(255, 64, 88, .38);
    box-shadow: 0 12px 38px rgba(0,0,0,.52), 0 0 30px rgba(255,23,68,.10);
}
.gameover-modal-overlay.super-boss-transparent-gameover .overlay-title {
    text-shadow: 0 0 12px rgba(255,23,68,.86), 0 0 30px rgba(255,23,68,.28);
}

@media (max-width: 520px) {
    .arena-sector-badge.captain-mode { gap: 4px; padding-left: 7px; padding-right: 7px; }
    .arena-captain-phase { font-size: .54rem; letter-spacing: .7px; padding-left: 5px; }
    .super-boss-turn-splash.boss-phase-splash .super-boss-turn-splash-title { font-size: clamp(23px, 8.5vw, 39px); }
}
