/* ═══════════════════════════════════════════════════════════════
   CodeAlive — auth.css
   Used for Login, Signup, and Reset Password pages.
   Expects home.css to be loaded first for variables and base buttons.
═══════════════════════════════════════════════════════════════ */

body.auth-body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Background glows */
.auth-glow-green {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(63,224,160,0.06) 0%, transparent 65%);
    top: -200px;
    right: -100px;
    pointer-events: none;
}

.auth-glow-blue {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91,163,255,0.05) 0%, transparent 65%);
    bottom: -150px;
    left: -100px;
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: var(--bg3);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.auth-title {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 300;
    color: #f0f4ff;
    letter-spacing: -0.02em;
}

.auth-title em {
    font-style: italic;
    color: var(--green);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 11px;
    color: var(--text2);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-input {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--text);
    font-family: var(--mono);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(63,224,160,0.15);
}

.auth-input::placeholder {
    color: var(--text3);
}

.auth-btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    padding: 14px;
}

.auth-links {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    font-size: 12px;
}

.auth-links a {
    color: var(--text2);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--green);
}

/* ── ERROR BAR ──────────────────────────────────────── */
#error-bar {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1c1014;
    border: 1px solid #3a1520;
    border-radius: 8px;
    padding: 11px 20px;
    color: #f07575;
    font-size: 12.5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 200;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

#error-bar.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

/* ── TOAST ──────────────────────────────────────────── */
#toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--green);
    color: #050c08;
    font-size: 12px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s;
    z-index: 300;
}

#toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Modal specific */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8,10,14,0.8);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.auth-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.auth-modal {
    background: var(--bg3);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 400px;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.auth-modal-overlay.active .auth-modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text2);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.5;
    margin-bottom: 24px;
}
