* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-image: url('https://cdn.pixabay.com/photo/2024/04/08/18/23/ai-generated-8684145_1280.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    min-height: 100vh;
    position: relative;
}

.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 900px; /* محافظ على العرض اللي عدلته */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.login-content {
    width: 100%;
    padding: 30px;
    max-height: 90vh; /* محافظ على الطول اللي عدلته */
    overflow-y: auto;
    scrollbar-width: none; /* إخفاء الـ scrollbar في Firefox */
    -ms-overflow-style: none; /* إخفاء الـ scrollbar في IE/Edge */
}

.login-content::-webkit-scrollbar {
    display: none; /* إخفاء الـ scrollbar في Chrome/Safari */
}

.login-content h1 {
    font-size: 28px;
    color: #ffffffcc;
    margin-bottom: 10px;
    text-align: center;
}

.login-content h1 .highlight {
    color: #00aaff;
    text-shadow: 0 2px 5px rgba(0, 170, 255, 0.3);
}

.login-subtitle {
    font-size: 16px;
    color: #ffffffcc;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6; 
    max-width: 800px; 
    margin-left: auto; 
    margin-right: auto;
    padding: 0 10px; 
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-section {
    margin-bottom: 20px;
}

.form-section h2 {
    font-size: 20px;
    color: #00aaff;
    margin-bottom: 15px;
    text-align: center;
}

.form-group {
    margin-bottom: 5px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 16px;
    color: #ffffffcc;
    margin-bottom: 5px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff66;
    font-size: 16px;
    transition: color 0.3s;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #ffffff33;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group select option {
    color: #000000;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #00aaff;
    box-shadow: 0 0 6px rgba(0, 170, 255, 0.3);
}

.form-group input:focus + .input-icon,
.form-group select:focus + .input-icon {
    color: #00aaff;
}

.form-group input::placeholder {
    color: #fff; /* محافظ على اللون اللي عدلته */
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: url('data:image/svg+xml;utf8,<svg fill="%23ffffff66" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 10px center;
    background-size: 16px;
    padding-right: 30px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #ffffff66;
    transition: color 0.3s, transform 0.1s;
}

.toggle-password:hover {
    color: #00aaff;
    transform: translateY(-50%) scale(1.1);
}

.toggle-password i {
    font-size: 18px;
}

.image-preview {
    margin-top: 10px;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 150px;
    display: none;
    border-radius: 6px;
}

.error-message {
    display: flex;
    align-items: center;
    color: #ff4d4d;
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
    opacity: 0;
    transition: opacity 0.3s;
}

.error-message i {
    margin-right: 5px;
    font-size: 12px;
}

.success-message {
    display: flex;
    align-items: center;
    color: #4caf50;
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
    opacity: 0;
    transition: opacity 0.3s;
}

.success-message i {
    margin-right: 5px;
    font-size: 12px;
}

.error-message:not(:empty),
.success-message:not(:empty) {
    opacity: 1;
}

.form-group input.error,
.form-group select.error {
    border-color: #ff4d4d;
    box-shadow: 0 0 6px rgba(255, 77, 77, 0.3);
}

.form-group input.success,
.form-group select.success {
    border-color: #4caf50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.3);
}

.form-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(90deg, #00aaff, #0088cc);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s, transform 0.1s, box-shadow 0.3s;
}

.form-btn:hover {
    background: linear-gradient(90deg, #0088cc, #00aaff);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 170, 255, 0.3);
}

.form-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 170, 255, 0.2);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
}

.form-footer p {
    font-size: 14px;
    color: #ffffffcc;
}

.form-footer a {
    color: #00aaff;
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
    color: #0088cc;
}

.custom-file-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: linear-gradient(90deg, #00aaff, #0088cc);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s, transform 0.1s, box-shadow 0.3s;
}

.custom-file-upload:hover {
    background: linear-gradient(90deg, #0088cc, #00aaff);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 170, 255, 0.3);
}

.custom-file-upload i {
    font-size: 16px;
}

input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-name {
    font-size: 14px;
    color: #ffffffcc;
}

.success-message-box {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid #4caf50;
    color: #fff;
    margin-top: 20px;
}

.success-message-box i {
    font-size: 40px;
    color: #4caf50;
    margin-bottom: 10px;
}

.success-message-box p {
    font-size: 16px;
    margin: 0;
}

@media (max-width: 767px) {
    .login-container {
        max-width: 100%;
    }

    .login-content {
        padding: 20px;
        max-height: none;
        overflow-y: visible;
    }

    .login-content h1 {
        font-size: 24px;
    }

    .login-subtitle {
        font-size: 14px;
    }

    .form-group label {
        font-size: 14px;
    }

    .form-group input,
    .form-group select {
        font-size: 14px;
        padding: 8px 8px 8px 30px;
    }

    .input-wrapper .input-icon {
        font-size: 14px;
    }

    .form-btn {
        font-size: 14px;
        padding: 8px;
    }

    .form-footer p {
        font-size: 12px;
    }

    .social-btn {
        font-size: 14px;
        padding: 8px;
    }
}