body {
    background: #0a0a0a;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
    font-family: 'Orbitron', monospace;
}

/* Tutorial Modal Responsive */
#tutorialModal {
    padding: 10px !important;
}

#tutorialContent-wrapper {
    max-width: 600px;
    padding: 20px !important;
}

/* Tutorial Content Text Sizing */
#tutorialContent h2,
#tutorialContent h3 {
    font-size: 18px;
    margin: 12px 0 8px 0;
}

#tutorialContent p,
#tutorialContent div {
    font-size: 14px;
    line-height: 1.4;
}

#tutorialContent canvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
}

/* Ad Frames */
.ad-frame {
    width: 120px;
    background: #111;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
}

/* Volume Control - ALL styles here, not inline */
#volumeControl {
    position: fixed !important;
    bottom: 65px !important;
    left: 10px !important;
    z-index: 1001 !important;
    background: rgba(0,0,0,0.9) !important;
    padding: 8px !important;
    border-radius: 6px !important;
    border: 1px solid #00f5ff !important;
    width: 30px !important;
    box-shadow: 0 0 10px rgba(0,245,255,0.2) !important;
    transition: width 0.3s ease !important;
    pointer-events: auto !important; /* FORZAR que siempre sea interactivo */
    display: block !important; /* FORZAR que siempre sea visible */
}

#volumeControl:hover {
    box-shadow: 0 0 15px rgba(0,245,255,0.4) !important;
    width: 35px !important;
}

#volumeControl:hover #volumeDisplay {
    font-size: 9px !important;
}

/* Ocultar ad frames en móvil (vertical u horizontal) */
@media (max-width: 768px), (max-height: 500px) {
    .ad-frame {
        display: none !important;
    }
    
    /* Tutorial responsive on mobile */
    #tutorialContent-wrapper {
        padding: 15px !important;
        max-height: 85vh;
    }
    
    #tutorialContent h2,
    #tutorialContent h3 {
        font-size: 16px;
    }
    
    #tutorialContent p,
    #tutorialContent div {
        font-size: 13px;
    }
    
    /* Hide Brave button on mobile */
    .desktop-only-btn {
        display: none !important;
    }
    
    /* DISABLED: Control de volumen ahora siempre accesible durante el juego */
    /* #volumeControl.hidden-during-gameplay {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    } */
}

/* Game Container - Preparado para transición suave */
#gameContainer {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a0a;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    z-index: 50; /* Debajo del menú durante transición */
    opacity: 1; /* Container visible, canvas controlado por JS */
}

canvas {
    box-shadow: 0 0 40px #00ffff55;
    border-radius: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: cover;
    cursor: crosshair;
}

.hide-cursor {
    cursor: none !important;
}

/* Tutorial Button - Works on both desktop and mobile */
#tutorialBtn {
    pointer-events: auto !important;
    z-index: 1000;
    position: relative;
}

#tutorialBtn:hover,
#tutorialBtn:active,
#tutorialBtn:focus {
    background: rgba(0, 200, 200, 0.6) !important;
}

/* Touch feedback for mobile */
@supports (touch-action: auto) {
    #tutorialBtn {
        touch-action: manipulation;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Game HUD - compacto en esquina superior izquierda */
#gameHUD {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: bold;
}

#gameHUD div {
    background: rgba(0, 0, 0, 0.2);
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
    padding: 2px 6px;
    margin: 1px 0;
    border-radius: 3px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(3px);
    display: inline-block;
    min-width: 60px;
}



/* Start Menu - EPIC VERSION 🔥 */
#startMenu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0015 0%, #1a0030 50%, #0a0015 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    overflow-y: auto;
    animation: backgroundPulse 20s ease-in-out infinite;
    /* MENÚ DESAPARECE MUY SUAVE - fondo estático visible */
    opacity: 1;
    transition: opacity 2.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

#startMenu.fading {
    opacity: 0 !important;
    animation: none !important; /* Desactivar backgroundPulse durante fade */
}

/* Contenido del menú fade simple */
#startMenu.fading .start-menu-content {
    animation: none !important;
}

#startMenu.fading .start-menu-content::before {
    animation: none !important;
}

#startMenu.fading #startBtn {
    animation: none !important;
}

@keyframes backgroundPulse {
    0%, 100% { background: linear-gradient(135deg, #0a0015 0%, #1a0030 50%, #0a0015 100%); }
    50% { background: linear-gradient(135deg, #0a0030 0%, #2a0050 50%, #0a0030 100%); }
}

/* Canvas del fondo animado del menú */
#menuBackgroundCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: none;
}

#menuBackgroundCanvas.active {
    display: block;
}

.start-menu-content {
    text-align: center;
    background: linear-gradient(165deg, rgba(30, 15, 50, 0.85) 0%, rgba(20, 10, 40, 0.85) 50%, rgba(25, 10, 45, 0.85) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 35px 40px;
    border-radius: 32px;
    border: 2px solid rgba(168, 85, 247, 0.5);
    box-shadow: 
        0 0 60px rgba(138, 43, 226, 0.4),
        0 0 100px rgba(168, 85, 247, 0.25),
        inset 0 0 60px rgba(138, 43, 226, 0.1);
    margin: auto;
    max-width: 600px;
    animation: floatIn 1s ease-out, glowPulse 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.start-menu-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(138, 43, 226, 0.1) 50%,
        transparent 70%
    );
    animation: shine 3s linear infinite;

    /* Ensure the decorative pseudo-element doesn't block clicks on buttons underneath */
    pointer-events: none;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 
            0 0 60px rgba(138, 43, 226, 0.4),
            0 0 100px rgba(168, 85, 247, 0.25),
            inset 0 0 60px rgba(138, 43, 226, 0.1);
        border-color: rgba(168, 85, 247, 0.5);
    }
    50% {
        box-shadow: 
            0 0 80px rgba(138, 43, 226, 0.6),
            0 0 120px rgba(168, 85, 247, 0.35),
            inset 0 0 80px rgba(138, 43, 226, 0.15);
        border-color: rgba(168, 85, 247, 0.7);
    }
}

/* Tabs and collapsible sections - hidden on desktop */
#menuTabs {
    display: none;
}

.menu-section {
    display: block;
}

.menu-section.active {
    display: block;
}

#quickStartSection {
    display: none;
}

#rankingsSection {
    margin: 20px 0;
    animation: slideIn 0.5s ease-out 0.3s both;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile menu optimization */
@media (max-width: 768px) {
    #startMenu {
        align-items: center;
        justify-content: center;
        padding: 0;
        background: rgba(0, 0, 0, 0.85);
    }
    
    .start-menu-content {
        padding: 5px;
        max-width: calc(100% - 10px);
        width: auto;
        max-height: calc(100vh - 10px);
        height: auto;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 3px;
        background: rgba(30, 0, 50, 0.95);
        border-radius: 5px;
        margin: 5px;
    }
    
    /* Hide rankings section on mobile - use tabs instead */
    #rankingsSection {
        display: none;
    }
    
    #quickStartSection {
        display: block;
        margin: 0 !important;
    }
    
    #quickStartSection button {
        width: 100%;
    }
    
    #menuTabs {
        display: flex !important;
        gap: 5px !important;
        justify-content: center !important;
        margin: 0 !important;
    }
    
    .menu-section {
        display: none;
        animation: slideIn 0.2s ease;
    }
    
    .menu-section.active {
        display: block;
    }
    
    /* Show ranking section on mobile via tab system */
    #rankingSection {
        display: none;
    }
    
    #rankingSection.active {
        display: block;
    }
    
    @keyframes slideIn {
        from { opacity: 0; transform: translateY(-5px); }
        to { opacity: 1; transform: translateY(0); }
    }
}


