:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --gray-color: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Tahoma', 'Geneva', 'Verdana', sans-serif;
}

body {
    background: white;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
    position: relative;
}

.chemical-element {
    position: absolute;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 1;
    transition: transform 0.2s ease;
    pointer-events: none;
    user-select: none;
}

.chemical-symbol {
    font-size: 1.8rem;
    line-height: 1;
}

.atomic-number {
    font-size: 0.8rem;
    margin-top: 2px;
}

.login-form-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    z-index: 10;
    transition: var(--transition);
    border: 1px solid #eaeaea;
}

.login-form-container:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.chemical-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: linear-gradient(135deg, #2980b9, #1a5276);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3.5rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.chemical-logo::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h1 {
    font-size: 1.8rem;
    color: #2980b9; /* لون أزرق داكن */
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-header p {
    color: var(--gray-color);
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    right: 15px;
    color: var(--gray-color);
    font-size: 1.1rem;
}

.input-with-icon .toggle-password {
    position: absolute;
    left: 15px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--gray-color);
    font-size: 1.1rem;
    transition: var(--transition);
    z-index: 2;
}

.input-with-icon .toggle-password:hover {
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 0.9rem 3rem 0.9rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light-color);
    color: var(--dark-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.alert {
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.alert-danger {
    background-color: #fdecea;
    color: var(--danger-color);
    border: 1px solid #f5c2c7;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.remember-me input {
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn {
    padding: 0.9rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-color);
    font-size: 0.95rem;
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.register-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* التجاوب مع الشاشات الصغيرة */
@media (max-width: 768px) {
    .login-form-container {
        padding: 1.8rem;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }
    
    .login-form-container {
        padding: 1.5rem;
    }
    
    .form-header h1 {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .forgot-password {
        margin-top: 0.5rem;
    }
}