@import url('https://fonts.googleapis.com/css?family=Montserrat:400,800');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(315deg, #352460e8 3%, #352460 38%, #352460ea 68%, #352460 98%);
    animation: gradient 120s ease infinite;
    background-size: 400% 400%;
    background-attachment: fixed;
    display: grid;
    place-items: center;
    min-height: 100vh;
    overflow: hidden;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    20% { background-position: 50% 100%; }
    40% { background-position: 100% 50%; }
    60% { background-position: 50% 0%; }
    80% { background-position: 0% 50%; }
    100% { background-position: 50% 50%; }
}

.wave {
    background: rgba(255, 255, 255, 0.171);
    border-radius: 1000% 1000% 0 0;
    position: fixed;
    width: 200%;
    height: 12em;
    animation: wave 10s -3s linear infinite;
    transform: translate3d(0, 0, 0);
    opacity: 0.8;
    bottom: 0;
    left: 0;
    z-index: -1;
}

.wave:nth-of-type(2) {
    bottom: -1.25em;
    animation: wave 18s linear reverse infinite;
    opacity: 0.8;
}

.wave:nth-of-type(3) {
    bottom: -2.5em;
    animation: wave 20s -1s reverse infinite;
    opacity: 0.9;
}

@keyframes wave {
    2% { transform: translateX(1); }
    25% { transform: translateX(-25%); }
    50% { transform: translateX(-50%); }
    75% { transform: translateX(-25%); }
    100% { transform: translateX(1); }
}

h1 {
    font-weight: bold;
    margin: 0;
    color: white;
}

small {
    color: white;
}

h2 {
    text-align: center;
}

p {
    font-size: 14px;
    font-weight: 100;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
}

span {
    font-size: 12px;
}

button {
    border-radius: 10px;
    border: 1px solid #fbbc001e;
    background-color: #FBBD00;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: bold;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

button.ingresar {
    background-color: #FBBD00;
    color: #352460;
    min-width: 280px;
}

button:hover {
    background-color: #FFDD33;
    color: #352460;
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: scale(0.95);
}

button:focus {
    outline: none;
}

button.ghost {
    background-color: transparent;
    border-color: #FFFFFF;
}

button:disabled {
    background-color: grey;
}

.Microsoft {
    margin-top: 10px;
    background-color: white !important;
    color: black !important;
    min-width: 280px;
}

.Microsoft:hover {
    color: #6243af !important;
}

.forregistro {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
    gap: 1.2rem;
}

.container {
    max-width: 450px;
    min-height: 400px;
    width: 90%;
    background-color: rgba(53, 36, 96, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
      position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
    transition: all 0.6s ease-in-out;
}



/* --- ESTILOS DE INPUT CORREGIDOS Y UNIFICADOS --- */
.inputGroup {
    font-family: 'Segoe UI', sans-serif;
    position: relative;
    width: 100%;
    max-width: 350px;
}

.inputGroup input {
    color: white;
    font-size: 1rem;
    text-align: left;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    outline: none;
    background-color: transparent;
    border-radius: 10px;
    width: 100%;
    height: 50px;
    transition: all 0.3s ease;
}

.inputGroup input:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.inputGroup input:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #FBBD00;
    box-shadow: 0 0 8px rgba(251, 189, 0, 0.5);
}

.inputGroup label {
    font-size: 1rem;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
    padding: 0 5px;
}

/* Animación de la etiqueta al enfocar o escribir */
.inputGroup input:focus ~ label,
.inputGroup input:valid ~ label {
    top: 0;
    left: 10px;
    transform: translateY(-50%) scale(0.85);
    background-color: #3e2a75; /* Fondo para que no se mezcle con el borde */
    color: #FBBD00;
    font-weight: bold;
    border-radius: 4px;
}

/* Estilos para el select (si lo usas) */
.inputselc {
    color: white;
    text-align: center;
    font-size: 100%;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    width: 350px;
    height: 30px;
    padding-left: 15px;
    cursor: pointer;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease-in-out;
}

.inputselc:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.inputselc:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #FBBD00;
    box-shadow: 0 0 10px rgba(251, 189, 0, 0.7);
}


/* --- SE MANTIENEN LOS ESTILOS RESTANTES SIN CAMBIOS --- */

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