#gameTitle {
    font-family: 'Orbitron', monospace;
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(135deg, #8a2be2 0%, #ff00ff 50%, #8a2be2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite, titlePulse 2s ease-in-out infinite;
    margin: 0 0 10px 0;
    letter-spacing: 8px;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(138, 43, 226, 0.8)) 
            drop-shadow(0 0 40px rgba(255, 0, 255, 0.6))
            drop-shadow(0 0 60px rgba(138, 43, 226, 0.4));
    position: relative;
    z-index: 1;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

@media (max-width: 768px) {
    #gameTitle {
        font-size: 24px;
        margin: 0 0 5px 0;
        letter-spacing: 2px;
    }
}

#startBtn {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: bold;
    padding: 20px 50px;
    background: linear-gradient(135deg, #8a2be2 0%, #ff00ff 50%, #8a2be2 100%);
    background-size: 200% 200%;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
    pointer-events: auto !important;
    z-index: 1000;
    position: relative;
    touch-action: manipulation;
    box-shadow: 
        0 0 30px rgba(138, 43, 226, 0.6),
        0 0 60px rgba(255, 0, 255, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    animation: buttonGlow 2s ease-in-out infinite, gradientShift 3s ease infinite;
    overflow: hidden;
}

/* Desactivado ::before para evitar efecto de onda duplicado con las partículas */

#startBtn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 
        0 0 40px rgba(138, 43, 226, 0.8),
        0 0 80px rgba(255, 0, 255, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

#startBtn:active {
    transform: scale(1.05) translateY(-2px);
}

#startBtn.clicked {
    /* Botón desaparece MUY SUAVE con el menú */
    pointer-events: none;
    opacity: 0 !important;
    transition: opacity 2.2s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
}

/* Animación buttonExplode eliminada - usamos explosión de partículas en JS */

@keyframes buttonGlow {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(138, 43, 226, 0.6),
            0 0 60px rgba(255, 0, 255, 0.4),
            inset 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 0 40px rgba(138, 43, 226, 0.8),
            0 0 80px rgba(255, 0, 255, 0.6),
            inset 0 0 30px rgba(255, 255, 255, 0.15);
    }
}

@media (max-width: 768px) {
    #startBtn {
        font-size: 14px;
        padding: 12px 24px;
        letter-spacing: 1px;
        width: 90%;
        max-width: 250px;
    }
}

/* Menu Tabs */
.menu-tab {
    padding: 8px 15px;
    background: rgba(138, 43, 226, 0.2);
    border: 2px solid rgba(138, 43, 226, 0.4);
    color: #ccc;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.menu-tab:hover {
    border-color: rgba(138, 43, 226, 0.8);
    color: #fff;
}

.menu-tab.active {
    background: rgba(138, 43, 226, 0.5);
    border-color: #8a2be2;
    color: #fff;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

/* Menu Sections */
.menu-section {
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

/* Rankings Section */
#rankingsSection {
    margin: 20px 0;
}

@media (max-width: 768px) {
    #rankingsSection {
        margin: 5px 0;
    }
    
    #rankingsSection h2 {
        font-size: 18px !important;
        margin: 8px 0 5px 0 !important;
    }
}

.rankings-list {
    background: linear-gradient(145deg, rgba(30, 15, 50, 0.7) 0%, rgba(25, 10, 45, 0.8) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 16px;
    padding: 12px 16px;
    max-width: 500px;
    margin: 0 auto;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 
        0 4px 20px rgba(138, 43, 226, 0.25),
        inset 0 1px 3px rgba(168, 85, 247, 0.15);
    animation: slideIn 0.5s ease-out 0.4s both;
}

/* Mobile rankings optimization */
@media (max-width: 768px) {
    .rankings-list {
        max-width: 100%;
        max-height: 150px;
        padding: 10px;
        margin: 0;
        border-radius: 15px;
    }
}

/* Ocultar barra de scroll pero mantener funcionalidad */
.rankings-list::-webkit-scrollbar {
    width: 6px;
}

.rankings-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.rankings-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a855f7 0%, #7c3aed 100%);
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

.rankings-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #c084fc 0%, #9333ea 100%);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
}

.ranking-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(168, 85, 247, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 10px;
    font-family: 'Orbitron', monospace;
    font-size: 15px;
    transition: all 0.3s ease;
    animation: rankingFadeIn 0.5s ease-out backwards;
    margin-bottom: 6px;
}

.ranking-row:nth-child(1) { animation-delay: 0.1s; }
.ranking-row:nth-child(2) { animation-delay: 0.15s; }
.ranking-row:nth-child(3) { animation-delay: 0.2s; }
.ranking-row:nth-child(4) { animation-delay: 0.25s; }
.ranking-row:nth-child(5) { animation-delay: 0.3s; }

@keyframes rankingFadeIn {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ranking-row:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.5);
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

/* TOP 1 - Oro */
.ranking-row.rank-1 {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.25) 50%, rgba(251, 191, 36, 0.3) 100%);
    border: 3px solid #fbbf24;
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.7), 0 4px 25px rgba(251, 191, 36, 0.4), inset 0 0 30px rgba(251, 191, 36, 0.2);
    animation: goldPulse 2s ease-in-out infinite, rankingFadeIn 0.5s ease-out backwards;
    padding: 14px 18px;
    font-size: 17px;
}

@keyframes goldPulse {
    0%, 100% {
        box-shadow: 
            0 0 40px rgba(251, 191, 36, 0.7), 
            0 4px 25px rgba(251, 191, 36, 0.4),
            inset 0 0 30px rgba(251, 191, 36, 0.2);
        border-color: #fbbf24;
    }
    50% {
        box-shadow: 
            0 0 60px rgba(251, 191, 36, 1), 
            0 6px 35px rgba(251, 191, 36, 0.6),
            inset 0 0 40px rgba(251, 191, 36, 0.3);
        border-color: #fde047;
    }
}

.ranking-row.rank-1:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.4) 0%, rgba(245, 158, 11, 0.35) 50%, rgba(251, 191, 36, 0.4) 100%);
    box-shadow: 
        0 0 60px rgba(251, 191, 36, 1), 
        0 6px 35px rgba(251, 191, 36, 0.7),
        inset 0 0 40px rgba(251, 191, 36, 0.3);
    transform: scale(1.05);
}

.ranking-row.rank-1 .ranking-name {
    background: linear-gradient(135deg, #fde047 0%, #fbbf24 25%, #fde047 50%, #fbbf24 75%, #fde047 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 18px;
    animation: goldTextShine 3s linear infinite;
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.9)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    position: relative;
}

