* {
    font-family: "Roboto Condensed", sans-serif;
    box-sizing: border-box;
}

body {
    margin: 0;
}

/* =====================
   BACKGROUND FADE
===================== */
.container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #d61720, #a81c1c);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.container.enter {
    opacity: 1;
}

/* =====================
   LOGIN CARD
===================== */
.login-container {
    width: 900px;
    background: white;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.25);

    transform: translateX(-80px);
    opacity: 0;
    transition:
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.6s ease;
}

.login-container.enter {
    transform: translateX(0);
    opacity: 1;
}

/* EXIT ANIMATION */
.login-container.exit {
    transform: translateX(80px);
    opacity: 0;
}

/* ERROR SHAKE */
.login-container.shake {
    animation: shake 0.4s ease;
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    50% {
        transform: translateX(8px);
    }

    75% {
        transform: translateX(-4px);
    }

    100% {
        transform: translateX(0);
    }
}

.login-left {
    width: 50%;
    padding: 50px;
}

.login-left h4 {
    color: #d61720;
    text-align: center;
    margin-bottom: -10px;
}

.login-left h1 {
    color: #d61720;
    text-align: center;
    margin-bottom: 25px;
    font-size: 32px;
}

input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    transition:
        border 0.3s,
        box-shadow 0.3s;
}

input:focus {
    border-color: #d61720;
    box-shadow: 0 0 6px rgba(214, 23, 32, 0.3);
    outline: none;
}

/* =====================
   BUTTON LOADING STATE
===================== */
button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #d61720;
    color: white;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition:
        all 0.3s ease,
        box-shadow 0.3s ease;
}

/* Hover effect */
button:hover:not(.loading) {
    background: white;
    color: #d61720;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

/* Loading state */
button.loading {
    pointer-events: none;
    opacity: 0.8;
}

button.loading span {
    visibility: hidden;
}

button.loading::after {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg) translate(-50%, -50%);
    }
}

.login-right {
    width: 50%;
    background: url("/assets/img/hermes.jpg") center/cover no-repeat;
    position: relative;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-right::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.login-right p {
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px black;
}

#locationWarning {
    color: red;
    margin-bottom: 10px;
}

/* =====================
   MOBILE TUNING
===================== */
@media (max-width: 768px) {
    .login-container {
        width: 95%;
        transform: translateY(20px);
        transition:
            transform 0.4s ease,
            opacity 0.4s ease;
    }

    .login-container.enter {
        transform: translateY(0);
    }

    .login-right {
        display: none;
    }

    .login-left {
        width: 100%;
        padding: 30px 20px;
    }
}
