﻿/* Background Patterns and Container */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/fuel-hero@480.webp');
    background-size: cover, 400% 400%;
    background-position: center, 0% 50%;
    background-blend-mode: overlay;
    animation: gradientFlow 160s ease infinite;
    overflow: hidden;
    z-index: 0;
}

    .animated-background::before {
        content: '';
        position: absolute;
        width: 550px;
        height: 550px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-image: url("data:image/svg+xml,%3Csvg id='Layer_2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 644.3 716.4'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:rgba(21,101,192,0.2);%7D.cls-2%7Bfill:rgba(255,255,255,0.4);%7D%3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2'%3E%3Cpath class='cls-1' d='m619,328.85c0,163-118.3,315.7-280,360.3-11,3-23,3-34,0C143.3,644.45,25,491.85,25,328.85v-146.4c0-27.3,20.7-58.3,46.3-68.7l185.7-76c41.7-17,88.7-17,130.3,0l185.7,76c25.3,10.3,46.3,41.3,46.3,68.7l-.3,146.4Z'/%3E%3C/g%3E%3Cg id='Layer_2-2'%3E%3Cpath class='cls-2' d='m488.4,230.95l-28.8-28.8-26.3-26.3c-7.3-7.3-19.2-7.3-26.5,0s-7.3,19.2,0,26.5l18.7,18.7-15.5,46.5c-6.7,20.1-1.4,42.3,13.6,57.3l55.1,56v87.4c0,10.3-8.4,18.7-18.7,18.7s-18.7-8.4-18.7-18.7v-37.3c0-30.9-25.1-56-56-56h-19v-168c0-30.9-25.1-56-56-56h-112c-30.9,0-56,25.1-56,56v261.3c0,30.9,25.1,56,56,56h112c30.9,0,56-25.1,56-56v-56h18.7c10.3,0,18.7,8.4,18.7,18.7v37.3c0,30.9,25.1,56,56,56s56-25.1,56-56v-171.2c0-24.8-9.8-48.6-27.3-66.1h0Zm-159.5,237.2c0,10.3-8.4,18.7-18.7,18.7h-112c-10.3,0-18.7-8.4-18.7-18.7v-130.6h149.3l.1,130.6h0Zm0-168h-149.3v-93.3c0-10.3,8.4-18.7,18.7-18.7h112c10.3,0,18.7,8.4,18.7,18.7l-.1,93.3h0Zm149.4,26.5l-28.8-28.8c-4.8-4.9-6.5-12.1-4.5-18.7l9.5-28.8,7.3,7.5c10.4,10.4,16.3,24.4,16.4,39l.1,29.8h0Z'/%3E%3C/g%3E%3C/svg%3E");
        background-size: 100% 100%;
        background-position: center;
        background-repeat: no-repeat;
        animation: shieldPulse 16s ease-in-out infinite;
        opacity: 0.5;
        z-index: 1;
    }

    .animated-background::after {
        content: '';
        position: absolute;
        width: 200%;
        height: 200%;
        top: -50%;
        left: -50%;
        background: radial-gradient( circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 50% );
        animation: circleFloat 25s ease-in-out infinite;
        opacity: 0.3;
        z-index: 1;
    }

/* Login Container and Card */
.login-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    z-index: 2;
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
    text-align: center;
    animation: cardAppear 0.6s ease-out;
    position: relative;
    z-index: 3;
}

/* Logo Styles */
.logo {
    width: 300px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
    animation: float 6s ease-in-out infinite;
}

    .logo:hover {
        transform: scale(1.02);
    }

.fallback-text {
    display: none;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #fff;
    animation: fadeIn 0.6s ease-out;
}

/* Login Text and Button */
.login-prompt {
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    animation: slideUp 0.6s ease-out;
    animation-delay: 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.login-btn {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #3C6EFB;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    animation: slideUp 0.6s ease-out, buttonPulse 3s ease-in-out infinite 2s;
    animation-delay: 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(60, 110, 251, 0.2);
}

    .login-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        transition: left 0.6s ease;
    }

    .login-btn:hover {
        background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.9));
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 8px 25px rgba(60, 110, 251, 0.3);
        color: #2d5ae0;
    }

        .login-btn:hover::before {
            left: 100%;
        }

    .login-btn:active {
        transform: translateY(-1px) scale(0.98);
        transition: all 0.1s ease;
    }

    .login-btn:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(60, 110, 251, 0.3);
    }

    .login-btn.loading .button-text {
        opacity: 0.8;
    }

    .login-btn.loading .loading-spinner {
        display: inline-block !important;
        animation: spin 1s linear infinite;
    }

.loading-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(60, 110, 251, 0.3);
    border-top: 2px solid #3C6EFB;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Microsoft Icon */
.microsoft-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 23 23'%3E%3Cpath fill='%233C6EFB' d='M0 0h11v11H0zM12 0h11v11H12zM0 12h11v11H0zM12 12h11v11H12z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Animations */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes shieldPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.6;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
}

@keyframes circleFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-10%, -10%) scale(1.1);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
        backdrop-filter: blur(0px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        backdrop-filter: blur(12px);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(60, 110, 251, 0.2);
    }

    50% {
        box-shadow: 0 4px 20px rgba(60, 110, 251, 0.4);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding: 0.5rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .logo {
        width: 250px;
    }

    .login-btn {
        padding: 0.8rem 1.5rem;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (min-width: 481px) {
    .animated-background {
        background-image: url('../images/fuel-hero@1024.webp')
    }
}

@media (min-width: 1025px) {
    .animated-background {
        background-image: url('../images/fuel-hero@1920.webp')
    }
}