@keyframes goldTextShine {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.ranking-row.rank-1:hover .ranking-name {
    filter: drop-shadow(0 0 18px rgba(251, 191, 36, 1)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

/* TOP 2 - Plata */
.ranking-row.rank-2 {
    background: linear-gradient(135deg, rgba(209, 213, 219, 0.25) 0%, rgba(156, 163, 175, 0.2) 50%, rgba(209, 213, 219, 0.25) 100%);
    border: 3px solid #d1d5db;
    box-shadow: 0 0 30px rgba(209, 213, 219, 0.6), 0 4px 20px rgba(209, 213, 219, 0.35), inset 0 0 20px rgba(209, 213, 219, 0.15);
    padding: 13px 17px;
    font-size: 16px;
    animation: silverPulse 2.5s ease-in-out infinite;
}

@keyframes silverPulse {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(209, 213, 219, 0.6), 
            0 4px 20px rgba(209, 213, 219, 0.35),
            inset 0 0 20px rgba(209, 213, 219, 0.15);
        border-color: #d1d5db;
    }
    50% {
        box-shadow: 
            0 0 45px rgba(209, 213, 219, 0.9), 
            0 6px 28px rgba(209, 213, 219, 0.5),
            inset 0 0 30px rgba(209, 213, 219, 0.25);
        border-color: #e5e7eb;
    }
}

.ranking-row.rank-2:hover {
    background: linear-gradient(135deg, rgba(209, 213, 219, 0.35) 0%, rgba(156, 163, 175, 0.3) 50%, rgba(209, 213, 219, 0.35) 100%);
    box-shadow: 
        0 0 50px rgba(209, 213, 219, 0.9), 
        0 5px 28px rgba(209, 213, 219, 0.6),
        inset 0 0 30px rgba(209, 213, 219, 0.25);
    transform: scale(1.04);
}

.ranking-row.rank-2 .ranking-name {
    background: linear-gradient(135deg, #f3f4f6 0%, #d1d5db 25%, #f3f4f6 50%, #d1d5db 75%, #f3f4f6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 17px;
    animation: silverTextShine 3.5s linear infinite;
    filter: drop-shadow(0 0 10px rgba(209, 213, 219, 0.9)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    position: relative;
}

@keyframes silverTextShine {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.ranking-row.rank-2:hover .ranking-name {
    filter: drop-shadow(0 0 16px rgba(209, 213, 219, 1)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

/* TOP 3 - Bronce */
.ranking-row.rank-3 {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.22) 0%, rgba(234, 88, 12, 0.18) 50%, rgba(251, 146, 60, 0.22) 100%);
    border: 3px solid #fb923c;
    box-shadow: 0 0 25px rgba(251, 146, 60, 0.5), 0 4px 18px rgba(251, 146, 60, 0.3), inset 0 0 18px rgba(251, 146, 60, 0.15);
    padding: 13px 17px;
    font-size: 16px;
    animation: bronzePulse 3s ease-in-out infinite;
}

@keyframes bronzePulse {
    0%, 100% {
        box-shadow: 
            0 0 25px rgba(251, 146, 60, 0.5), 
            0 4px 18px rgba(251, 146, 60, 0.3),
            inset 0 0 18px rgba(251, 146, 60, 0.15);
        border-color: #fb923c;
    }
    50% {
        box-shadow: 
            0 0 40px rgba(251, 146, 60, 0.8), 
            0 6px 25px rgba(251, 146, 60, 0.45),
            inset 0 0 28px rgba(251, 146, 60, 0.25);
        border-color: #fdba74;
    }
}

.ranking-row.rank-3:hover {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.32) 0%, rgba(234, 88, 12, 0.28) 50%, rgba(251, 146, 60, 0.32) 100%);
    box-shadow: 
        0 0 45px rgba(251, 146, 60, 0.8), 
        0 5px 25px rgba(251, 146, 60, 0.5),
        inset 0 0 28px rgba(251, 146, 60, 0.25);
    transform: scale(1.04);
}

.ranking-row.rank-3 .ranking-name {
    background: linear-gradient(135deg, #fdba74 0%, #fb923c 25%, #fdba74 50%, #fb923c 75%, #fdba74 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 17px;
    animation: bronzeTextShine 4s linear infinite;
    filter: drop-shadow(0 0 10px rgba(251, 146, 60, 0.8)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    position: relative;
}

@keyframes bronzeTextShine {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.ranking-row.rank-3:hover .ranking-name {
    filter: drop-shadow(0 0 16px rgba(251, 146, 60, 1)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}


.ranking-row:hover {
    background: rgba(138, 43, 226, 0.18);
    border-color: #8a2be2;
    box-shadow: 0 0 12px 2px #8a2be2, 0 0 0 2px #fff2;
    transform: translateX(3px) scale(1.01);
    z-index: 2;
}

.ranking-row .ranking-name,
.ranking-row .ranking-score,
.ranking-row .ranking-level {
    transition: text-shadow 0.2s, color 0.2s;
}
.ranking-row:hover .ranking-name {
    text-shadow: 0 0 8px #fff, 0 0 16px #8a2be2;
    color: #fff;
}
.ranking-row:hover .ranking-score {
    text-shadow: 0 0 8px #ff00ff, 0 0 16px #fff;
    color: #fff;
}
.ranking-row:hover .ranking-level {
    text-shadow: 0 0 8px #00ffea, 0 0 16px #fff;
    color: #fff;
}

.ranking-position {
    color: #ffdd00;
    font-weight: bold;
    min-width: 40px;
    font-size: 16px;
}

.ranking-name {
    color: #00ffff;
    flex: 1;
    text-align: left;
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-score {
    color: #ff00ff;
    font-weight: bold;
    min-width: 80px;
    text-align: right;
    display: inline-block;
}

.ranking-level {
    color: #00ffea;
    font-weight: bold;
    min-width: 60px;
    text-align: right;
    display: inline-block;
}

.ranking-header {
    background: rgba(255,255,255,0.07);
    font-weight: bold;
    color: #fff;
    border-bottom: 1px solid #8a2be2;
    box-shadow: none !important;
    cursor: default;
}

/* Player Input Section */
.player-input-section {
    margin: 20px 0;
}

.player-name-input {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    padding: 12px 20px;
    width: 100%;
    max-width: 300px;
    background: rgba(20, 10, 40, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(138, 43, 226, 0.5);
    border-radius: 15px;
    color: #ffffff;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 20px rgba(138, 43, 226, 0.2),
        inset 0 0 20px rgba(138, 43, 226, 0.1);
}

.player-name-input::placeholder {
    color: rgba(138, 43, 226, 0.5);
    font-style: italic;
}

.player-name-input:focus {
    border-color: rgba(138, 43, 226, 0.8);
    box-shadow: 
        0 0 30px rgba(138, 43, 226, 0.6),
        0 0 50px rgba(255, 0, 255, 0.3),
        inset 0 0 30px rgba(138, 43, 226, 0.15);
    background: rgba(30, 15, 60, 0.8);
    transform: scale(1.02);
}

/* Mobile player input optimization */
@media (max-width: 768px) {
    .player-input-section {
        margin: 2px 0;
    }
    
    .player-input-section label {
        font-size: 10px !important;
        margin-bottom: 2px !important;
    }
    
    .player-input-section div[style*="display: flex"] {
        gap: 3px !important;
        flex-wrap: wrap;
    }
    
    .player-name-input {
        font-size: 11px;
        padding: 5px 8px;
        max-width: 100%;
    }
    
    .player-input-section button {
        font-size: 10px !important;
        padding: 5px 10px !important;
    }
    
    .player-input-section #nameStatus {
        font-size: 8px !important;
        margin-top: 1px !important;
    }
}

/* 🎬 GAME OVER CINEMATOGRÁFICO ÉPICO 🎬 */
#gameOverMenu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 15, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    pointer-events: auto;
    overflow: hidden;
    animation: gameOverFadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Canvas para efectos de fondo con nodos */
#gameOverBackground {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

@keyframes gameOverFadeIn {
    0% { 
        opacity: 0;
    }
    100% { 
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#gameOverMenu.hidden {
    display: none !important;
    pointer-events: none;
}

#gameOverMenu button,
.game-over-buttons button {
    pointer-events: auto !important;
    z-index: 1001 !important;
    position: relative;
    touch-action: manipulation;
}

.menu-content {
    text-align: center;
    color: #ffffff;
    padding: 50px 60px;
    border: 2px solid #00ffcc;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(8, 12, 30, 0.98), rgba(12, 8, 35, 0.98));
    box-shadow: 
        0 0 50px rgba(0, 255, 200, 0.5),
        0 8px 40px rgba(0, 0, 0, 0.9),
        inset 0 1px 20px rgba(0, 255, 200, 0.2);
    pointer-events: auto;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    z-index: 100;
    animation: gameOverSlideUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

/* DEPRECATED - Epic Game Over Content (comentado para usar inline styles)
.game-over-content {
    background: 
        linear-gradient(180deg, 
            rgba(15, 20, 50, 0.95) 0%,
            rgba(8, 12, 35, 0.98) 50%,
            rgba(15, 10, 40, 0.95) 100%) !important;
    border: 3px solid #00ffff !important;
    border-radius: 0 !important;
    padding: 60px 80px !important;
    max-width: 700px;
    box-shadow: 
        0 0 60px rgba(0, 255, 255, 0.6),
        0 0 120px rgba(255, 0, 200, 0.2),
        inset 0 0 50px rgba(0, 255, 255, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.9) !important;
    position: relative;
    overflow: hidden;
    animation: gameOverSlideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

.game-over-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #00ffff);
    z-index: -1;
    opacity: 0.1;
    animation: borderGlow 3s ease-in-out infinite;
}

.game-over-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 0, 200, 0.03) 0px,
        rgba(255, 0, 200, 0.03) 2px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
    animation: glitchScan 4s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

@keyframes glitchScan {
    0% { transform: translateY(0); opacity: 0.03; }
    50% { transform: translateY(100%); opacity: 0.05; }
    100% { transform: translateY(200%); opacity: 0.03; }
}
*/

/* DEPRECATED - Game Over Title (comentado para usar inline styles)
#gameOverMenu h1 {
    font-size: 64px !important;
    font-weight: 900 !important;
    margin: 0 0 40px 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 6px !important;
    color: #ff0055 !important;
    text-shadow: 
        0 0 15px #ff0055,
        0 0 30px #ff0055,
        0 0 45px #ff0088,
        0 0 60px rgba(255, 0, 100, 0.6),
        2px 2px 0 rgba(0, 0, 0, 0.8) !important;
    animation: titleGlitch 2s ease-in-out infinite !important;
    position: relative;
    font-family: 'Orbitron', monospace !important;
}

@keyframes titleGlitch {
    0%, 100% {
        text-shadow: 
            0 0 10px #ff0080,
            0 0 20px #ff0080,
            0 0 40px #ff00ff;
    }
    50% {
        text-shadow: 
            0 0 15px #00ffff,
            0 0 30px #00ffff,
            0 0 50px #00ffff;
    }
}
*/

/* Stat Boxes */
.stat-box {
    background: 
        linear-gradient(135deg, 
            rgba(0, 100, 150, 0.2) 0%,
            rgba(80, 0, 150, 0.1) 100%);
    border: 2px solid #00ffff;
    border-radius: 0;
    padding: 25px;
    margin: 20px auto;
    max-width: 600px;
    color: #00ffff;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.1), transparent);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}

/* Record Message */
#recordMessage {
    font-size: 28px !important;
    font-weight: bold !important;
    color: #ffff00 !important;
    text-shadow: 
        0 0 10px #ffff00,
        0 0 20px #ff8800,
        0 0 30px rgba(255, 200, 0, 0.5) !important;
    margin: 30px 0 !important;
    animation: pulse 1.5s ease-in-out infinite !important;
    font-family: 'Orbitron', monospace !important;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        text-shadow: 
            0 0 10px #ffff00,
            0 0 20px #ff8800;
    }
    50% {
        opacity: 0.7;
        text-shadow: 
            0 0 20px #ffff00,
            0 0 40px #ff8800,
            0 0 60px rgba(255, 200, 0, 0.6);
    }
}

/* World Rank Message */
#worldRankMessage {
    font-size: 20px !important;
    color: #00ff99 !important;
    text-shadow: 0 0 15px rgba(0, 255, 153, 0.6) !important;
    margin: 20px 0 !important;
    font-family: 'Courier New', monospace !important;
    animation: rankingLoad 0.8s ease-out !important;
}

@keyframes rankingLoad {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* DEPRECATED - Game Over Buttons (comentado para usar inline styles)
.game-over-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px !important;
    z-index: 1002;
    position: relative;
}

.game-over-buttons button {
    padding: 18px 45px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    border: 2px solid #00ffff !important;
    background: 
        linear-gradient(135deg,
            rgba(0, 255, 255, 0.1) 0%,
            rgba(255, 0, 200, 0.05) 100%) !important;
    color: #00ffff !important;
    cursor: pointer !important;
    border-radius: 0 !important;
    transition: all 0.3s ease !important;
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(0, 255, 255, 0.1) !important;
    font-family: 'Orbitron', monospace !important;
    position: relative;
    overflow: hidden;
    touch-action: manipulation !important;
}

.game-over-buttons button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.game-over-buttons button:hover::before {
    left: 100%;
}

.game-over-buttons button:hover {
    box-shadow: 
        0 0 25px rgba(0, 255, 255, 0.6),
        inset 0 0 20px rgba(0, 255, 255, 0.2),
        0 0 50px rgba(255, 0, 200, 0.3) !important;
    background: 
        linear-gradient(135deg,
            rgba(0, 255, 255, 0.2) 0%,
            rgba(255, 0, 200, 0.1) 100%) !important;
    transform: scale(1.05) translateY(-3px) !important;
    color: #00ffff !important;
}

.game-over-buttons button:active {
    transform: scale(0.98) translateY(1px) !important;
}
*/

@keyframes gameOverSlideUp {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
        filter: blur(10px);
    }
    50% {
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0px);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.menu-content h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 15px 0;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(100, 150, 255, 0.5);
    letter-spacing: 3px;
    position: relative;
}

/* Pseudo-elementos eliminados para diseño limpio */

.menu-content p {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    margin: 15px 0;
    color: #ffffff;
}

/* Game Over Buttons */
.game-over-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Game Over Content */
.game-over-content {
    border: 1px solid rgba(100, 150, 255, 0.2);
    padding: 25px;
    background: rgba(10, 10, 25, 0.5);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    animation: fadeUp 0.6s ease-out 0.2s both;
    position: relative;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skull-icon {
    font-size: 60px;
    text-align: center;
    margin-bottom: 12px;
    animation: bounce 0.8s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(100, 150, 255, 0.4));
}

@keyframes bounce {
    0%, 100% { 
        transform: translateY(0);
    }
    50% { 
        transform: translateY(-8px);
    }
}

.death-info {
    margin-bottom: 25px;
}

.death-info h1 {
    text-shadow: 0 0 15px rgba(100, 150, 255, 0.4);
    font-size: 28px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(100, 150, 255, 0.25);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(100, 150, 255, 0.2);
    border-color: rgba(100, 150, 255, 0.5);
}

.stat-label {
    font-size: 12px;
    color: #a0b8d8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
}

.rank-message {
    font-size: 16px;
    color: #c0d8f8;
    text-align: center;
    margin: 15px 0;
    background: rgba(30, 50, 80, 0.5);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
}

.death-combo {
    margin: 20px 0;
    padding: 12px;
    background: rgba(30, 50, 80, 0.4);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 8px;
}

.btn-icon {
    margin-right: 8px;
    font-size: 18px;
}

.btn-retry, .btn-menu {
    font-family: 'Orbitron', monospace;
    font-size: 15px;
    padding: 12px 28px;
    margin: 6px;
    background: rgba(30, 50, 80, 0.8);
    color: #fff;
    border: 1px solid rgba(100, 150, 255, 0.4);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
}

.btn-retry:hover, .btn-menu:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 150, 255, 0.3);
    border-color: rgba(100, 150, 255, 0.8);
    background: rgba(40, 70, 110, 0.95);
}

#restartBtn {
    font-family: 'Orbitron', monospace;
    font-size: 15px;
    padding: 12px 28px;
    margin-top: 15px;
    background: rgba(30, 50, 80, 0.8);
    color: #fff;
    border: 1px solid rgba(100, 150, 255, 0.4);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
}

#restartBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 150, 255, 0.3);
    border-color: rgba(100, 150, 255, 0.8);
    background: rgba(40, 70, 110, 0.95);
}


/* Mobile optimizations */
@media only screen and (max-width: 768px) {
    body {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    canvas {
        cursor: none; /* Remove cursor on mobile */
        touch-action: none;
    }
    
    #gameHUD {
        top: 5px;
        left: 5px;
        font-size: 10px;
    }
    
    #gameHUD div {
        padding: 1px 4px;
        margin: 0.5px 0;
        min-width: 50px;
    }
    
    #gameOverMenu .menu-content {
        width: 90%;
        max-width: 300px;
        padding: 20px;
    }
    
    #gameOverMenu h1 {
        font-size: 28px;
    }
    
    #gameOverMenu p {
        font-size: 16px;
    }
    
    #restartBtn {
        padding: 12px 24px;
        font-size: 16px;
        min-height: 44px; /* iOS recommended touch target */
    }
    
    .btn-retry, .btn-menu {
        font-size: 14px;
        padding: 10px 20px;
        min-width: 140px;
        min-height: 44px;
    }
    
    .game-over-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    #gameOverMenu {
        background: rgba(0, 0, 0, 0.85);
    }
    
    #gameOverMenu .menu-content {
        padding: 8px;
        margin: 5px;
        max-width: calc(100% - 10px);
        width: auto;
        max-height: calc(100vh - 10px);
        border-radius: 5px;
        background: rgba(10, 10, 10, 0.98);
    }
    
    #gameOverMenu .menu-content h1 {
        font-size: 20px;
        margin: 0 0 8px 0;
    }
    
    #gameOverMenu .death-info p {
        font-size: 11px;
        margin: 2px 0 !important;
    }
    
    #gameOverMenu .stats-grid {
        gap: 5px !important;
        margin: 5px 0 !important;
    }
    
    #gameOverMenu .stat-box {
        padding: 4px !important;
        font-size: 9px;
    }
    
    #gameOverMenu .stat-label {
        font-size: 8px !important;
    }
    
    #gameOverMenu .stat-value {
        font-size: 10px !important;
    }
    
    #gameOverMenu .rank-message {
        font-size: 9px !important;
        margin: 3px 0 !important;
    }
    
    #recordMessage {
        font-size: 9px !important;
    }
    
    /* Rankings responsive */
    #rankingsSection {
        font-size: 12px;
    }
    
    .ranking-row {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .ranking-position {
        min-width: 30px;
        font-size: 14px;
    }
    
    .ranking-score {
        min-width: 60px;
        font-size: 12px;
    }
    
    .player-name-input {
        font-size: 14px;
        padding: 8px 12px;
        max-width: 250px;
    }
    
    .start-menu-content {
        max-width: 90%;
        padding: 20px;
    }
}

