/* ════════════════════════════════════════════════════════════════
   AUTH STYLES — Login / Signup Screen
   Premium glassmorphism design
   ════════════════════════════════════════════════════════════════ */

/* ── AUTH WRAPPER ── */
.auth-screen {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: #050311;
    background-image:
        radial-gradient(46vw 46vw at 8% -6%, rgba(99,102,241,.28) 0%, transparent 60%),
        radial-gradient(52vw 52vw at 104% 6%, rgba(217,70,239,.18) 0%, transparent 62%),
        radial-gradient(60vw 55vw at 50% 116%, rgba(34,211,238,.13) 0%, transparent 60%);
    transition: opacity .5s cubic-bezier(.4,0,.2,1), visibility .5s;
}
.auth-screen.hidden {
    opacity: 0; visibility: hidden; pointer-events: none;
}

/* Animated background dots */
.auth-bg-dots {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.auth-bg-dots::before,
.auth-bg-dots::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: floatDot 12s ease-in-out infinite alternate;
}
.auth-bg-dots::before {
    width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(99,102,241,.18), transparent 70%);
    top: -90px; left: -70px;
    filter: blur(20px);
}
.auth-bg-dots::after {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(217,70,239,.14), transparent 70%);
    bottom: -110px; right: -90px;
    animation-delay: -6s;
    filter: blur(20px);
}

@keyframes floatDot {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -40px) scale(1.15); }
}