@keyframes show {
    0%, 49.99% { opacity: 0; z-index: 1; }
    50%, 100% { opacity: 1; z-index: 5; }
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    background: #FF416C;
    background: -webkit-linear-gradient(to right, #FBBD00, #FF4B2B);
    background: linear-gradient(to right, #fbbc00af, #FBBD00);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 0;
    color: #FFFFFF;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.container.right-panel-active .overlay {
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-left {
    transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

.dialoginv {
    border-radius: 10px;
    width: 450px;
    background-color: rgba(255, 255, 255, 0.932);
    border: 2px #352460 solid;
}

.bounce-in-top {
    animation: bounce-in-top 1.1s both
}

@keyframes bounce-in-top {
    0% {
        -webkit-transform: scale(2);
        transform: scale(2);
        -webkit-filter: blur(4px);
        filter: blur(4px);
        opacity: 0;
    }
    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-filter: blur(0px);
        filter: blur(0px);
        opacity: 1;
    }
}

@keyframes puff-in-center {
    0% {
        -webkit-transform: scale(2);
        transform: scale(2);
        -webkit-filter: blur(4px);
        filter: blur(4px);
        opacity: 0;
    }
    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-filter: blur(0px);
        filter: blur(0px);
        opacity: 1;
    }
}

.checkboxGroup {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 10px 0;
    padding: 6px 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.checkboxGroup:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.checkboxGroup input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #FBBD00;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkboxGroup input[type="checkbox"]:checked {
    background-color: #FBBD00;
    border-color: #FBBD00;
}

.checkboxGroup input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: #352460;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkboxGroup input[type="checkbox"]:hover {
    border-color: #FFDD33;
    box-shadow: 0 0 5px rgba(251, 189, 0, 0.5);
}

.checkboxGroup span {
    color: white;
    font-size: 12px;
    letter-spacing: 0.3px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    .dialogrec {
        width: 90%;
        max-width: 350px;
        padding: 20px;
    }

    .dialogrec h5 {
        font-size: 18px;
    }

    .dialogrec small {
        font-size: 12px;
    }

    .dialogrec .form-control {
        height: 38px;
        font-size: 13px;
    }

    .dialogrec button {
        min-width: 90px;
        height: 36px;
        font-size: 12px;
    }

    .container {
        width: 95%;
        min-height: 400px;
        margin: 20px auto;
        border-radius: 20px;
        overflow: hidden;
        background-color: #352460;
    }

    .form-container {
        width: 100%;
        transition: all 0.4s ease-in-out;
        padding: 0 15px;
        border-radius: 20px;
    }

    .sign-in-container,
    .sign-up-container {
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        border-radius: 20px;
    }

    .sign-up-container {
        transform: translateX(100%);
        opacity: 0;
    }

    .overlay-container,
    .overlay,
    .overlay-panel {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    .container.right-panel-active .sign-in-container {
        transform: translateX(-100%);
        opacity: 0;
    }

    .container.right-panel-active .sign-up-container {
        transform: translateX(0);
        opacity: 1;
        z-index: 5;
    }

    .container:not(.right-panel-active) .sign-in-container {
        transform: translateX(0);
        opacity: 1;
    }

    .container:not(.right-panel-active) .sign-up-container {
        transform: translateX(100%);
        opacity: 0;
    }

    .forregistro .inputGroup input,
    .forregistro .inputselc,
    .forregistro .inputGroup input[type="email"],
    .forregistro .inputGroup input[type="password"],
    .forregistro .inputGroup input[type="text"] {
        width: 100% !important;
        height: 40px !important;
        font-size: 15px !important;
        max-width: none !important;
        border-radius: 10px !important;
        letter-spacing: 0.3px;
    }

    .forregistro .inputGroup {
        width: 100% !important;
        max-width: none !important;
    }

    .forregistro button,
    .forregistro button.ingresar,
    .forregistro .Microsoft {
        width: 100% !important;
        max-width: none !important;
        border-radius: 10px !important;
        font-size: 14px !important;
        letter-spacing: 0.5px;
        font-weight: 500;
        text-align: center;
    }

    .forregistro .inputGroup label {
        font-size: 15px !important;
        letter-spacing: 0.3px;
    }

    p {
        font-size: 14px;
        margin: 15px 0;
        letter-spacing: 0.3px;
        line-height: 1.5;
    }

    small {
        font-size: 13px;
        letter-spacing: 0.3px;
    }

    h1 {
        font-size: 24px;
        letter-spacing: 0.5px;
        font-weight: 700;
    }

    .checkboxGroup span {
        font-size: 13px;
        letter-spacing: 0.3px;
    }

    .Microsoft {
    font-size: 13px !important; /* más grande para que no se corte */
    letter-spacing: 0.3px;
    white-space: nowrap; /* evita que se divida en dos líneas */
    display: flex; /* alinear con el logo */
    align-items: center;
    justify-content: center;
    gap: 8px; /* espacio entre el logo y el texto */
}

    .Microsoft img {
        height: 18px;
    }

    #signUpLink {
        display: block;
        text-align: center;
        margin-top: 15px;
        color: white;
        text-decoration: none;
        font-size: 13px;
        letter-spacing: 0.3px;
    }

    #signUpLink:hover {
        text-decoration: underline;
    }

    #backToLogin {
        display: block !important;
        text-align: center;
        text-decoration: none;
        margin-top: 15px;
        font-size: 13px;
        letter-spacing: 0.3px;
    }

    #backToLogin:hover {
        text-decoration: underline;
    }

    #backToLogin i {
        margin-right: 5px;
    }

    .dialogrec,
    .dialoginv {
        width: 90%;
        max-width: 350px;
        border-radius: 20px;
    }

    .checkboxGroup {
        margin: 8px 0;
        padding: 5px 8px;
    }

    .checkboxGroup input[type="checkbox"] {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }

    .checkboxGroup input[type="checkbox"]:checked::after {
        font-size: 10px;
    }

    .checkboxGroup span {
        font-size: 11px;
    }
}