/* Animación pulse para el TOP 1 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 20px #ffd700, 0 0 30px #ff8800;
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 30px #ffd700, 0 0 50px #ff8800, 0 0 70px #ffdd00;
    }
}

/* ============================================ */
/* ANIMACIONES MEJORADAS */
/* ============================================ */

/* Fade in para menus */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade out para menus */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Bounce para botones */
@keyframes buttonBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 🎬 ANIMACIONES CINEMATOGRÁFICAS ÉPICAS 🎬 */
@keyframes cinematicDarkness {
    0% {
        backdrop-filter: blur(0px) brightness(1) contrast(1);
        background: rgba(0, 0, 0, 0);
    }
    50% {
        backdrop-filter: blur(15px) brightness(0.5) contrast(1.2);
        background: rgba(20, 0, 40, 0.7);
    }
    100% {
        backdrop-filter: blur(25px) brightness(0.3) contrast(1.5);
        background: 
            radial-gradient(ellipse at center, 
                rgba(20, 0, 40, 0.98) 0%, 
                rgba(40, 0, 20, 0.95) 30%,
                rgba(0, 20, 40, 0.92) 60%,
                rgba(0, 0, 0, 0.98) 100%);
    }
}

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

@keyframes epicEntrance {
    0% {
        opacity: 0;
        transform: 
            scale(0.1) 
            rotateX(90deg) 
            rotateY(0deg) 
            rotateZ(-45deg)
            translateY(200px);
        filter: blur(20px) brightness(0);
    }
    30% {
        opacity: 0.7;
        transform: 
            scale(1.2) 
            rotateX(-15deg) 
            rotateY(15deg) 
            rotateZ(5deg)
            translateY(-50px);
        filter: blur(5px) brightness(1.5);
    }
    70% {
        opacity: 0.9;
        transform: 
            scale(0.9) 
            rotateX(5deg) 
            rotateY(-5deg) 
            rotateZ(-2deg)
            translateY(10px);
        filter: blur(2px) brightness(1.2);
    }
    100% {
        opacity: 1;
        transform: 
            scale(1) 
            rotateX(0deg) 
            rotateY(0deg) 
            rotateZ(0deg)
            translateY(0);
        filter: blur(0px) brightness(1);
    }
}

