/* ==================== AUTH MODAL ==================== */
#auth-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(76, 29, 149, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

#auth-modal.open {
    display: flex;
    animation: authFadeIn 0.22s ease;
}

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

/* ---- Card ---- */
.auth-card {
    background: #ffffff;
    border-radius: 32px;
    padding: 2.8rem 2.6rem 2.4rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow:
        0 32px 64px -12px rgba(192, 132, 252, 0.3),
        0 0 0 1px rgba(192, 132, 252, 0.1);
    animation: authCardPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes authCardPop {
    from { transform: scale(0.88) translateY(16px); opacity: 0; }
    to   { transform: scale(1) translateY(0);       opacity: 1; }
}

/* ---- Close button ---- */
.auth-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: #f3e8ff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
    color: #9f7aea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.auth-close:hover {
    background: #e0c4f7;
    color: #6b21a8;
    transform: scale(1.1);
}

/* ---- Logo / heading ---- */
.auth-logo {
    text-align: center;
    margin-bottom: 1.8rem;
}

.auth-logo h2 {
    font-size: 1.55rem;
    font-weight: 800;
    color: #4c1d95;
    letter-spacing: -0.5px;
    margin-bottom: 0.35rem;
}

.auth-logo p {
    font-size: 0.92rem;
    color: #9f7aea;
    line-height: 1.4;
}

/* ---- Tabs ---- */
.auth-tabs {
    display: flex;
    background: #f3e8ff;
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 1.8rem;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.93rem;
    color: #9f7aea;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.1px;
}

.auth-tab.active {
    background: linear-gradient(90deg, #c084fc, #ec4899);
    color: white;
    box-shadow: 0 4px 14px rgba(192, 132, 252, 0.4);
}

.auth-tab:not(.active):hover {
    background: rgba(192, 132, 252, 0.12);
    color: #6b21a8;
}

/* ---- Alerts ---- */
.auth-error,
.auth-success {
    border-radius: 14px;
    padding: 11px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 1.1rem;
    display: none;
    line-height: 1.4;
}

.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.auth-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

/* ---- Form fields ---- */
.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #6b21a8;
    font-size: 1.02rem;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.05rem;
    font-weight: 500;
    color: #4c1d95;
    background: #fff;
    border: 2px solid #e0c4f7;
    border-radius: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.form-group input:focus {
    outline: none;
    border-color: #c084fc;
    box-shadow: 0 0 0 5px rgba(192, 132, 252, 0.18);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: #b8a0e0;
    opacity: 1;
}

/* ---- Submit button ---- */
.auth-submit {
    width: 100%;
    background: linear-gradient(90deg, #c084fc, #ec4899);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 24px -6px rgba(192, 132, 252, 0.5);
    margin-top: 0.5rem;
    letter-spacing: 0.3px;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -6px rgba(236, 72, 153, 0.5);
}

.auth-submit:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px -4px rgba(192, 132, 252, 0.4);
}

.auth-submit:disabled {
    opacity: 0.58;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
