:root {
    --primary-color: #2196F3;
    --secondary-color: #4CAF50;
    --accent-color: #FFA726;
    --error-color: #f44336;
    --text-primary: #333;
    --text-secondary: #666;
    --background: #f8f9fa;
}

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

body {
    background: var(--background);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.logo {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.welcome-text {
    color: var(--text-primary);
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.login-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    position: relative;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
}

input::placeholder {
    color: #999;
}

.login-button {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.login-button:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

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

.login-button i {
    transition: transform 0.3s ease;
}

.login-button:hover i {
    transform: translateX(4px);
}

.forgot-password {
    text-align: center;
    margin-top: 1.25rem;
}

.forgot-password a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

.error-message {
    color: var(--error-color);
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(244, 67, 54, 0.1);
    font-size: 0.9rem;
    display: none;
}

@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }

    .login-card {
        padding: 1.5rem;
    }

    .welcome-text {
        font-size: 1.5rem;
    }
}

/* Animation for error message */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease-in-out;
}

/* Update the error message styles in login.css */
.error-message {
    color: var(--error-color);
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(244, 67, 54, 0.1);
    font-size: 0.9rem;
    display: none;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Optional: Add a transition for the input fields when there's an error */
input.error {
    border-color: var(--error-color);
    background-color: rgba(244, 67, 54, 0.05);
}