@keyframes holographicPulse {
    0%, 100% {
        box-shadow: 
            0 0 50px rgba(255, 0, 150, 0.6),
            0 0 100px rgba(0, 255, 150, 0.4),
            0 0 150px rgba(150, 0, 255, 0.3);
        border-color: rgba(255, 0, 150, 0.8);
    }
    33% {
        box-shadow: 
            0 0 60px rgba(0, 255, 150, 0.7),
            0 0 110px rgba(150, 0, 255, 0.5),
            0 0 160px rgba(255, 150, 0, 0.4);
        border-color: rgba(0, 255, 150, 0.9);
    }
    66% {
        box-shadow: 
            0 0 55px rgba(150, 0, 255, 0.6),
            0 0 105px rgba(255, 150, 0, 0.4),
            0 0 155px rgba(255, 0, 150, 0.3);
        border-color: rgba(150, 0, 255, 0.8);
    }
}

@keyframes dimensionalShift {
    0%, 100% {
        transform: 
            perspective(1000px) 
            rotateX(0deg) 
            rotateY(0deg) 
            translateZ(0);
    }
    25% {
        transform: 
            perspective(1000px) 
            rotateX(2deg) 
            rotateY(3deg) 
            translateZ(10px);
    }
    50% {
        transform: 
            perspective(1000px) 
            rotateX(-1deg) 
            rotateY(-2deg) 
            translateZ(15px);
    }
    75% {
        transform: 
            perspective(1000px) 
            rotateX(1deg) 
            rotateY(1deg) 
            translateZ(5px);
    }
}

