/* ============================================
   LA PURGA - Estilos Profesionales
   ============================================ */

/* Animación para almas críticas (<25% vida) */
.agonizando {
    animation: pulso-critico 0.6s infinite alternate ease-in-out;
}

@keyframes pulso-critico {
    from {
        box-shadow:
            0 0 10px rgba(255, 50, 50, 0.3),
            0 0 20px rgba(255, 0, 0, 0.1),
            inset 0 0 15px rgba(255, 0, 0, 0.1);
        filter: brightness(0.9);
    }
    to {
        box-shadow:
            0 0 25px rgba(255, 50, 50, 0.6),
            0 0 50px rgba(255, 0, 0, 0.3),
            inset 0 0 20px rgba(255, 0, 0, 0.2);
        filter: brightness(1.1);
    }
}

/* La Burbuja del Alma */
.alma {
    position: absolute;
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(35, 35, 55, 0.95), rgba(20, 20, 35, 0.98));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.5s, box-shadow 0.3s, filter 0.2s;
    border: 3px solid #444;
    z-index: 10;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(100, 100, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    /* Centrar el alma en su posición */
    margin-left: -42.5px;
    margin-top: -42.5px;
}

.alma:hover {
    filter: brightness(1.15);
    box-shadow:
        0 8px 35px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(100, 100, 255, 0.2);
}

.alma:active {
    filter: brightness(0.9);
}

/* Avatar/Emoji del alma */
.alma-avatar {
    font-size: 30px;
    margin-bottom: 3px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s;
}

.alma:hover .alma-avatar {
    transform: scale(1.1);
}

/* Texto/nombre del alma */
.alma-texto {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 0 6px;
    max-width: 72px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Porcentaje de vida */
.alma-porcentaje {
    position: absolute;
    bottom: -18px;
    left: 50%;
    margin-left: -22px;
    width: 44px;
    text-align: center;
    font-size: 11px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.9), rgba(20, 20, 35, 0.95));
    padding: 3px 10px;
    border-radius: 12px;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
}

/* Corona para el alma con más tiempo */
.alma-top {
    position: absolute;
    top: -22px;
    left: 50%;
    margin-left: -11px;
    font-size: 22px;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.5));
    pointer-events: none;
    animation: float-crown 2s ease-in-out infinite;
}

@keyframes float-crown {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -3px; }
}

/* Selector de Emojis en el Modal Crear */
.emoji-selector {
    display: flex;
    gap: 10px;
    margin: 24px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.emoji-opt {
    font-size: 28px;
    cursor: pointer;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.emoji-opt:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
}

.emoji-opt.selected {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    transform: scale(1.15);
    border: 2px solid rgba(102, 126, 234, 0.6);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

/* Efecto de partículas flotantes (opcional via pseudo-elementos) */
.alma::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), transparent 60%);
    pointer-events: none;
}

/* Animación suave para nuevas almas */
@keyframes aparecer {
    from {
        opacity: 0;
        filter: blur(10px) brightness(2);
    }
    to {
        opacity: 1;
        filter: blur(0) brightness(1);
    }
}

.alma {
    animation: aparecer 0.4s ease-out;
}

/* Scrollbar personalizada para modales */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
