* {
    box-sizing: border-box;
}

/* Color customization */
:root {
    /* Light mode colors */
    --background-color: #F7F9FC;
    --header-bg: #FFFFFF;
    --header-text: #333333;
    --link-color: #696cff;
    --link-hover-color: #696cff;
    --text-color: #656565;
    --button-bg: linear-gradient(90deg, #6B2DC7, #696cff);
    --button-hover-bg: linear-gradient(90deg, #5A22A6, #696cff);
    --button-text-color: #FFFFFF;
    --slide-menu-bg: #FFFFFF;
    --slide-menu-text: #656565;
    --slide-menu-border: #e0e0e0;

    /* Dark mode colors */
    --dark-background-color: #1E1E1E;
    --dark-header-bg: #252526;
    --dark-header-text: #D4D4D4;
    --dark-link-color: #569CD6;
    --dark-link-hover-color: #4FC1FF;
    --dark-text-color: #D4D4D4;
    --dark-button-bg: linear-gradient(90deg, #4FC1FF, #569CD6);
    --dark-button-hover-bg: linear-gradient(90deg, #3E9ACF, #4FB0FF);
    --dark-button-text-color: #FFFFFF;
    --dark-slide-menu-bg: #252526;
    --dark-slide-menu-text: #D4D4D4;
    --dark-slide-menu-border: #333333;
}

body {
    background: #fff;
}
body.dark-theme {
    background-color: var(--dark-background-color);
    color: var(--dark-text-color);
}

.form-modal {
    position: relative;
    width: 450px;
    height: auto;
    margin-top: 4em;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 3px 20px 0px rgba(0, 0, 0, 0.1);
}

.form-modal button {
    cursor: pointer;
    position: relative;
    text-transform: capitalize;
    font-size: 1em;
    z-index: 2;
    outline: none;
    background: #fff;
    transition: 0.2s;
    color: #656565
}

.form-modal .btn {
    border-radius: 20px;
    border: none;
    font-weight: bold;
    font-size: 1.2em;
    padding: 0.8em 1em 0.8em 1em !important;
    transition: 0.5s;
    border: 1px solid #ebebeb;
    margin-bottom: 0.5em;
    margin-top: 0.5em;
}

.form-modal .login,
.form-modal .signup {
    background: #fff;
    color: #705DE3;
    border-color: #705DE3;
}

.form-modal .login:hover,
.form-modal .signup:hover {
    background: #705DE3;
    color: #fff;
}

.form-toggle {
    position: relative;
    width: 100%;
    height: auto;
}

.form-toggle button {
    width: 50%;
    float: left;
    padding: 1.5em;
    margin-bottom: 1.5em;
    border: none;
    transition: 0.2s;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 20px;
}

.form-toggle button:nth-child(1) {
    border-bottom-right-radius: 20px;
}

.form-toggle button:nth-child(2) {
    border-bottom-left-radius: 20px;
}

#login-toggle {
    background: #705DE3;
    color: #fff;
}
#signup-toggle {
    background: #ffffff;
    color: #656565;
}

.form-modal form {
    position: relative;
    width: 90%;
    height: auto;
    left: 50%;
    transform: translateX(-50%);
}

#login-form,
#signup-form,
#phone-verification-form {
    position: relative;
    width: 100%;
    height: auto;
    padding-bottom: 1em;
}

#signup-form {
    display: none;
}

#login-form button,
#signup-form button,
#phone-verification-form button {
    width: 100%;
    margin-top: 0.5em;
    padding: 0.6em;
    color: #705DE3;
}

#login-form button:hover,
#signup-form button:hover,
#phone-verification-form button:hover {
    width: 100%;
    margin-top: 0.5em;
    padding: 0.6em;
    color: #ffffff;
    background: #705DE3;

}

.form-modal input {
    position: relative;
    width: 100%;
    font-size: 1em;
    padding: 1.2em 1.7em 1.2em 1.7em;
    margin-top: 0.6em;
    margin-bottom: 0.6em;
    border-radius: 20px;
    border: none;
    background: #ebebeb;
    outline: none;
    font-weight: bold;
    transition: 0.4s;
}

.form-modal input:focus,
.form-modal input:active {
    transform: scaleX(1.02);
}

