* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #3498db;
    --dark-blue: #2980b9;
    --purple-start: #667eea;
    --purple-end: #764ba2;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --input-bg: #f8f9fa;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--purple-start) 0%, var(--purple-end) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 480px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
    pointer-events: none;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--input-bg);
    transition: all 0.3s ease;
    outline: none;
}

.input-group input::placeholder {
    color: var(--text-light);
}

.input-group input:focus {
    border-color: var(--primary-blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.login-button:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.login-button:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.footer-text {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.back-link {
    display: inline-block;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--dark-blue);
    transform: translateX(-3px);
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .login-logo {
        width: 80px;
        height: 80px;
    }
    
    .input-group input {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    }
    
    .login-button {
        padding: 0.875rem;
        font-size: 1rem;
    }
}

/* Loading state */
.login-button.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.login-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error message */
.error-message {
    background: #fee;
    color: #c33;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 1rem;
    display: none;
    animation: shake 0.4s ease-in-out;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Success message */
.success-message {
    background: #efe;
    color: #3c3;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 1rem;
    display: none;
}

.success-message.show {
    display: block;
}