/* ── AUTH CARD ── */
.auth-card {
    position: relative; z-index: 1;
    width: 420px; max-width: 92vw;
    background: rgba(16, 13, 32, .72);
    backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid rgba(255,255,255,.1);
    border-top-color: rgba(255,255,255,.16);
    border-radius: 24px;
    padding: 44px 36px 36px;
    box-shadow:
        0 24px 80px rgba(0,0,0,.55),
        0 1px 0 rgba(255,255,255,.06) inset,
        0 0 70px rgba(217,70,239,.08);
    animation: authCardIn .6s cubic-bezier(.4,0,.2,1) backwards;
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(24px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── LOGO in auth ── */
.auth-logo {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    margin-bottom: 32px;
}
.auth-logo-icon {
    width: 56px; height: 56px; border-radius: 16px;
    background: linear-gradient(135deg, #6366f1, #d946ef);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff;
    box-shadow: 0 8px 30px rgba(139,92,246,.4);
}
.auth-logo-title {
    font-size: 1.4rem; font-weight: 800; color: #f0f2f8;
    letter-spacing: -.02em;
}
.auth-logo-sub {
    font-size: .72rem; font-weight: 500; color: #636882;
    text-transform: uppercase; letter-spacing: .08em;
    margin-top: -4px;
}

/* ── FORM ── */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-field {
    display: flex; flex-direction: column; gap: 6px;
}
.auth-field label {
    font-size: .76rem; font-weight: 600; color: #8a90aa;
    text-transform: uppercase; letter-spacing: .05em;
}
.auth-field input {
    padding: 13px 16px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    color: #f4f3fc;
    font-size: .9rem; font-family: 'Inter', sans-serif;
    outline: none;
    transition: all .25s cubic-bezier(.4,0,.2,1);
}
.auth-field input:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 0 3px rgba(34,211,238,.16);
    background: rgba(34,211,238,.06);
}
.auth-field input::placeholder { color: #4a4e68; }

/* ── BUTTONS ── */
.auth-submit {
    padding: 14px;
    background: linear-gradient(135deg, #6366f1, #d946ef);
    border: none; border-radius: 12px;
    color: #fff; font-size: .92rem; font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    margin-top: 4px;
    position: relative; overflow: hidden;
    box-shadow: 0 10px 26px rgba(139,92,246,.35);
}
.auth-submit::after {
    content: ''; position: absolute; top: 0; left: -120%; width: 120%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
    transition: left .6s cubic-bezier(.4,0,.2,1); pointer-events: none;
}
.auth-submit:hover::after { left: 120%; }
.auth-submit:hover {
    box-shadow: 0 16px 40px rgba(139,92,246,.5);
    transform: translateY(-2px);
}
.auth-submit:active { transform: scale(.98); }
.auth-submit:disabled {
    opacity: .6; cursor: not-allowed; transform: none;
}
.auth-submit .spinner {
    display: none;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
.auth-submit.loading .spinner { display: block; }
.auth-submit.loading span { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── DIVIDER ── */
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 8px 0;
}
.auth-divider::before,
.auth-divider::after {
    content: ''; flex: 1; height: 1px;
    background: rgba(255,255,255,.06);
}
.auth-divider span {
    font-size: .72rem; color: #4a4e68; font-weight: 500;
    text-transform: uppercase; letter-spacing: .06em;
}

/* ── GOOGLE BUTTON ── */
.auth-google-btn {
    width: 100%; padding: 12px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    color: #c4c8e0;
    font-size: .88rem; font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all .25s cubic-bezier(.4,0,.2,1);
}
.auth-google-btn:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.auth-google-btn:active { transform: scale(.98); }
.auth-google-btn svg { flex-shrink: 0; }

/* ── TOGGLE LINK ── */
.auth-toggle {
    text-align: center; margin-top: 8px;
}
.auth-toggle span {
    font-size: .82rem; color: #636882;
}
.auth-toggle a {
    color: #22d3ee; text-decoration: none; font-weight: 600;
    cursor: pointer; transition: color .15s;
}
.auth-toggle a:hover { color: #67e8f9; }

/* ── ERROR MESSAGE ── */
.auth-error {
    padding: 10px 14px;
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.2);
    border-radius: 8px;
    color: #f87171;
    font-size: .8rem; font-weight: 500;
    display: none;
    animation: fadeInUp .2s cubic-bezier(.4,0,.2,1);
}
.auth-error.show { display: flex; align-items: center; gap: 8px; }
.auth-error i { flex-shrink: 0; }

/* ── SUCCESS MESSAGE ── */
.auth-success {
    padding: 10px 14px;
    background: rgba(34,211,167,.1);
    border: 1px solid rgba(34,211,167,.2);
    border-radius: 8px;
    color: #34ffc8;
    font-size: .8rem; font-weight: 500;
    display: none;
    animation: fadeInUp .2s cubic-bezier(.4,0,.2,1);
}
.auth-success.show { display: flex; align-items: center; gap: 8px; }
.auth-success i { flex-shrink: 0; }

/* ── PASSWORD TOGGLE ── */
.auth-field .input-wrap {
    position: relative;
}
.auth-field .input-wrap input {
    width: 100%; padding-right: 44px;
}
.auth-field .toggle-pw {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px;
    background: none; border: none; color: #4a4e68;
    cursor: pointer; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.auth-field .toggle-pw:hover { color: #8a90aa; background: rgba(255,255,255,.04); }

/* ── MOBILE ── */
@media (max-width: 480px) {
    .auth-screen {
        padding: 16px;
        align-items: flex-start;
        padding-top: 10vh;
    }
    .auth-card {
        padding: 28px 18px 24px;
        border-radius: 16px;
        max-width: 100%;
        width: 100%;
    }
    .auth-logo { margin-bottom: 22px; gap: 8px; }
    .auth-logo-icon { width: 44px; height: 44px; font-size: 1.1rem; border-radius: 12px; }
    .auth-logo-title { font-size: 1.15rem; }
    .auth-logo-sub { font-size: .65rem; }
    .auth-form { gap: 12px; }
    .auth-field label { font-size: .7rem; }
    .auth-field input { padding: 11px 12px; font-size: .84rem; }
    .auth-submit { padding: 12px; font-size: .86rem; }
    .auth-google-btn { padding: 10px; font-size: .82rem; }
    .auth-divider { margin: 4px 0; }
    .auth-toggle { margin-top: 6px; }
    .auth-toggle span, .auth-toggle a { font-size: .78rem; }
}

/* ── FORGOT PASSWORD LINK ── */
.auth-forgot-link {
    display: block;
    text-align: right;
    font-size: .76rem;
    color: #22d3ee;
    cursor: pointer;
    font-weight: 500;
    margin-top: 4px;
    transition: color .15s;
    text-decoration: none;
}
.auth-forgot-link:hover { color: #67e8f9; }

/* ── BACK TO LOGIN BUTTON ── */
.auth-back-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    color: #8a90aa;
    font-size: .85rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    margin-top: 4px;
}
.auth-back-btn:hover {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.12);
    color: #c4c8e0;
}
