/* Design tokens & Variables */
:root {
    --bg-dark: #0a0e1a;
    --card-bg: rgba(17, 22, 34, 0.55);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-shadow: rgba(0, 0, 0, 0.4);

    --primary: #6366f1;
    /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.3);
    --accent: #22d3ee;
    /* Cyan */
    --accent-glow: rgba(34, 211, 238, 0.3);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-border-focus: #6366f1;

    --error: #f43f5e;
    /* Rose */
    --error-bg: rgba(244, 63, 94, 0.1);
    --error-border: rgba(244, 63, 94, 0.2);

    --success: #10b981;
    /* Emerald */
    --success-bg: rgba(16, 185, 129, 0.1);
    --success-border: rgba(16, 185, 129, 0.2);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Floating Ambient Blobs */
.bg-animations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.45;
    mix-blend-mode: screen;
    animation: orbit 25s infinite alternate ease-in-out;
}

.blob-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--primary) 0%, rgba(99, 102, 241, 0) 70%);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #a855f7 0%, rgba(168, 85, 247, 0) 70%);
    bottom: -15%;
    right: -10%;
    animation-delay: -5s;
    animation-duration: 30s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent) 0%, rgba(34, 211, 238, 0) 70%);
    top: 40%;
    left: 60%;
    animation-delay: -10s;
    animation-duration: 20s;
}

@keyframes orbit {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    50% {
        transform: translate(80px, 50px) scale(1.15) rotate(180deg);
    }

    100% {
        transform: translate(-40px, -80px) scale(0.9) rotate(360deg);
    }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    z-index: 2;
}

/* Glassmorphism Card */
.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 15px 35px var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Logo Area */
.logo-area {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: inline-block;
    filter: drop-shadow(0 0 10px var(--primary-glow));
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.logo-area h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

/* Alert Banners */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.88rem;
    backdrop-filter: blur(5px);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    color: #fda4af;
}

.alert-success {
    background-color: var(--success-bg);
    border: 1px solid var(--success-border);
    color: #6ee7b7;
}

.alert-icon {
    font-size: 1.1rem;
}

/* Login Form & Inputs */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.input-group label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 1rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 42px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.input-wrapper input:focus {
    border-color: var(--input-border-focus);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background-color: rgba(15, 23, 42, 0.8);
}

.input-wrapper input:focus+.input-icon {
    color: var(--primary);
}

/* Submit Button */
.btn-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    filter: brightness(1.1);
}

.btn-submit:active {
    transform: translateY(1px);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-submit:hover .btn-arrow {
    transform: translateX(4px);
}

.label-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 0.82rem;
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.85;
}

.forgot-link:hover {
    opacity: 1;
    text-shadow: 0 0 8px var(--accent-glow);
}

.back-to-login {
    text-align: center;
    margin-top: 24px;
}

.back-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--primary);
}