body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-base);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(129, 140, 248, 0.12) 0%, transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(192, 132, 252, 0.12) 0%, transparent 30%),
        radial-gradient(circle at 50% 80%, rgba(34, 211, 238, 0.08) 0%, transparent 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
}

/* Ambient Background Animation */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCI+CjxwYXRoIGQ9Ik0wIDBoNDB2NDBIMHoiIGZpbGw9Im5vbmUiLz4KPGNpcmNsZSBjeD0iMSIgY3k9IjEiIHI9IjEiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wMykiLz4KPC9zdmc+');
    opacity: 0.6;
    z-index: -1;
    animation: moveBackground 120s linear infinite;
}

@keyframes moveBackground {
    from { transform: translate(0, 0); }
    to { transform: translate(10%, 10%); }
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.7),
        0 0 60px -20px rgba(129, 140, 248, 0.15);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.8),
        0 0 80px -20px rgba(129, 140, 248, 0.2);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0.9;
}

.login-header {
    text-align: center;
    margin-bottom: 3rem;
}

.app-logo {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 10px 30px rgba(129, 140, 248, 0.35),
        0 0 20px rgba(129, 140, 248, 0.2);
    transform: rotate(-5deg);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-card:hover .app-logo {
    transform: rotate(0deg) scale(1.05);
    box-shadow:
        0 15px 40px rgba(129, 140, 248, 0.45),
        0 0 30px rgba(129, 140, 248, 0.3);
}

.app-logo svg {
    color: white;
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.form-floating {
    margin-bottom: 1.5rem;
}

.form-control {
    background: rgba(15, 15, 20, 0.6) !important;
    border: 1px solid var(--glass-border);
    color: #fff !important;
    border-radius: var(--radius-md);
    padding-left: 1.2rem;
    height: 58px;
    transition: all var(--transition-normal);
    font-size: 1rem;
}

.form-control:focus {
    background: rgba(10, 10, 15, 0.8) !important;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
    transform: translateY(-2px);
}

.form-floating label {
    color: var(--text-muted);
    padding-left: 1.2rem;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 30px rgba(129, 140, 248, 0.4),
        0 0 20px rgba(129, 140, 248, 0.2);
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
}

.alert {
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: rgba(244, 114, 182, 0.12);
    border: 1px solid rgba(244, 114, 182, 0.2);
    color: #f9a8d4;
    backdrop-filter: blur(10px);
    animation: fadeIn var(--transition-normal);
}

.footer-text {
    text-align: center;
    margin-top: 2.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.footer-text a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform var(--transition-normal);
}

.footer-text a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.footer-text a:hover {
    color: var(--secondary-color);
}

/* Password visibility toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary-color);
}
