/* Reset y configuraci�n base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #003366 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Fondo con efecto de part�culas */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Contenedor principal del formulario */
.login-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
    transition: all 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 240px !important;
    height: 240px !important;
    object-fit: contain;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

@keyframes logoGlow {
    0% { box-shadow: none; }
    100% { box-shadow: none; }
}

/* T�tulo */
.login-title {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mensajes de error y �xito */
.message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease-out;
}

.error {
    background: rgba(220, 38, 38, 0.15);
    color: #ef4444;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grupos de campos */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Inputs */
.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.1),
        0 4px 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.form-input:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

/* Bot�n principal */
.login-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 50%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
    margin-bottom: 20px;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-button:hover::before {
    left: 100%;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(30, 64, 175, 0.5);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #3b82f6 100%);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.4);
}

/* Enlace de contrase�a olvidada */
.forgot-password {
    text-align: center;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out 0.3s forwards;
}

.forgot-password a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    position: relative;
}

.forgot-password a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.forgot-password a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        padding: 30px 25px;
        margin: 10px;
        max-width: 350px;
    }
    
    .logo {
        width: 100px;
        height: 100px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .form-input {
        padding: 12px 16px;
    }
    
    .login-button {
        padding: 14px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .login-container {
        padding: 25px 20px;
        border-radius: 16px;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .login-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .form-input {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
    
    .login-button {
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* Efectos adicionales */
.form-group {
    animation: slideInLeft 0.5s ease-out;
}

.form-group:nth-child(even) {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}