 :root {
     --primary: #4a6fff;
     --primary-dark: #3451b2;
     --secondary: #6c63ff;
     --accent: #ff6b6b;
     --light: #f8f9fa;
     --dark: #212529;
     --gray: #6c757d;
     --light-gray: #e9ecef;
     --success: #28a745;
     --border-radius: 12px;
     --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
     --transition: all 0.3s ease;
 }

 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
 }

 body {
     min-height: 100vh;
     background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
     display: flex;
     flex-direction: column;
     animation: bgAnimation 20s infinite alternate;
 }

 @keyframes bgAnimation {
     0% {
         background-position: 0% 50%;
     }

     100% {
         background-position: 100% 50%;
     }
 }

 /* Fondo animado */
 #background {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     z-index: -1;
     overflow: hidden;
 }

 .bubble {
     position: absolute;
     border-radius: 50%;
     background: rgba(106, 90, 255, 0.05);
     animation: float 15s infinite linear;
     bottom: -100px;
 }

 .bubble:nth-child(1) {
     width: 80px;
     height: 80px;
     left: 5%;
     animation-duration: 20s;
 }

 .bubble:nth-child(2) {
     width: 120px;
     height: 120px;
     left: 15%;
     animation-duration: 16s;
     animation-delay: -2s;
 }

 .bubble:nth-child(3) {
     width: 60px;
     height: 60px;
     left: 30%;
     animation-duration: 22s;
     animation-delay: -4s;
 }

 .bubble:nth-child(4) {
     width: 100px;
     height: 100px;
     left: 45%;
     animation-duration: 18s;
     animation-delay: -1s;
 }

 .bubble:nth-child(5) {
     width: 70px;
     height: 70px;
     left: 60%;
     animation-duration: 24s;
     animation-delay: -3s;
 }

 .bubble:nth-child(6) {
     width: 90px;
     height: 90px;
     left: 75%;
     animation-duration: 19s;
     animation-delay: -5s;
 }

 .bubble:nth-child(7) {
     width: 110px;
     height: 110px;
     left: 90%;
     animation-duration: 17s;
     animation-delay: -7s;
 }

 @keyframes float {
     0% {
         transform: translateY(0) rotate(0deg);
         opacity: 1;
         bottom: -100px;
     }

     100% {
         transform: translateY(-1000px) rotate(720deg);
         opacity: 0;
         bottom: 100%;
     }
 }

 /* Contenido principal */
 main {
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     flex-grow: 1;
     padding: 2rem;
 }

 .login-container {
     width: 100%;
     max-width: 420px;
     z-index: 1;
 }

 .login-box {
     background: rgba(255, 255, 255, 0.95);
     -webkit-backdrop-filter: blur(10px);
     backdrop-filter: blur(10px);
     -o-border-radius: var(--border-);
     box-shadow: var(--box-shadow);
     padding: 2.5rem;
     text-align: center;
     transform: translateY(20px);
     opacity: 0;
     animation: fadeInUp 0.8s forwards 0.3s;
     transition: var(--transition);
     border: 1px solid rgba(0, 0, 0, 0.05);
     -webkit-border-radius: var(--border-);
     -moz-border-radius: var(--border-);
     -ms-border-radius: var(--border-);
     border-radius: var(--border-radius);
}

 .login-box:hover {
     box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
 }

 @keyframes fadeInUp {
     to {
         opacity: 1;
         transform: translateY(0);
     }
 }

 .logo-container {
     margin-bottom: 1.5rem;
     animation: pulse 2s infinite;
 }

 @keyframes pulse {
     0% {
         transform: scale(1);
     }

     50% {
         transform: scale(1.03);
     }

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

 .logo {
     max-width: 180px;
     height: auto;
     transition: var(--transition);
 }

 .logo:hover {
     transform: rotate(-5deg);
 }

 h1 {
     color: var(--primary);
     font-size: 1.8rem;
     font-weight: 700;
     margin-bottom: 0.5rem;
 }

 .subtitle {
     color: var(--gray);
     font-size: 1rem;
     margin-bottom: 1.8rem;
     position: relative;
     display: inline-block;
 }

 .subtitle::after {
     content: '';
     position: absolute;
     bottom: -8px;
     left: 50%;
     transform: translateX(-50%);
     width: 50px;
     height: 3px;
     background: linear-gradient(to right, var(--primary), var(--secondary));
     border-radius: 10px;
 }

 .form-group {
     margin-bottom: 1.5rem;
     position: relative;
     text-align: left;
 }

 label {
     display: block;
     margin-bottom: 0.5rem;
     font-weight: 600;
     color: var(--dark);
     font-size: 0.9rem;
 }

 .input-container {
     position: relative;
 }

 .input-icon {
     position: absolute;
     left: 15px;
     top: 50%;
     transform: translateY(-50%);
     color: var(--primary);
 }

 input {
     width: 100%;
     padding: 0.9rem 1rem 0.9rem 3rem;
     border: 2px solid var(--light-gray);
     border-radius: var(--border-radius);
     font-size: 1rem;
     transition: var(--transition);
     background-color: #fff;
 }

 input:focus {
     outline: none;
     border-color: var(--primary);
     box-shadow: 0 0 0 3px rgba(74, 111, 255, 0.2);
 }

 input:focus+.input-icon {
     color: var(--primary-dark);
     animation: shake 0.5s;
 }

 @keyframes shake {

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

     25% {
         transform: translateY(-50%) translateX(-3px);
     }

     75% {
         transform: translateY(-50%) translateX(3px);
     }
 }

 .password-container {
     position: relative;
 }

 .toggle-password {
     position: absolute;
     right: 15px;
     top: 50%;
     transform: translateY(-50%);
     background: none;
     border: none;
     color: var(--gray);
     cursor: pointer;
     transition: var(--transition);
 }

 .toggle-password:hover {
     color: var(--primary);
 }

 .btn-login {
     width: 100%;
     padding: 0.9rem;
     background: linear-gradient(135deg, var(--primary), var(--secondary));
     color: white;
     border: none;
     border-radius: var(--border-radius);
     font-size: 1.1rem;
     font-weight: 600;
     cursor: pointer;
     transition: var(--transition);
     position: relative;
     overflow: hidden;
     box-shadow: 0 4px 15px rgba(106, 90, 255, 0.3);
 }

 .btn-login:hover {
     transform: translateY(-3px);
     box-shadow: 0 7px 20px rgba(106, 90, 255, 0.4);
 }

 .btn-login:active {
     transform: translateY(0);
 }

 .btn-login::after {
     content: '';
     position: absolute;
     top: -50%;
     left: -60%;
     width: 20px;
     height: 200%;
     background: rgba(255, 255, 255, 0.3);
     transform: rotate(25deg);
     transition: all 0.5s;
 }

 .btn-login:hover::after {
     left: 120%;
 }

 .forgot-password {
     display: block;
     margin-top: 1.5rem;
     color: var(--primary);
     text-decoration: none;
     font-weight: 500;
     transition: var(--transition);
     position: relative;
     display: inline-block;
 }

 .forgot-password::after {
     content: '';
     position: absolute;
     width: 0;
     height: 2px;
     bottom: -2px;
     left: 0;
     background-color: var(--primary);
     transition: var(--transition);
 }

 .forgot-password:hover::after {
     width: 100%;
 }

 .forgot-password:hover {
     color: var(--primary-dark);
 }

 /* Footer */
 footer {
     background: linear-gradient(135deg, var(--primary), var(--primary-dark));
     color: white;
     text-align: center;
     padding: 1.2rem;
     margin-top: auto;
 }

 footer p {
     margin-bottom: 0.2rem;
     font-weight: 500;
 }

 footer small {
     opacity: 0.8;
     font-size: 0.85rem;
 }

 /* Responsive */
 @media (max-width: 576px) {
     .login-box {
         padding: 1.8rem;
     }

     h1 {
         font-size: 1.6rem;
     }

     .logo {
         max-width: 150px;
     }
 }

 /* Animaciones adicionales */
 .animate-input {
     animation: inputFocus 0.5s ease;
 }

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

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

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

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

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