@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&display=swap');

:root {
    --brand-bg: #6e132d;
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--brand-bg);
    overflow-x: hidden;
}

#container {
    background-color: var(--brand-bg);
    position: fixed;
    height: 100vh;
    width: 100%;
    margin: 0px auto;
    padding: 0px auto;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#container-inside {
    position: relative;
    min-width: 960px;
    max-width: 1280px;
    height: auto;
    min-height: 100%;
    margin: 0px auto;
    padding: 0px auto;
    overflow: visible;
}

.circle {
    position: absolute;
    background: #fff;
    border-radius: 50%;
}

#circle-small {
    -webkit-animation: circle-small-scale 3s ease-in-out infinite alternate;
    animation: circle-small-scale 3s ease-in-out infinite alternate;
    animation-timing-function: cubic-bezier(.6, 0, .4, 1);
    animation-delay: 0s;
    position: absolute;
    top: 200px;
    left: -150px;
    background: #c41144;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    opacity: 0.6;
}

#circle-medium {
    -webkit-animation: circle-small-scale 3s ease-in-out infinite alternate;
    animation: circle-small-scale 3s ease-in-out infinite alternate;
    animation-timing-function: cubic-bezier(.6, 0, .4, 1);
    animation-delay: 0.3s;
    position: absolute;
    top: 50px;
    left: -300px;
    background: #c41144;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    opacity: 0.4;
}

#circle-large {
    -webkit-animation: circle-small-scale 3s ease-in-out infinite alternate;
    animation: circle-small-scale 3s ease-in-out infinite alternate;
    animation-timing-function: cubic-bezier(.6, 0, .4, 1);
    animation-delay: 0.6s;
    position: absolute;
    top: -100px;
    left: -450px;
    background: #c41144;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    opacity: 0.2;
}

#circle-xlarge {
    -webkit-animation: circle-small-scale 3s ease-in-out infinite alternate;
    animation: circle-small-scale 3s ease-in-out infinite alternate;
    animation-timing-function: cubic-bezier(.6, 0, .4, 1);
    animation-delay: 0.9s;
    position: absolute;
    top: -250px;
    left: -600px;
    background: #c41144;
    width: 1200px;
    height: 1200px;
    border-radius: 50%;
    opacity: 0.2;
}

#circle-xxlarge {
    -webkit-animation: circle-small-scale 3s ease-in-out infinite alternate;
    animation: circle-small-scale 3s ease-in-out infinite alternate;
    animation-timing-function: cubic-bezier(.6, 0, .4, 1);
    animation-delay: 1.2s;
    position: absolute;
    top: -400px;
    left: -750px;
    background: #c41144;
    width: 1500px;
    height: 1500px;
    border-radius: 50%;
    opacity: 0.09;
}

@-webkit-keyframes circle-small-scale {
    0% {
        -webkit-transform: scale(1.0);
    }

    100% {
        -webkit-transform: scale(1.1);
    }
}

@keyframes circle-small-scale {
    0% {
        transform: scale(1.0);
    }

    100% {
        transform: scale(1.1);
    }
}

.auth-row-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.auth-row {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Bootstrap `.row` has negative margins; neutralize for our centered auth layout */
.auth-row.row {
    --bs-gutter-x: 0;
    margin-left: 0;
    margin-right: 0;
}

.auth-col-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-card {
    max-width: 460px;
    width: 100%;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.auth-card h1 {
    color: #fff;
    font-weight: 800;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.auth-input {
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.auth-input:focus,
.auth-input.form-control:focus,
.auth-input:focus-visible {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1) !important;
    outline: none !important;
}

.input-group-text {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 12px 0 0 12px !important;
}

.auth-btn-primary {
    background-color: #ffffff;
    color: #b12e53;
    font-weight: 800;
    border-radius: 12px;
    padding: 1rem;
    border: none;
    transition: all 0.2s;
    text-transform: uppercase;
}

.auth-btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.promo-image-frame {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    max-width: 550px;
}

.promo-text {
    color: #fff;
    margin-top: 2rem;
}

@media (max-width: 991px) {
    .auth-row-wrapper {
        padding-left: 0;
        padding-right: 0;
    }

    .container-auth {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .auth-row {
        flex-direction: column;
        align-items: center;
    }

    .auth-col-content {
        margin-bottom: 2rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        width: 90vw !important;
        max-width: none !important;
    }

    .logo-top {
        margin-bottom: 1.5rem !important;
    }

    body,
    html {
        overflow: hidden !important;
        touch-action: none !important;
    }

    /* Mobile: replace animated background with static image */
    body.auth-page #container {
        display: none !important;
    }

    body.auth-page {
        background-color: var(--brand-bg);
        position: relative;
    }

    body.auth-page::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image: url("https://cdn.locogrid.com/assets/images/bg-mobile.png");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        animation: auth-mobile-bg-kenburns 4s ease-in-out infinite alternate;
        z-index: 0;
        pointer-events: none;
        will-change: background-size, background-position;
    }

    @keyframes auth-mobile-bg-kenburns {
        from {
            background-size: 105% 105%;
            background-position: 50% 50%;
        }

        to {
            background-size: 125% 125%;
            background-position: 48% 48%;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        body.auth-page::before {
            animation: none !important;
            background-size: cover !important;
            background-position: center !important;
        }
    }
}

.otp-input {
    width: 60px;
    height: 60px;
    font-size: 24px;
    text-align: center;
}

.auth-input.is-invalid {
    border-color: #ff4d4f !important;
    animation: auth-shake 0.4s ease-in-out;
    box-shadow: 0 0 10px rgba(255, 77, 79, 0.4);
}

.invalid-feedback-custom {
    color: #ff4d4f;
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875em;
    text-align: left;
}

@media (max-width: 991px) {
    .auth-bg-lock {
        overflow: hidden !important;
        touch-action: none !important;
    }
}

.auth-card-offset {
    margin-bottom: 8rem;
}

@media (min-width: 992px) {
    .auth-card-offset {
        margin-bottom: 14rem;
    }
}

@keyframes auth-shake {

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

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

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

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