/* Animated Glow Avatar */
.avatar-glow-container {
    position: relative;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.avatar-glow-container::before {
    content: '';
    position: absolute;
    inset: -3px;
    /* border thickness */
    border-radius: 50%;
    background: conic-gradient(from 0deg, #e0e0e0, #bdbdbd, #e0e0e0);
    z-index: -1;
    animation: avatarSpinGradient 4s linear infinite;
}

.avatar-glow-container img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #fff;
    position: relative;
    z-index: 2;
}

/* Base rotation animation */
@keyframes avatarSpinGradient {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ROLE MODIFIERS */
.avatar-glow-container.role-estudiante::before {
    background: conic-gradient(from 0deg, #4facfe, #00f2fe, #4facfe);
}

.avatar-glow-container.role-docente::before {
    background: conic-gradient(from 0deg, #43e97b, #38f9d7, #43e97b);
}

.avatar-glow-container.role-docente-verificado::before {
    background: conic-gradient(from 0deg, #f6d365, #fda085, #f6d365);
    box-shadow: 0 0 10px rgba(253, 160, 133, 0.6);
}

.avatar-glow-container.role-coordinador::before {
    background: conic-gradient(from 0deg, #b224ef, #7579ff, #b224ef);
}

.avatar-glow-container.role-administrativo::before {
    background: conic-gradient(from 0deg, #30cfd0, #330867, #30cfd0);
}

/* Modo Dios (Root IDs) - premium gradient + pure glow */
.avatar-glow-container.role-dios::before {
    background: conic-gradient(from 0deg, #A855F7, #3B82F6, #22D3EE, #ffffff, #A855F7);
    filter: brightness(1.2);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.6), 0 0 25px rgba(34, 211, 238, 0.6);
    animation: avatarSpinGradient 4s linear infinite;
}

/* CONTEXT SIZES */

/* For global Header */
.header-avatar-glow {
    width: 40px;
    height: 40px;
}

.header-avatar-glow::before {
    inset: -2px;
    /* Thinner border for small avatar */
}

/* For Profile Page */
.profile-avatar-glow {
    width: 85px;
    height: 85px;
    margin: 0 auto;
}

.profile-avatar-glow::before {
    inset: -4px;
    /* Thicker border for large avatar */
}