/* Reusable Auth Modal Styles (Glow CTA + Modal) */

.glow-cta { position: relative; display: inline-block; cursor: pointer; }
.glow-cta::before {
    content: ""; position: absolute; inset: -4px; border-radius: 16px;
    background: linear-gradient(90deg, #d946ef, #22d3ee, #10b981);
    filter: blur(12px); animation: auth-pulse 2s infinite alternate; opacity: .7;
}
.glow-cta button {
    position: relative; z-index: 1; padding: 12px 20px; border: none; border-radius: 12px;
    background: rgba(15, 23, 42, 0.9); color: #fff; font-weight: 600; font-size: 15px;
    display: flex; gap: 8px; align-items: center; box-shadow: 0 0 16px rgba(0,0,0,.6);
    cursor: pointer; transition: transform .2s ease, opacity .2s ease;
}
.glow-cta button:hover { transform: scale(1.05); opacity: .95; }

@keyframes auth-pulse { from { opacity: .5; } to { opacity: 1; } }

/* Modal overlay and content */
.auth-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px);
    display: none; align-items: center; justify-content: center; z-index: 9999; }
.auth-modal-overlay.active { display: flex; }

.auth-modal-box {
    width: 420px; max-width: calc(100% - 24px);
    background: linear-gradient(135deg, rgba(15,23,42,.95), rgba(30,41,59,.9));
    border: 1px solid rgba(255,255,255,.08); border-radius: 16px;
    box-shadow: 0 0 40px rgba(168,85,247,.45); overflow: hidden; animation: auth-scale-in .25s ease;
}
@keyframes auth-scale-in { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.auth-modal-header { padding: 16px 18px; background: linear-gradient(90deg, rgba(217,70,239,.18), rgba(34,211,238,.18)); display:flex; align-items:center; justify-content:space-between; }
.auth-modal-title { margin: 0; font-size: 18px; color: #f0abfc; display:flex; align-items:center; gap:8px; }
.auth-close-btn { background: none; border: none; color: #cbd5e1; font-size: 18px; cursor: pointer; }

.auth-modal-body { padding: 18px; }
.auth-tabs { display: flex; margin-bottom: 12px; border-radius: 12px; overflow: hidden; background: rgba(30,41,59,.6); }
.auth-tab { flex: 1; text-align: center; padding: 10px; cursor: pointer; transition: background .2s ease; color:#e5e7eb; }
.auth-tab.active-login { background: rgba(217,70,239,.35); }
.auth-tab.active-signup { background: rgba(34,211,238,.35); }

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-form .form-group { margin-bottom: 12px; display: flex; flex-direction: column; }
.auth-form label { font-size: 13px; margin-bottom: 4px; color:#e5e7eb; }
.auth-form input { padding: 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: rgba(15,23,42,.6); color: #fff; }
.auth-form input:focus { outline: none; border-color: #a78bfa; box-shadow: 0 0 6px rgba(168,85,247,.35); }

.auth-submit { width: 100%; padding: 12px; border: none; border-radius: 8px; background: linear-gradient(90deg,#d946ef,#22d3ee,#10b981); color:#0f172a; font-weight: 700; cursor: pointer; margin-top: 6px; }

.auth-socials { margin-top: 16px; text-align: center; }
.auth-socials p { font-size: 12px; color: #94a3b8; margin-bottom: 8px; }
.auth-social-buttons { display: flex; gap: 10px; }
.auth-social-buttons button { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: rgba(15,23,42,.6); color: #fff; cursor: pointer; transition: transform .2s ease; }
.auth-social-buttons button:hover { transform: scale(1.05); }

/* Utility for hiding duplicated legacy modals when new one is active */
body.auth-modal-open { overflow: hidden; }

/* ===== PULSANTE PROFILO ===== */
.profile-button-wrapper {
    position: relative;
    display: inline-block;
}

.profile-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.profile-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    font-size: 18px;
    color: white;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.profile-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1;
}

.profile-email {
    font-size: 0.75rem;
    opacity: 0.8;
    line-height: 1;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 8px;
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.profile-link:hover {
    background: #f0f0f0;
    color: #667eea;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .profile-button {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .profile-avatar {
        width: 28px;
        height: 28px;
    }
    
    .profile-name {
        font-size: 0.8rem;
    }
    
    .profile-email {
        font-size: 0.7rem;
    }
    
    .profile-dropdown {
        min-width: 160px;
    }
}

