/* ============================================ */
/* AUTH PAGES CSS — Login & Register             */
/* ============================================ */

:root {
    --bg-primary: #070b14;
    --bg-secondary: #0c1222;
    --bg-card: rgba(15, 23, 42, 0.85);
    --accent: #2563eb;
    --accent-light: #3b82f6;
    --accent-glow: rgba(37, 99, 235, 0.15);
    --border: rgba(37, 99, 235, 0.15);
    --border-hover: rgba(37, 99, 235, 0.4);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-muted: rgba(255, 255, 255, 0.4);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-secondary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background particles */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.06) 0%, transparent 60%);
}

#particleCanvas {
    width: 100%;
    height: 100%;
}

/* Container */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 32px 24px;
}

/* Logo */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 40px;
    justify-content: center;
}

.logo-icon {
    color: var(--accent);
    font-size: 1.4rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.12em;
}

/* Card */
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), 0 0 60px rgba(37, 99, 235, 0.06);
}

/* Header */
.auth-header {
    margin-bottom: 32px;
}

.auth-header h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* Form */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    background: rgba(37, 99, 235, 0.04);
}

/* Submit Button */
.btn-auth {
    width: 100%;
    padding: 15px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    margin-bottom: 16px;
}

.btn-auth:hover:not(:disabled) {
    background: var(--accent-light);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
}

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    color: white;
}

.form-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

.form-note a {
    color: var(--text-muted);
    text-decoration: underline;
}

a {
    color: var(--accent-light);
    text-decoration: none;
}

/* ============================================ */
/* RESPONSIVE                                   */
/* ============================================ */
@media (max-width: 640px) {
    .auth-container {
        padding: 20px 16px;
    }

    .auth-card {
        padding: 28px 20px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group input {
        padding: 14px 16px;
        font-size: 16px;
        /* prevents iOS zoom on focus */
    }

    .btn-auth {
        padding: 16px;
        font-size: 1rem;
    }

    .auth-logo {
        margin-bottom: 28px;
    }
}