@keyframes energyRings {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.05) rotate(180deg);
        opacity: 0.9;
    }
}

@keyframes nebulaExpansion {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(180deg);
        opacity: 0.1;
    }
}

@keyframes colorShift {
    0% {
        filter: hue-rotate(0deg) brightness(1);
    }
    100% {
        filter: hue-rotate(360deg) brightness(1.2);
    }
}

@keyframes epicTextGlow {
    0%, 100% {
        text-shadow: 
            0 0 30px rgba(255, 0, 150, 0.8),
            0 0 60px rgba(0, 255, 150, 0.6),
            0 0 90px rgba(150, 0, 255, 0.4);
    }
    33% {
        text-shadow: 
            0 0 40px rgba(0, 255, 150, 0.9),
            0 0 70px rgba(150, 0, 255, 0.7),
            0 0 100px rgba(255, 150, 0, 0.5);
    }
    66% {
        text-shadow: 
            0 0 35px rgba(150, 0, 255, 0.8),
            0 0 65px rgba(255, 150, 0, 0.6),
            0 0 95px rgba(255, 0, 150, 0.4);
    }
}

@keyframes rainbowFlow {
    0% { 
        background-position: 0% 50%; 
        filter: hue-rotate(0deg);
    }
    100% { 
        background-position: 400% 50%; 
        filter: hue-rotate(360deg);
    }
}

@keyframes textLevitation {
    0%, 100% {
        transform: 
            perspective(500px) 
            rotateX(0deg) 
            rotateY(0deg) 
            translateY(0px);
    }
    33% {
        transform: 
            perspective(500px) 
            rotateX(5deg) 
            rotateY(-3deg) 
            translateY(-8px);
    }
    66% {
        transform: 
            perspective(500px) 
            rotateX(-3deg) 
            rotateY(5deg) 
            translateY(-5px);
    }
}

@keyframes hologramGlitch {
    0%, 90%, 100% {
        opacity: 0.3;
        transform: translateX(0);
    }
    91%, 92% {
        opacity: 0.8;
        transform: translateX(-2px);
    }
    93%, 94% {
        opacity: 0.1;
        transform: translateX(2px);
    }
    95%, 96% {
        opacity: 0.6;
        transform: translateX(-1px);
    }
}

@keyframes dimensionalEcho {
    0% {
        transform: translateZ(0) scale(1);
        filter: blur(2px);
    }
    50% {
        transform: translateZ(-10px) scale(1.02);
        filter: blur(3px);
    }
    100% {
        transform: translateZ(0) scale(1);
        filter: blur(2px);
    }
}

/* 🎯 ANIMACIONES PROFESIONALES LIMPIAS 🎯 */
@keyframes professionalFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.6;
    }
    33% { 
        transform: translateY(-8px) rotate(120deg) scale(1.1);
        opacity: 0.8;
    }
    66% { 
        transform: translateY(-5px) rotate(240deg) scale(0.9);
        opacity: 0.9;
    }
}

/* 🎮 ANIMACIONES DE BOTONES CINEMATOGRÁFICOS 🎮 */
@keyframes energyBeam {
    0%, 100% {
        height: 60px;
        opacity: 0.8;
        box-shadow: 
            0 0 20px rgba(255, 0, 150, 0.6),
            0 0 40px rgba(0, 255, 150, 0.4);
    }
    50% {
        height: 80px;
        opacity: 1;
        box-shadow: 
            0 0 30px rgba(255, 0, 150, 0.8),
            0 0 60px rgba(0, 255, 150, 0.6),
            0 0 90px rgba(150, 0, 255, 0.4);
    }
}

@keyframes epicButtonPulse {
    0%, 100% {
        transform: scale(1) rotateZ(0deg);
        box-shadow: 
            0 10px 30px rgba(255, 0, 150, 0.4),
            0 0 50px rgba(255, 0, 150, 0.3);
    }
    25% {
        transform: scale(1.02) rotateZ(0.5deg);
        box-shadow: 
            0 15px 40px rgba(255, 0, 150, 0.5),
            0 0 60px rgba(255, 0, 150, 0.4);
    }
    50% {
        transform: scale(1.01) rotateZ(0deg);
        box-shadow: 
            0 12px 35px rgba(255, 0, 150, 0.45),
            0 0 55px rgba(255, 0, 150, 0.35);
    }
    75% {
        transform: scale(1.02) rotateZ(-0.5deg);
        box-shadow: 
            0 15px 40px rgba(255, 0, 150, 0.5),
            0 0 60px rgba(255, 0, 150, 0.4);
    }
}

@keyframes epicButtonClick {
    0% {
        transform: scale(1) rotateZ(0deg);
    }
    50% {
        transform: scale(0.95) rotateZ(2deg);
    }
    100% {
        transform: scale(1.1) rotateZ(0deg);
    }
}

/* Efectos adicionales para botones */
.epic-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(255, 0, 150, 0.3), transparent, 
        rgba(0, 255, 150, 0.3), transparent,
        rgba(150, 0, 255, 0.3));
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: epicBorderFlow 3s ease-in-out infinite;
}

@keyframes epicBorderFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.epic-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.8) 0%, 
        transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.epic-btn:hover::after {
    width: 100%;
    height: 100%;
    opacity: 0.2;
}

/* Glow pulsante */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 245, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 245, 255, 0.8), 0 0 40px rgba(0, 245, 255, 0.6);
    }
}