.form-modal input::-webkit-input-placeholder {
    color: #656565;
}

.form-modal p {
    font-size: 16px;
    font-weight: bold;
}

.form-modal p a {
    color: #705DE3;
    text-decoration: none;
    transition: 0.2s;
}

.form-modal p a:hover {
    color: #656565;
}

.form-modal i {
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translateX(-10%) translateY(-50%);
}

.fa-google {
    color: #dd4b39;
}

.fa-linkedin {
    color: #3b5998;
}

.fa-windows {
    color: #0072c6;
}

.-box-sd-effect:hover {
    box-shadow: 0 4px 8px hsla(210, 2%, 84%, .2);
}

@media only screen and (max-width: 500px) {
    .form-modal {
        width: 100%;
    }
}

@media only screen and (max-width: 400px) {
    i {
        display: none !important;
    }
}

/* توسيط الرسائل داخل الفورم */
#login-error-message, 
#login-success-message, 
#signup-error-message, 
#signup-success-message, 
#verification-error-message {
    text-align: center; /* توسيط النص داخل الرسالة */
    margin-top: 1em; /* إضافة مسافة أعلى الرسالة */
    display: block; /* لضمان عرض الرسالة بشكل كامل */
}

/* يمكنك أيضاً تحسين مظهر الرسائل */
#login-error-message, 
#signup-error-message, 
#verification-error-message {
    color: red; /* لون للرسائل الخطأ */
    font-weight: bold; /* جعل النص غامقًا للوضوح */
}

#login-success-message, 
#signup-success-message {
    color: green; /* لون للرسائل الناجحة */
    font-weight: bold; /* جعل النص غامقًا للوضوح */
}

/* يمكنك تخصيص المزيد من التأثيرات مثل إضافة هوامش أو خلفية للرسائل */
/* تأثيرات الوضع المظلم لعناصر صفحة المستخدم */
body.dark-theme .form-modal {
    background-color: var(--dark-background-color);
    color: var(--dark-text-color);
    border: 1px solid var(--dark-slide-menu-border);
}

body.dark-theme .form-toggle button {
    background-color: var(--dark-button-bg);
    color: var(--dark-button-text-color);
}

body.dark-theme .form-toggle button:hover {
    background-color: var(--dark-button-hover-bg);
}

body.dark-theme #login-form input, 
body.dark-theme #signup-form input, 
body.dark-theme #phone-verification-form input {
    background-color: var(--dark-header-bg);
    color: var(--dark-text-color);
    border: 1px solid var(--dark-slide-menu-border);
}

body.dark-theme #login-submit, 
body.dark-theme #send_verification_code, 
body.dark-theme #resend_code, 
body.dark-theme #verify_button {
    background-color: var(--dark-button-bg);
    color: var(--dark-button-text-color);
}

body.dark-theme #login-submit:hover, 
body.dark-theme #send_verification_code:hover, 
body.dark-theme #resend_code:hover, 
body.dark-theme #verify_button:hover {
    background-color: var(--dark-button-hover-bg);
}

body.dark-theme #login-error-message, 
body.dark-theme #signup-error-message, 
body.dark-theme #verification-error-message {
    color: #FF6B6B; /* لون مميز للرسائل التحذيرية في الوضع المظلم */
}

body.dark-theme #login-success-message, 
body.dark-theme #signup-success-message {
    color: #A5D6A7; /* لون مميز للرسائل الناجحة في الوضع المظلم */
}

body.dark-theme #pu a {
    color: var(--dark-link-color);
}

body.dark-theme #pu a:hover {
    color: var(--dark-link-hover-color);
}
/* حقل رقم الهاتف المركب */
.phone-field {
  display: flex;
  gap: 0.5em;
  width: 100%;
}

.phone-field select,
.phone-field input {
  padding: 1em;
  border-radius: 20px;
  border: none;
  background: #ebebeb;
  font-size: 1em;
  font-weight: bold;
  outline: none;
  transition: 0.3s;
}

.phone-field select {
  width: 30%;
  text-align: center;
}

.phone-field input {
  width: 70%;
}

.phone-field select:focus,
.phone-field input:focus {
  transform: scaleX(1.02);
  background: #e0e0e0;
}
