@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Raleway', sans-serif;
}

body {
    background-image: url('../img/login_fondo.gif');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow-x: hidden;
}

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.8s ease-in-out;
}

.screen {
    border-radius: 15px;
    background: linear-gradient(90deg, #7F00A5, #2d2a7b);
    position: relative;
    height: 600px;
    width: 360px;
    box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.screen:hover {
    transform: perspective(1000px) translateY(-5px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}
.screen__content {
    z-index: 1;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.screen__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
}

.screen__background__shape {
    transform: rotate(45deg);
    position: absolute;
    opacity: 0.5;
    transition: all 0.6s ease;
}

.screen__background__shape1 {
    height: 560px;
    width: 560px;
    background: #FFF;
    top: -50px;
    right: 120px;
    border-radius: 72px;
    animation: float 6s ease-in-out infinite;
}

.screen__background__shape2 {
    height: 220px;
    width: 220px;
    background: #5D54A4;
    top: -172px;
    right: 0;
    border-radius: 32px;
    animation: float 4s ease-in-out infinite;
    animation-delay: 0.5s;
}

.screen__background__shape3 {
    height: 540px;
    width: 190px;
    background: linear-gradient(270deg, #5D54A4, #6A679E);
    top: -24px;
    right: 0;
    border-radius: 32px;
    animation: float 5s ease-in-out infinite;
    animation-delay: 1s;
}

.screen__background__shape4 {
    height: 450px;
    width: 200px;
    background: #5D54A4;
    top: 398px;
    right: 50px;
    border-radius: 60px;
    animation: float 7s ease-in-out infinite;
    animation-delay: 1.5s;
}

.login {
    width: 100%;
    padding: 40px;
    padding-top: 60px;
}

.login__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    animation: bounceIn 1s ease;
}

.login__logo img {
    width: 140px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.login__logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

.login__field {
    padding: 20px 0;
    position: relative;
    margin-bottom: 15px;
}

.login__icon {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: #ffffff;
    transition: all 0.3s ease;
    z-index: 2;
}

.login__input {
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    background: none;
    padding: 15px 15px 15px 40px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    color: white;
    font-size: 16px;
    border-radius: 0;
    position: relative;
    z-index: 1;
}

/* Estilo para cuando el navegador autocompleta */
.login__input:-webkit-autofill,
.login__input:-webkit-autofill:hover, 
.login__input:-webkit-autofill:focus {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0px 1000px transparent inset;
    transition: background-color 5000s ease-in-out 0s;
    border-bottom-color: #6A679E;
}

.login__input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.login__input:focus {
    outline: none;
    border-bottom-color: #9E7BB5;
    box-shadow: 0 5px 15px -10px rgba(158, 123, 181, 0.5);
}

.login__input:focus + .login__icon {
    color: #9E7BB5;
    transform: translateY(-50%) scale(1.1);
}

.login__input:not(:placeholder-shown) + .login__icon {
    color: #9E7BB5;
}

.button.login__submit {
    background: linear-gradient(45deg, #9E7BB5, #7F00A5);
    text-align: center;
    font-size: 16px;
    margin-top: 40px;
    padding: 18px;
    border-radius: 30px;
    border: none;
    text-transform: uppercase;
    font-weight: 700;
    width: 100%;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}


.button.login__submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #7F00A5, #9E7BB5);
}

.button.login__submit:active {
    transform: translateY(1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.button.login__submit::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.button.login__submit:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}
.button__icon {
    font-size: 20px;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.button.login__submit:hover .button__icon {
    transform: translateX(5px);
}
#togglePassword {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    z-index: 2;
    cursor: pointer;
}

#togglePassword:hover {
    color: #9E7BB5;
    transform: translateY(-50%) scale(1.1);
}

#caps-warning {
    position: fixed;
    bottom: -20px;
    left: 40px;
    color: #ffcc00 !important;
    font-size: 12px !important;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 8px;
    border-radius: 4px;
    animation: shake 0.5s ease-in-out;
}

.wave-bar {
    position: relative;
    display: block;
    width: 100%;
}

.wave-bar:before, .wave-bar:after {
    content: '';
    height: 2px;
    width: 0;
    bottom: 0;
    position: absolute;
    background: #6A679E;
    transition: all 0.3s ease;
}

.wave-bar:before {
    left: 50%;
}

.wave-bar:after {
    right: 50%;
}

.login__input:focus ~ .wave-bar:before,
.login__input:focus ~ .wave-bar:after {
    width: 50%;
}


.toast-caps {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ffcc00;
    color: #000;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    font-weight: bold;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: rotate(45deg) translateY(0px); }
    50% { transform: rotate(45deg) translateY(-20px); }
    100% { transform: rotate(45deg) translateY(0px); }
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    20% {
        transform: scale(25, 25);
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}