/* 
 * Fluxy - Modern Auth Pages CSS
 * Glassmorphism, animated backgrounds, and premium input fields
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Syne:wght@700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --bg-dark: #050508;
    --glass-bg: rgba(18, 18, 30, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #9494a8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* --- Animated Background --- */
.bg-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #0a0a1a 0%, #050508 100%);
}

.auth-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary);
    filter: blur(100px);
    opacity: 0.1;
    border-radius: 50%;
    animation: drift 25s infinite linear;
}

.auth-blob-1 {
    top: -10%;
    left: -10%;
    background: #6366f1;
}

.auth-blob-2 {
    bottom: -10%;
    right: -10%;
    background: #a855f7;
    animation-delay: -5s;
}

.auth-blob-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.05;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(50px, 100px) scale(1.1) rotate(120deg);
    }

    66% {
        transform: translate(-100px, 50px) scale(0.9) rotate(240deg);
    }

    100% {
        transform: translate(0, 0) scale(1) rotate(360deg);
    }
}

/* --- Auth Card --- */
.auth-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    animation: containerEnter 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes containerEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    display: flex;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
}

.auth-form-side {
    flex: 1;
    padding: 56px;
    display: flex;
    flex-direction: column;
}

.qr-side {
    width: 320px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 1px solid var(--glass-border);
    padding: 56px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (max-width: 768px) {
    .qr-side {
        display: none;
    }

    .auth-form-side {
        padding: 40px 32px;
    }
}

.auth-header {
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 28px;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-container {
    position: relative;
}

.input-container input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px 18px;
    color: white;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-container input:focus {
    background: rgba(0, 0, 0, 0.6);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 0 20px rgba(99, 102, 241, 0.1);
    outline: none;
}

.auth-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.auth-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: left;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.3s;
}

.auth-footer a:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* --- QR Styling --- */
.qr-container {
    background: #fff;
    padding: 12px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.qr-code {
    width: 160px;
    height: 160px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.qr-side h3 {
    font-size: 20px;
    font-family: 'Syne', sans-serif;
    margin-bottom: 12px;
}

.qr-side p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.qr-side strong {
    color: var(--text-main);
}

/* --- Error Message --- */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    color: #ef4444;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}