* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.login-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.login-header p {
    opacity: 0.9;
    font-size: 1em;
}

.login-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: #f8f9ff;
}

.form-group input::placeholder {
    color: #999;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9em;
}

.remember-forgot label {
    display: flex;
    align-items: center;
    margin: 0;
    font-weight: 500;
    color: #333;
}

.remember-forgot input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.remember-forgot a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.remember-forgot a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.signup-link {
    text-align: center;
    color: #666;
    font-size: 0.95em;
}

.signup-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.error-message {
    background-color: #fee;
    color: #c33;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
    display: none;
    animation: slideIn 0.3s ease-out;
}

.error-message.show {
    display: block;
}

.success-message {
    background-color: #efe;
    color: #3c3;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3c3;
    display: none;
    animation: slideIn 0.3s ease-out;
}

.success-message.show {
    display: block;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-group.error input {
    border-color: #c33;
    background-color: #fee;
}

.input-error {
    color: #c33;
    font-size: 0.85em;
    margin-top: 5px;
    display: none;
}

.input-error.show {
    display: block;
}

.password-toggle {
    position: relative;
}

.password-toggle input {
    padding-right: 40px;
}

.toggle-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #667eea;
    font-size: 1.2em;
    user-select: none;
}

.toggle-eye:hover {
    color: #764ba2;
}

@media (max-width: 480px) {
    .login-container {
        border-radius: 10px;
    }

    .login-header h1 {
        font-size: 2em;
    }

    .login-form {
        padding: 30px 20px;
    }

    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}