/* Shake para errores */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Float animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Scale pulse */
@keyframes scalePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Ripple effect */
@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 245, 255, 0.7);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(0, 245, 255, 0);
    }
}

/* Slide in from top */
@keyframes slideInTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Aplicar animaciones a elementos */
#mainMenu, #gameOverMenu, #pauseMenu {
    animation: fadeIn 0.5s ease-out;
}

button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    animation: glowPulse 1.5s infinite;
}

button:active {
    transform: scale(0.95);
    animation: none;
}

/* Efecto ripple en click */
button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::after {
    width: 300px;
    height: 300px;
}

/* Score con animación de aparición */
#scoreDisplay, #timeDisplay {
    animation: slideInTop 0.8s ease-out;
}

/* HUD con float suave */
.hud-element {
    animation: float 3s ease-in-out infinite;
}

/* Mobile Control Buttons */
#mobileControls {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
    gap: 10px;
    z-index: 500;
    pointer-events: auto;
    display: none; /* Hidden by default */
}

/* Always hide when has .hidden class */
#mobileControls.hidden {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

/* Desktop: Always hide on large screens (both wide AND tall) */
@media (min-width: 769px) and (min-height: 501px) {
    #mobileControls {
        display: none !important;
    }
}

/* Mobile: Show as flex when NOT .hidden (vertical OR horizontal orientation) */
@media (max-width: 768px), (max-height: 500px) {
    #mobileControls {
        display: none; /* Default hidden */
    }
    
    #mobileControls:not(.hidden) {
        display: flex !important; /* Show when NOT hidden */
    }
    
    #mobileControls.hidden {
        display: none !important; /* Force hide when hidden */
    }
}

.mobile-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    touch-action: manipulation;
    pointer-events: auto;
}

.mobile-btn:active {
    transform: scale(0.9);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.8);
    background: rgba(0, 255, 255, 0.2);
}

/* Animación pulse para el TOP 1 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 20px #ffd700, 0 0 30px #ff8800;
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 30px #ffd700, 0 0 50px #ff8800, 0 0 70px #ffdd00;
    }
}

/* ===== PARTÍCULAS CSS ÉPICAS ===== */
.css-particle {
    position: absolute;
    background: radial-gradient(circle, 
        rgba(100, 150, 255, 0.8) 0%, 
        rgba(60, 100, 200, 0.6) 50%,
        transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    5% {
        opacity: 0.6;
    }
    95% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100vh) scale(0.2);
        opacity: 0;
    }
}

/* Entrada suave de stats */
.stats-grid {
    animation: statsGridEntry 0.6s ease-out both;
}

@keyframes statsGridEntry {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Neon Dark Theme - Blue & Purple */
@keyframes neonPulse {
    0%, 100% {
        filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.6)) 
                drop-shadow(0 0 50px rgba(123, 44, 191, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.8)) 
                drop-shadow(0 0 60px rgba(123, 44, 191, 0.6));
    }
}

/* VIEJO ESTILO CON AZUL CYAN - COMENTADO
#retryBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    transition: left 0.5s;
}

#retryBtn:hover::before {
    left: 100%;
}

#retryBtn:hover {
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.4), rgba(0, 212, 255, 0.2)) !important;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.6), inset 0 0 20px rgba(0, 212, 255, 0.2) !important;
    transform: translateY(-2px);
    border-color: #00e5ff !important;
}

#menuBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(123, 44, 191, 0.3), transparent);
    transition: left 0.5s;
}

#menuBtn:hover::before {
    left: 100%;
}

#menuBtn:hover {
    background: linear-gradient(135deg, rgba(100, 40, 150, 0.4), rgba(157, 78, 221, 0.2)) !important;
    box-shadow: 0 0 40px rgba(123, 44, 191, 0.6), inset 0 0 20px rgba(123, 44, 191, 0.2) !important;
    transform: translateY(-2px);
    border-color: #9d4edd !important;
}
*/

