* {
    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%, #000000 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Efecto de fondo animado */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(42, 82, 152, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1a1a1a 100%);
    color: white;
    padding: 40px 30px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.logo-container {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.logo-container img {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.login-header h1 {
    font-size: 26px;
    margin-bottom: 5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.login-header p {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.login-body {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #1e3c72;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #2a5298;
    font-size: 18px;
}

.form-group input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #2a5298;
    background: white;
    box-shadow: 0 0 0 4px rgba(42, 82, 152, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1a1a1a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-login::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;
}

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

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.4);
}

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

.error-message {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    color: #c33;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    border-left: 4px solid #c33;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

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

.error-message::before {
    content: '⚠';
    font-size: 20px;
}

.login-footer {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #666;
    font-size: 12px;
    border-top: 1px solid #e0e6ed;
}

.login-footer strong {
    color: #1e3c72;
    font-weight: 600;
}

/* Selector de idioma en login */
.lang-selector-login {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.lang-selector-login .lang-link {
    text-decoration: none;
    display: inline-block;
    padding: 4px;
    border-radius: 5px;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.lang-selector-login .lang-link .fi {
    font-size: 24px;
    width: 24px;
    height: 24px;
    border-radius: 3px;
}

.lang-selector-login .lang-link:hover {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

.lang-selector-login .lang-link.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        max-width: 100%;
    }

    .login-header {
        padding: 30px 20px 25px;
    }

    .login-body {
        padding: 30px 20px;
    }

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

    .login-header h1 {
        font-size: 22px;
    }
}

/* Animación de entrada */
.login-container {
    animation: fadeInUp 0.5s ease;
}

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