* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.login-container {
    min-height: 100vh;
    display: flex;
    position: relative;
}

/* Background Animation */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.bg-animation {
    position: absolute;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(180deg); }
}

/* Content */
.login-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

/* Header */
.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00d4ff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(0, 212, 255, 0.1);
}

.back-link:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateX(-5px);
}

.language-switcher {
    display: flex;
    gap: 5px;
}

.lang-btn {
    color: #aaa;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.lang-btn.active {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.2);
}

.lang-btn:hover:not(.active) {
    color: #ccc;
    background: rgba(255, 255, 255, 0.1);
}

/* Form Container */
.login-form-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.login-brand {
    text-align: center;
    margin-bottom: 40px;
}

.login-brand h1 {
    color: #00d4ff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-brand p {
    color: #ccc;
    font-size: 1rem;
}

.login-form-wrapper h2 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #aaa;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.alert-error {
    background: rgba(255, 99, 99, 0.1);
    border: 1px solid rgba(255, 99, 99, 0.3);
    color: #ff6363;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

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

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #aaa;
    z-index: 2;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 14px 16px 14px 48px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input::placeholder {
    color: #666;
}

.input-wrapper input:focus {
    border-color: #00d4ff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #00d4ff;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
}

.checkmark {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-wrapper input:checked + .checkmark {
    background: #00d4ff;
    border-color: #00d4ff;
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: #00d4ff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #0099cc;
}

/* Login Button */
.login-btn {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 12px;
    padding: 16px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

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

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer p {
    color: #aaa;
    font-size: 0.9rem;
}

.register-link {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.register-link:hover {
    color: #0099cc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-content {
        padding: 20px 15px;
    }

    .login-form-container {
        padding: 30px 25px;
        margin: 20px 0;
    }

    .login-brand h1 {
        font-size: 2rem;
    }

    .login-form-wrapper h2 {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .login-content {
        padding: 15px 10px;
    }

    .login-form-container {
        padding: 25px 20px;
        border-radius: 15px;
    }

    .login-header {
        margin-bottom: 40px;
    }

    .back-link {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .input-wrapper input {
        padding: 12px 14px 12px 44px;
        font-size: 0.95rem;
    }

    .login-btn {
        padding: 14px;
        font-size: 0.95rem;
    }
}

/* Animation for form elements */
.form-group {
    animation: fadeInUp 0.6s ease forwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-options { animation: fadeInUp 0.6s ease 0.3s forwards; }
.login-btn { animation: fadeInUp 0.6s ease 0.4s forwards; }
.login-footer { animation: fadeInUp 0.6s ease 0.5s forwards; }

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

/* Focus states for accessibility */
.login-btn:focus-visible,
.back-link:focus-visible,
.lang-btn:focus-visible,
.register-link:focus-visible,
.forgot-password:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

.input-wrapper input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3);
}


/* Estilo para el logo */
.login-brand {
    text-align: center;
    margin-bottom: 40px;
}

.login-brand img {
    max-width: 200px;  /* Tamaño máximo del logo */
    width: 100%;       /* Asegura que el logo ocupe el 100% del contenedor disponible */
    height: auto;      /* Mantiene la relación de aspecto */
    margin-bottom: 20px; /* Espacio debajo del logo */
}

/* Estilo para el logo en pantallas pequeñas */
@media (max-width: 768px) {
    .login-brand img {
        max-width: 150px;  /* Ajusta el tamaño del logo para pantallas más pequeñas */
    }
}

/* Estilo para el logo en pantallas aún más pequeñas */
@media (max-width: 480px) {
    .login-brand img {
        max-width: 120px;  /* Ajusta aún más el tamaño para dispositivos móviles */
    }
}
