﻿/* === Base background with radial gradient === */
.login-background {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #555 0%, #222 70%, #111 100%);
    transition: background 1s ease;
    overflow: hidden;
}

    /* === Overlay layer for smoother pulses === */
    .login-background::after {
        content: "";
        position: absolute;
        inset: 0;
        background: transparent;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease-in-out;
    }

    /* ======== RED PULSE (softer tone) ======== */
    .login-background.red-pulse {
        animation: redPulse 1.2s forwards ease-in-out;
    }

@keyframes redPulse {
    0% {
        background: radial-gradient(circle, #552020 0%, #2b0f0f 70%, #100 100%);
    }

    70% {
        background: radial-gradient(circle, #774040 0%, #3a1a1a 70%, #200 100%);
    }

    100% {
        background: radial-gradient(circle, #555 0%, #222 70%, #111 100%);
    }
}

/* Overlay glow for red pulse */
.login-background.red-pulse::after {
    background: rgba(128, 40, 40, 0.2);
    animation: overlayFade 1.2s ease-in-out forwards;
}

/* ======== GREEN PULSE (softer tone) ======== */
.login-background.green-pulse {
    animation: greenPulse 1.2s forwards ease-in-out;
}

@keyframes greenPulse {
    0% {
        background: radial-gradient(circle, #1d4420 0%, #0f220f 70%, #000 100%);
    }

    70% {
        background: radial-gradient(circle, #2f6633 0%, #153315 70%, #000 100%);
    }

    100% {
        background: radial-gradient(circle, #555 0%, #222 70%, #111 100%);
    }
}

/* Overlay glow for green pulse */
.login-background.green-pulse::after {
    background: rgba(40, 128, 40, 0.18);
    animation: overlayFade 1.2s ease-in-out forwards;
}

/* === Shared overlay fade animation === */
@keyframes overlayFade {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 0;
    }
}

/* === Box dimming / brightening === */
.login-background.red-pulse .login-container {
    animation: boxDim 1.2s ease-in-out forwards;
}

.login-background.green-pulse .login-container {
    animation: boxBrighten 1.2s ease-in-out forwards;
}

@keyframes boxDim {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(0.9);
    }

    100% {
        filter: brightness(1);
    }
}

@keyframes boxBrighten {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.07);
    }

    100% {
        filter: brightness(1);
    }
}

/* === Centered login box === */
.login-container {
    position: relative;
    z-index: 2; /* stays above overlay */
    background-color: rgba(255, 255, 255, 0.08);
    border: 5px solid black;
    border-radius: 8px;
    padding: 40px 60px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
    text-align: center;
    color: white;
    backdrop-filter: blur(3px);
    overflow: hidden;
}

    /* === Login box contents === */
    .login-container h2 {
        margin-bottom: 20px;
        font-weight: 500;
    }

    /* Image inside the rectangle */
    .login-container::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url('/fwImages/logo.jpg');
                background-size: cover;
/*        background-size: 350px 350px;*/
        background-repeat: no-repeat;
        background-position: center;
        opacity: 0.08; /* very subtle */
        pointer-events: none; /* allow clicking inputs */
        z-index: 0; /* behind text and inputs */
    }


    .login-container input {
        display: block;
        width: 220px;
        margin: 10px auto;
        padding: 10px;
        border: none;
        border-radius: 4px;
    }

    .login-container button {
        margin-top: 15px;
        padding: 10px 40px;
        border: none;
        border-radius: 4px;
        background-color: #444;
        color: white;
        cursor: pointer;
        transition: background-color 0.2s;
    }

        .login-container button:hover {
            background-color: #666;
        }

.error {
    color: #ff6060;
    margin-top: 10px;
}
