* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
}

.container {
    min-height: 100vh;
    position: relative;
    background: linear-gradient(135deg, #0c54f7 0%, #4853e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Animated Background */
.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.blob {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    mix-blend-mode: multiply;
    filter: blur(40px);
    opacity: 0.7;
    animation: blob 7s infinite;
}

.blob-1 {
    top: 25%;
    left: 25%;
    background: rgba(0, 237, 237, 0.8);
}

.blob-2 {
    top: 33%;
    right: 25%;
    background: rgba(0, 226, 233, 0.8);
    animation-delay: 2s;
}

.blob-3 {
    bottom: 25%;
    left: 33%;
    background: rgba(0, 252, 255, 0.8);
    animation-delay: 4s;
}

@keyframes blob {
    0% { transform: scale(1) translate(0, 0); }
    33% { transform: scale(1.1) translate(30px, -20px); }
    66% { transform: scale(0.9) translate(-20px, 30px); }
    100% { transform: scale(1) translate(0, 0); }
}

/* Floating Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

/* Success Message */
.success-message {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(34, 197, 94, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 16px;
    padding: 16px 24px;
    color: white;
    text-align: center;
    z-index: 1000;
    animation: slideDown 0.4s ease-out;
}

.success-icon {
    width: 24px;
    height: 24px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: bold;
    color: white;
}

@keyframes slideDown {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.6s ease-out;
    position: relative;
    z-index: 10;
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Header */
.header {
    text-align: center;
}

.logo {
    margin-bottom: 12px;
}

.user-icon {
    width: 94px;
    height: 94px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    animation: bounceGentle 2s infinite alternate;
}

@keyframes bounceGentle {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.header h1 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.header p {
    color: #e0e0e0;
    font-size: 1rem;
    margin-bottom: 16px;
}

/* Form */
.form {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-group {
    margin-bottom: 8px;
    position: relative;
}

.input-group.slide-in {
    animation: slideIn 0.4s;
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.input-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.input-container h3 {
    margin-bottom: 4px;
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    z-index: 2;
    pointer-events: none;
}

.input-field {
    width: 100%;
    padding: 16px 16px 16px 48px; /* Espacio para el ¨Ēcono */
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: white;
    font-size: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    outline: none;
}

.input-field::placeholder {
    color: rgba(255,255,255,0.5);
    font-size: 15px;
}

.input-field:focus {
    border-color: #764ba2;
    background: rgba(255,255,255,0.15);
}

.input-field.error {
    border-color: #e11d48;
    animation: shake 0.3s;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 3;
    padding: 0;
}

.toggle-password:hover {
    color: #fff;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e11d48;
    font-size: 14px;
    margin-top: 2px;
    padding-left: 4px;
    animation: shake 0.3s;
}

.error-icon {
    font-size: 1.1em;
}

.submit-btn {
    width: 100%;
    padding: 14px 0;
    background: linear-gradient(90deg, #0475df 0%, #00afe4 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    transition: background 0.3s;
}

.submit-btn:active {
    background: #764ba2;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #fff;
    border-top: 3px solid #764ba2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-card {
        padding: 16px;
        border-radius: 12px;
        max-width: 95vw;
    }
    .user-icon {
        width: 48px;
        height: 48px;
    }
    .form {
        gap: 12px;
    }
    .input-field {
        font-size: 15px;
        padding: 12px 12px 12px 40px;
        border-radius: 10px;
    }
    .submit-btn {
        font-size: 1rem;
        border-radius: 10px;
        padding: 10px 0;
    }
}