* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body{
    margin:0;
    min-height:100vh;
}

.container1{
    display:grid;
    grid-template-columns: 60% 40%;
    min-height:100vh;
}

.container2 {
    display: none; 
    grid-template-columns: 40% 60%; 
    height: 100dvh;
    overflow: hidden;
}

.container3{
    display: none; 
    grid-template-columns: 40% 60%; 
    height: 100dvh;
    overflow: hidden;
}

.left{
    position:relative;
    overflow:visible;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.9) 100%);
    background-color: #c40000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index:10;
}

.left img{
    position:absolute;
    bottom:0;
    left:50%;
    transform:translateX(-50%);
    width:120%;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
    animation: entradaSuave 1s ease-out forwards;
}

@keyframes entradaSuave {
    from {
        opacity: 0;
        transform: translateX(-90%) translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
@keyframes entradaSuave2 {
    from {
        opacity: 0;
        transform: translateX(40%) translateY(40px); 
    }
    to {
        opacity: 1;
        transform: translateX(-55%) translateY(0); 
    }
}

.logo-img{
    max-width: 60%;
    max-height: 60%;
    margin-left: 80px;
    margin-bottom: 20px;
}

.right{
    display:grid;
    place-items:center;
    position:relative;
    z-index:1;
    background:#e5e5e5;
}
.right2 {
    display: grid; 
    place-items: center; 
    position: relative;
    z-index: 1;
    background-color: #e5e5e5;
}
.left2 {
    position: relative;
    overflow: visible;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.9) 100%);
    background-color: #c40000;
    display: flex;         
    justify-content: center; 
    align-items: flex-end; 
    z-index: 10;
}

.left2 img{
    position:absolute;
    bottom:0;
    left:50%;
    transform:translateX(-50%);
    width:120%;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
    animation: entradaSuave2 1s ease-out forwards;
}

.login-box{
    position:relative;
    z-index:2;

    width:min(85%, 420px);
}

.login-box h1 {
    font-size: 60px;
    color: #9e2b25;
    text-align: center;
    margin-bottom: 40px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #9e2b25;
}

input{
    width:100%;
    height:65px;

    border:none;
    border-radius:22px;

    background:#9e2b25;

    color:white;

    padding:0 20px;

    margin-bottom:25px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 15px;
    border-radius: 15px;
    border: none;
    background-color: #9e2b25;
    margin-bottom: 20px;
    color: white;
}

mark {
    display: block;
    margin-bottom: 10px;
    background: transparent;
    color: red;
}

.boton-login {
    width: 60%;
    margin: 0 auto;
    display: block;
    padding: 15px;
    border-radius: 20px;
    border: none;
    background-color: #9e2b25;
    color: white;
    cursor: pointer;
    margin-bottom: 20px;
}

.crear-cuenta {
    text-align: center;
    color: #9e2b25;
    cursor: pointer;
}

a {
    color: #9e2b25;
    text-decoration: none;
    font-weight: bold;
    display: block;
    margin-bottom: 20px;
}

input::placeholder {
    color: white;
    opacity: 0.7;
    font-style: italic;
}

.hidden-checkbox {
    display: none;
}

label {
    color: #9e2b25;
    text-decoration: none;
    font-weight: bold;
    display: block;
    margin-bottom: 20px;
    cursor: pointer;
}

#crearCuenta:checked~.container1 {
    display: none;
    pointer-events: none;
}

#crearCuenta:checked~.container2 {
    display: grid;
    pointer-events: auto;
}

#crearCuenta:checked~.cars-img2{
    display:block;
}

#contraseñaOlvidada:checked~.container1{
    display: none;
    pointer-events: none;
}

#contraseñaOlvidada:checked~.container3{
    display: grid;
    pointer-events: auto;
}

#contraseñaOlvidada:checked~.cars-img2{
    display:block;
}

.container4{
    display: grid;
    grid-template-columns: 40% 60%; 
    height: 100dvh;
    overflow: hidden;
}

/* =========================
   TABLETS
========================= */
@media screen and (max-width: 1024px) {

    .login-box {
        width: 90%;
    }

    .login-box h1 {
        font-size: 50px;
        color:#e5e5e5;
    }

    .cars-img,
    .cars-img2 {
        width: 220%;
    }

    input[type="text"],
    input[type="password"] {
        padding: 14px;
        font-size: 15px;
    }

    .boton-login {
        width: 75%;
    }
}

/* =========================
   MÓVILES GRANDES
========================= */
@media screen and (max-width: 768px) {

    .container1,
    .container2,
    .container3,
    .container4{
        grid-template-columns:1fr;
    }

    .left,
    .left2{
        position:absolute;
        inset:0;
        z-index:1;
        background:
        linear-gradient(
            to bottom,
            rgba(255,255,255,0.7),
            rgb(0, 0, 0)
        );
    }

    .left img,.left2 img{
        width:100%;
        height:90%;
        object-fit:cover;
        filter:blur(3px);
        z-index: 1;
        animation:none;
    }
    .left, 
    .left2 {
        background: linear-gradient(
            to bottom,
            transparent 20%,
            rgba(0,0,0,0.6)
        );
    }
    .left::after, .left2::after{
        content:"";

        position:absolute;
        inset:0;
        z-index: 2;
        background:
        linear-gradient(
            to bottom,
            rgba(255,255,255,0.7),
            rgba(0,0,0,0.9)
        );
    }

    .right, .right2{
        position:relative;
        z-index:2;
        background:transparent;
    }

    .login-box{
        width:85%;
        max-width:420px;
    }
    a {
        color: #e5e5e5;
        font-size: 15px;
        margin-bottom: 12px;
    }

    input[type="text"],
    input[type="password"] {
        width: 100%;
        height: 68px;
        border-radius: 22px;
        border: none;
        background-color: #e5e5e5;
        color:  #9e2b25;
        padding: 0 20px;
        margin-bottom: 28px;
        font-size: 15px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

    .container2 input[type="text"],
    .container2 input[type="password"] {
        margin-bottom: 10px; 
    }

    input::placeholder {
        color: #9e2b25;
        font-style: normal;
    }

    .boton-login {
        width: 58%;
        height: 52px;
        border-radius: 20px;
        margin-top: 25px;
        background-color: white;
        color: #9e2b25;
        font-size: 18px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    }

    label,
    .crear-cuenta,
    a {
        color:#e5e5e5;
        font-size: 20px;
    }

    mark {
        text-align: center;
        color:#e5e5e5;
        font-size: 20px;
        margin-bottom: 15px;
    }
}
/* =========================
   MÓVILES PEQUEÑOS
========================= */
@media screen and (max-width: 480px) {
    .login-box {
        width: 100%;
        z-index: 4;
    }

    .login-box h1 {
        font-size: 100px;
        margin-bottom: 20px;
    }

    input[type="text"],
    input[type="password"] {
        padding: 12px;
        font-size: 20px;
        margin-bottom: 15px;
    }

    .boton-login {
        padding: 12px;
        border-radius: 15px;
        font-size: 20px;
    }

    label,
    .crear-cuenta,
    a,
    mark {
        font-size: 20px;
    }
}

/* =========================
   MÓVILES MUY PEQUEÑOS
========================= */
@media screen and (max-width: 360px) {

    .login-box h1 {
        font-size: 100px;
    }

    input[type="text"],
    input[type="password"] {
        font-size: 20px;
        padding: 10px;
    }

    .boton-login {
        font-size: 20px;
        padding: 10px;
    }
}
