/* --- ACCOUNT MODAL STYLES (REBUILT) --- */

/* O Overlay Fixo */
.account-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000; /* Acima de tudo */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.account-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* O Cartão do Modal */
.account-modal-card {
    background: #130420; /* Roxo muito escuro */
    border: 1px solid rgba(147, 51, 234, 0.3); /* Borda roxa neon sutil */
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(147, 51, 234, 0.15);
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden; /* Garante que nada saia das bordas arredondadas */
}

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

/* Header */
.modal-header {
    padding: 20px 25px;
    background: rgba(147, 51, 234, 0.05);
    border-bottom: 1px solid rgba(147, 51, 234, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px;
}
.close-btn:hover { color: #ffffff; }

/* Área de Scroll */
.modal-scroll-area {
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Seção de Perfil */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%; /* Garante que o wrapper seja redondo */
    /* overflow: hidden; REMOVIDO para permitir que o botão saia um pouco se necessário, mas o botão tem z-index maior */
}

.profile-img, .profile-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #9333ea; /* Roxo Neon */
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.3);
}

.profile-placeholder {
    background: #2d1b4e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #9333ea;
    color: white;
    width: 36px; /* Aumentado um pouco */
    height: 36px; /* Aumentado um pouco */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid #130420; /* Borda mais grossa para destacar do fundo */
    transition: transform 0.2s, background 0.2s;
    z-index: 10; /* Garante que fique bem acima */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); /* Sombra para destacar */
}
.edit-avatar-btn:hover { transform: scale(1.1); background: #a855f7; }

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    margin: 0;
    font-size: 1.4rem;
    color: white;
    font-family: 'Outfit', sans-serif;
}

.user-handle {
    color: #9333ea;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-email {
    color: #94a3b8;
    font-size: 0.9rem;
}

.member-since {
    margin-top: 5px;
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Divisor */
.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    width: 100%;
}

/* Seção de Cursos */
.courses-section h4 {
    margin: 0 0 15px 0;
    color: #e2e8f0;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.courses-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.course-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}
.course-item:hover { background: rgba(255, 255, 255, 0.06); }

.course-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.course-name {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
}

.course-expiry {
    color: #94a3b8;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Badges */
.badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-active { background: rgba(34, 211, 238, 0.15); color: #22d3ee; border: 1px solid rgba(34, 211, 238, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-expired { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 20px 0;
    color: #64748b;
}
.empty-state i { font-size: 2rem; margin-bottom: 10px; opacity: 0.5; }
.empty-state p { margin: 0 0 10px 0; font-size: 0.9rem; }

.btn-explore {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(147, 51, 234, 0.1);
    color: #9333ea;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-explore:hover { background: #9333ea; color: white; }

/* Ações */
.account-actions {
    display: flex;
    justify-content: center;
}

.action-link {
    color: #22d3ee;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}
.action-link:hover { color: #67e8f9; text-decoration: underline; }