/* Animaciones orgánicas y fluidas */
@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes glitchTitle {
    0%, 90%, 100% {
        transform: translate(0, 0);
        filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.5));
    }
    92% {
        transform: translate(-2px, 2px);
        filter: drop-shadow(0 0 40px rgba(157, 78, 221, 0.5));
    }
    94% {
        transform: translate(2px, -2px);
        filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.5));
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 0 40px rgba(0, 212, 255, 0.3),
            inset 0 0 40px rgba(0, 100, 200, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 0 60px rgba(0, 212, 255, 0.5),
            inset 0 0 50px rgba(0, 150, 255, 0.3);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
/* ESTILOS VIEJOS COMENTADOS - CON AZUL CYAN Y OTROS
/* Efectos de botones más dramáticos */
/*
#retryBtn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.4), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#retryBtn:hover::before {
    width: 300px;
    height: 300px;
}

#retryBtn:hover {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.4), rgba(0, 150, 255, 0.3)) !important;
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.7), inset 0 0 30px rgba(0, 212, 255, 0.3) !important;
    transform: translateY(-3px) scale(1.05);
    border-color: #00e5ff !important;
}

#menuBtn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.4), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#menuBtn:hover::before {
    width: 300px;
    height: 300px;
}

#menuBtn:hover {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.4), rgba(123, 44, 191, 0.3)) !important;
    box-shadow: 0 0 60px rgba(157, 78, 221, 0.7), inset 0 0 30px rgba(157, 78, 221, 0.3) !important;
    transform: translateY(-3px) scale(1.05);
    border-color: #b89eff !important;
}
*/

/* Estilos simples para pantalla de muerte - estilo menú */
/*
#retryBtn:hover {
    background: linear-gradient(135deg, rgba(120, 80, 200, 0.4), rgba(100, 60, 180, 0.3)) !important;
    box-shadow: 0 0 30px rgba(120, 80, 200, 0.4) !important;
    border-color: rgba(120, 80, 200, 0.7) !important;
    transform: translateY(-2px);
}

#menuBtn:hover {
    background: rgba(40, 40, 40, 0.3) !important;
    border-color: rgba(120, 120, 120, 0.5) !important;
    color: #aaa !important;
}

#gameOverMenu {
    background: 
        radial-gradient(ellipse at 40% 30%, rgba(60, 40, 100, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(40, 20, 80, 0.08) 0%, transparent 60%),
        rgba(0, 0, 0, 0.92) !important;
}
*/

/* Estilos refinados para pantalla de muerte */
/*
#retryBtn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(138, 43, 226, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

#retryBtn:hover::before {
    width: 400px;
    height: 400px;
}

#retryBtn:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.4), rgba(106, 27, 154, 0.3)) !important;
    box-shadow: 0 6px 30px rgba(138, 43, 226, 0.3), 0 0 40px rgba(138, 43, 226, 0.2) !important;
    border-color: rgba(138, 43, 226, 0.6) !important;
    transform: translateY(-2px);
    color: #e5d4ff !important;
}

#retryBtn:active {
    transform: translateY(0);
}

#menuBtn:hover {
    background: rgba(30, 30, 40, 0.6) !important;
    border-color: rgba(100, 100, 110, 0.5) !important;
    color: #aaa !important;
    transform: translateY(-1px);
}

#menuBtn:active {
    transform: translateY(0);
}
*/

/* Animación sutil del título */
/*
@keyframes deathTitlePulse {
    0%, 100% {
        text-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
    }
    50% {
        text-shadow: 0 0 20px rgba(138, 43, 226, 0.5), 0 0 30px rgba(138, 43, 226, 0.2);
    }
}

.game-over-content h1 {
    animation: deathTitlePulse 3s ease-in-out infinite;
}
*/

/* Estilos más oscuros para pantalla de muerte */
/*
#retryBtn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(100, 40, 160, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

#retryBtn:hover::before {
    width: 400px;
    height: 400px;
}

#retryBtn:hover {
    background: linear-gradient(135deg, rgba(100, 40, 160, 0.3), rgba(80, 30, 130, 0.25)) !important;
    box-shadow: 0 6px 30px rgba(100, 40, 160, 0.2), 0 0 40px rgba(100, 40, 160, 0.15) !important;
    border-color: rgba(100, 40, 160, 0.5) !important;
    transform: translateY(-2px);
    color: #b19cd9 !important;
}

#retryBtn:active {
    transform: translateY(0);
}

#menuBtn:hover {
    background: rgba(20, 20, 25, 0.7) !important;
    border-color: rgba(80, 80, 90, 0.5) !important;
    color: #888 !important;
    transform: translateY(-1px);
}

#menuBtn:active {
    transform: translateY(0);
}
*/

/* Animación muy sutil del título */
/*
@keyframes deathTitlePulseDark {
    0%, 100% {
        text-shadow: 0 0 12px rgba(100, 60, 180, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(100, 60, 180, 0.35), 0 0 25px rgba(100, 60, 180, 0.15);
    }
}

.game-over-content h1 {
    animation: deathTitlePulseDark 3s ease-in-out infinite;
}
*/

/* Fondo más oscuro */
/*
#gameOverMenu {
    background: 
        radial-gradient(ellipse at 40% 30%, rgba(20, 10, 40, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(30, 15, 50, 0.06) 0%, transparent 60%),
        rgba(0, 0, 0, 0.96) !important;
}
*/

/* Efectos premium para pantalla de muerte */

/* Animación de entrada del panel */
/*
@keyframes deathPanelSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.game-over-content {
    animation: deathPanelSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
*/

/* Efecto hover en botón REINTENTAR */
/*
#retryBtn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(150, 80, 200, 0.25) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

#retryBtn:hover::before {
    width: 500px;
    height: 500px;
}

#retryBtn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(180, 120, 220, 0.15), transparent);
    transition: left 0.7s ease;
    z-index: 1;
}

#retryBtn:hover::after {
    left: 100%;
}

#retryBtn:hover {
    background: linear-gradient(135deg, rgba(140, 60, 200, 0.35), rgba(110, 45, 160, 0.28)) !important;
    box-shadow: 
        0 6px 35px rgba(120, 50, 180, 0.25),
        0 0 50px rgba(120, 50, 180, 0.15),
        inset 0 1px 0 rgba(180, 100, 220, 0.2) !important;
    border-color: rgba(140, 60, 200, 0.5) !important;
    transform: translateY(-3px) scale(1.02);
    color: #cdb8e0 !important;
}

#retryBtn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 2px 15px rgba(120, 50, 180, 0.2),
        inset 0 1px 0 rgba(180, 100, 220, 0.15) !important;
}
*/

/* Efecto hover en botón MENÚ */
/*
#menuBtn:hover {
    background: rgba(20, 20, 28, 0.8) !important;
    border-color: rgba(70, 70, 80, 0.5) !important;
    color: #888 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#menuBtn:active {
    transform: translateY(0);
}
*/

/* Animación sutil del título */
/*
@keyframes deathTitleGlow {
    0%, 100% {
        text-shadow: 
            0 0 15px rgba(120, 70, 180, 0.25),
            0 2px 4px rgba(0, 0, 0, 0.8);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(140, 80, 200, 0.35),
            0 0 35px rgba(120, 70, 180, 0.15),
            0 2px 4px rgba(0, 0, 0, 0.8);
    }
}

.game-over-content h1 {
    animation: deathTitleGlow 4s ease-in-out infinite;
}
*/

/* Efecto hover sutil en stats */
/*
.game-over-content > div > div > div:hover {
    transform: translateY(-2px);
    border-color: rgba(120, 50, 180, 0.2) !important;
    box-shadow: 
        inset 0 1px 0 rgba(140, 70, 200, 0.12),
        0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

/* === VIDEO GAME REFINED STYLE CON GLOW === */
/* Colores ajustados al fondo del juego (#0a0a1a, #1a0a2e) */

/* Estado REPOSO - Sin glow extra, solo sombra base */
#retryBtn {
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(130, 80, 200, 0.15) !important;
    outline: none !important;
    transition: all 0.4s ease !important; /* Transición suave para el glow */
}

#menuBtn {
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(60, 55, 70, 0.1) !important;
    outline: none !important;
    transition: all 0.4s ease !important; /* Transición suave para el glow */
}

#retryBtn:hover {
    transform: translateY(-3px) scale(1.01) !important;
    /* Aparece glow morado progresivamente */
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(130, 80, 200, 0.15),
        0 0 35px rgba(100, 50, 180, 0.6),
        0 0 55px rgba(120, 70, 190, 0.45),
        0 0 80px rgba(100, 50, 180, 0.3) !important;
    color: #d0b8e8 !important;
    text-shadow: 
        0 0 15px rgba(120, 70, 190, 0.7),
        0 0 30px rgba(100, 50, 180, 0.5) !important;
}

#retryBtn:active {
    transform: translateY(-1px) scale(0.99) !important;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(130, 80, 200, 0.15),
        0 0 25px rgba(100, 50, 180, 0.4),
        0 0 40px rgba(120, 70, 190, 0.3) !important;
}

#retryBtn::before,
#retryBtn::after {
    display: none !important;
}

/* Quitar outline azul del navegador - estado focus sin glow extra */
#retryBtn:focus {
    outline: none !important;
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(130, 80, 200, 0.15) !important;
}

#menuBtn:focus {
    outline: none !important;
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(60, 55, 70, 0.1) !important;
}

#menuBtn:hover {
    transform: translateY(-2px) !important;
    /* Aparece glow sutil progresivamente */
    box-shadow: 
        0 7px 28px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(60, 55, 70, 0.1),
        0 0 20px rgba(60, 50, 85, 0.35),
        0 0 35px rgba(60, 50, 85, 0.2) !important;
    color: #aaa !important;
}

#menuBtn:active {
    transform: translateY(0) !important;
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(60, 55, 70, 0.1),
        0 0 15px rgba(60, 50, 85, 0.25) !important;
}

/* Hover sutil en cajas de estadísticas */
.game-over-content > div > div > div:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(110, 55, 180, 0.45) !important;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(100, 50, 180, 0.25),
        inset 0 1px 0 rgba(130, 70, 190, 0.15) !important;
}

/* Sin animación automática del título */
.game-over-content h1 {
    animation: none !important;
}
