html,
body {
    width: 100%;
    overflow-x: hidden;
}

:root {
    /* الوضع الفاتح */
    --main-bg: #FAF7FF;
    --navbar-bg: #F3EAFA;
    --box-bg: #E6D6FA;
    --primary: #DB88FF;
    --primary-light: #F3EAFA;
    --primary-bold: #FB3FFF;
    --txt-main: #2D0140;
    --txt-muted: #847097;
    --btn-main-bg: #FB3FFF;
    --btn-main-txt: #fff;
    --btn-sec-bg: #fff;
    --btn-sec-txt: #DB88FF;
    --footer-bg: #2D0140;
    --footer-txt: #F3EAFA;

    /* ألوان إضافية للوضع الفاتح */
    --light-bg: #FAF7FF;
    --light-secondary: #F3EAFA;
    --light-primary: #DB88FF;
    --light-accent: #C463FF;
    --light-highlight: #FB3FFF;
    --light-text: #2D0140;
    --light-text-secondary: #847097;
    --light-border: #E6D6FA;
    --light-card: #FFFFFF;
    --light-shadow: rgba(219, 136, 255, 0.1);
}

/* الوضع الداكن */
body.dark {
    --main-bg: #181b22;
    --navbar-bg: #23263c;
    --box-bg: #1a1c24;
    --primary: #A305A6;
    --primary-light: #23263c;
    --primary-bold: #FB3FFF;
    --txt-main: #FFFFFF;
    --txt-muted: #CCCCCC;
    --btn-main-bg: #A305A6;
    --btn-main-txt: #fff;
    --btn-sec-bg: #23263c;
    --btn-sec-txt: #FB3FFF;
    --footer-bg: #23263c;
    --footer-txt: #e4efb3;

    /* ألوان إضافية للوضع الداكن */
    --dark-bg: #181b22;
    --dark-secondary: #23263c;
    --dark-primary: #A305A6;
    --dark-accent: #FB3FFF;
    --dark-highlight: #FB3FFF;
    --dark-text: #FFFFFF;
    --dark-text-secondary: #CCCCCC;
    --dark-border: #2D0140;
    --dark-card: #23263c;
    --dark-shadow: rgba(0, 0, 0, 0.3);
}

body {
    background: var(--main-bg);
    min-height: 100vh;
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
    color: var(--txt-main);
}

/* Navbar */
.navbar-ein {
    background: var(--navbar-bg);
    border-bottom: 2.5px solid var(--primary);
    min-height: 62px;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* .ein-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    padding: 0 32px;
    gap: 0;
} */

.navbar-ein {
    direction: ltr;
    background: var(--navbar-bg);
    border-bottom: 2.5px solid var(--primary);
    min-height: 62px;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.ein-brand-side {
    /* direction: ltr; */
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
    padding-right: 100px;
}

.ein-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--primary-light);
    object-fit: cover;
}

/* .ein-logo-text {
    font-size: 2.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    letter-spacing: -1.5px;
    color: var(--primary-bold);
    text-decoration: underline 2px white;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
} */
/* 
.ein-logo-text .ein-highlight {
    color: white;
    text-decoration: underline 2px var(--primary-bold);
    margin-left: 2px;
    margin-right: 2px;
    font-weight: 900;
} */

/* 
.ein-mode-switch {
    background: var(--primary-light);
    border: none;
    border-radius: 20px;
    padding: 5px 17px;
    display: flex;
    gap: 13px;
    align-items: center;
    font-size: 1.23rem;
    margin-right: 33px;
    margin-left: 17px;
    cursor: pointer;
    box-shadow: 0 3px 10px #DB88FF22;
    transition: background 0.15s;
} */

/* .ein-mode-switch .sun {
    color: #b9a63b;
}

.ein-mode-switch .moon {
    color: #DB88FF;
} */

.ein-btns-side {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: 10px;
}

.ein-create-btn {
    background: var(--primary-light);
    color: var(--primary-bold) !important;
    border-radius: 7px;
    border: none;
    font-weight: 700;
    font-size: 1.04rem;
    padding: 7px 18px 7px 18px;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: none;
    transition: background 0.13s;
}

.ein-create-btn i {
    color: var(--primary-bold);
    font-size: 1.13em;
    margin-left: 5px;
}

.ein-create-btn:hover {
    background: var(--primary);
}

.ein-login-btn {
    background: #fff;
    color: var(--primary) !important;
    border: 2px solid transparent;
    border-radius: 7px;
    font-size: 1.04rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: none;
    padding: 7px 19px;
    transition: border 0.16s, background 0.13s, color 0.14s;
    text-decoration: none;
}

.ein-login-btn i {
    color: var(--primary);
    font-size: 1.13em;
    margin-left: 2px;
}

.ein-login-btn:hover,
.ein-login-btn:focus {
    border: 2px solid var(--primary);
    background: var(--primary-light);
    color: var(--primary-bold) !important;
}

/* Main split */
.main-split {
    display: flex;
    min-height: calc(100vh - 62px);
    background: var(--main-bg);
}

/* فورم تسجيل الدخول */
.login-side {
    width: 65%;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 150px 0 20px 0;
}

.login-content {
    height: -250px;
    width: 70%;
    min-width: 300px;
    max-width: 920px;
    /* margin: auto; */
    margin-right: 50px;
    margin-top: -150px;
    /* padding: 0 0 0 30px; */
    /* display: flex; */
    flex-direction: column;
    align-items: flex-start;
}


.login-title {
    font-weight: 700;
    font-size: 1.38rem;
    color: var(--primary-bold);
    margin-bottom: 10px;
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -.5px;
}

.login-title .icon {
    color: var(--primary);
    font-size: 1.15em;
}

.login-desc {
    color: #847097;
    font-size: 1.01rem;
    margin-bottom: 25px;
    margin-top: 0px;
    font-weight: 500;
}

.form-label {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 1rem;
}

.form-control::placeholder {
    color: #E6D6FA;
}

.form-control {
    border-radius: 0 !important;
    border: none;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 16px;
    font-size: 1.06rem;
    background: transparent;
    box-shadow: none;
    padding-right: 0;
    padding-left: 0;
    color: var(--txt-main);
    transition: border 0.16s;
    text-align: right;
    width: 100%;
}

#firstName,
#secondName,
#thirdName,
#gender,
#phone,
#fatherPhone,
#school,
#email,
#password,
#confirmPassword,
#governorate,
#gender,
#grade,
#section {
    color: #0e7a8d;
}

.form-control:focus {
    border-color: var(--primary-bold);
    background: var(--primary-light);
    box-shadow: none;
}

.input-icon {
    font-size: 1.1em;
    color: var(--primary);
    margin-left: 3px;
    margin-top: -10px;
}

.login-switch-toggle {
    margin: 17px 0 14px 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.login-switch-toggle input[type="checkbox"] {
    width: 38px;
    height: 22px;
    accent-color: var(--primary);
    cursor: pointer;
}

.login-switch-toggle label {
    font-weight: 400;
    color: #847097;
    font-size: .98rem;
    margin-right: 7px;
    margin-top: 4px;
}

.login-btn {
    background: var(--primary-bold);
    color: #fff !important;
    border-radius: 8px;
    border: none;
    width: 170px;
    font-size: 1.12rem;
    font-weight: 700;
    margin-top: 0px;
    margin-bottom: 12px;
    padding: 10px 0 10px 0;
    transition: background .16s;
    box-shadow: 0 2px 13px #e6eec56a;
    text-align: center;
}

.login-btn:hover {
    background: var(--primary);
    color: #fff !important;
}

.create-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    margin-right: 4px;
    margin-left: 4px;
    transition: color 0.13s;
    font-size: 1.01rem;
}

.create-link:hover {
    color: var(--primary-bold);
}

.no-account {
    font-size: .99rem;
    margin-top: 7px;
    color: #55505e;
}



.banner-side {
    flex: 1;
    min-width: 300px;
    /* background: var(--box-bg); */
    display: flex;
    align-items: stretch;
    justify-content: center;
    /* علشان الصورة تتوسّط */
    overflow: hidden;
    height: 100vh;
    position: relative;
    padding: 0;
    padding-top: 00px;
    margin-bottom: 10px;
    margin-top: -30px;
    /* object-fit: cover; */
}

@media (max-width: 800px) {

    /* .banner-side {
        display: none;
        height: 100h;
        padding-right: 0px;
        padding-top: 400px;
        margin-bottom: 100px;
    } */
    .banner-side {
        display: block !important;
        order: -1;
        /* تخليها فوق الفورم */
        width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        /* margin-top: 100px; */
        padding-right: 0px;
        padding-left: 5px;
    }
}


.banner-content {
    width: 100%;
    max-width: 5200px;
    padding: 0 25px;
    text-align: right;
    margin-top: 60px;
}

.banner-title-main {
    font-size: 2.35rem;
    font-weight: bold;
    color: var(--primary-bold);
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    padding-bottom: 0;
    line-height: 1.16;
    letter-spacing: -1.7px;
}

.banner-title-shadow {
    font-size: 2rem;
    color: #dbb7fb;
    font-weight: bold;
    margin-top: -7px;
    margin-bottom: 25px;
    line-height: 1.1;
    opacity: 0.4;
    z-index: 1;
    position: relative;
    letter-spacing: -1.7px;
}

.banner-img-wrap {
    margin-top: 300px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

/* .banner-img {
    max-width: 3900px;
    max-height: 750px;
    margin-top: -90px;
    margin-left: -25px;
    margin-right: -25px;
    height: 3600px;
    width: 3000px;
    box-shadow: 0 5px 45px #b375d144;
    object-fit: cover;
    border: 0px solid #fff;
} */
.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding-right: 0px;
    margin-top: -310px;
}

/* Footer */
.main-footer {
    background: var(--footer-bg);
    color: var(--footer-txt);
    padding: 45px 0 0 0;
    text-align: center;
    margin-top: 0;
    min-height: 250px;
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

.footer-logo {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-bold);
    text-decoration: underline 2px white;
    letter-spacing: -1.5px;
}

.footer-logo .highlight {
    /* color: var(--primary-bold); */
    color: white;
    text-decoration: underline 2px var(--primary-bold);
}

.footer-desc {
    color: white;
    font-size: 1.13rem;
    margin-bottom: 28px;
    margin-top: 2px;
    text-decoration: underline 2px var(--primary-bold);
}

.footer-desc .x {
    color: var(--primary-bold);
    text-decoration: underline 2px white;
}

.paragraph {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.footer-social {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 23px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    border: 2px solid #e5e5e5;
    color: #333;
    box-shadow: 0 2px 8px #2221;
    transition: box-shadow 0.14s;
    text-decoration: none;
}

.footer-social .tiktok {
    color: #000;
}

.footer-social .facebook {
    color: #1877F3;
}

.footer-social .youtube {
    color: #FF0000;
}

.footer-social .users {
    color: #DB88FF;
}

.footer-social a:hover {
    box-shadow: 0 3px 18px #DB88FF45;
    border-color: var(--primary-bold);
}

.footer-info {
    color: var(--primary-bold);
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-size: 1.04rem;
    margin-bottom: 7px;
    margin-top: 7px;
}

.developer a {
    font-style: italic;
    text-decoration: none;
}

.a {
    color: wheat;
    border-radius: 15px;
    background-color: #A305A6;
    border: 1px solid #A305A6;
}

.devel .footer-powered {
    color: var(--primary);
    font-size: .96rem;
    margin-top: 6px;
    margin-bottom: 0;
    opacity: .91;
}

.copy {
    color: wheat;
}

@media (max-width: 1150px) {
    .main-split {
        flex-direction: column;
    }

    .login-side {
        width: 100%;
        padding: 30px 0 0 0;
    }

    .banner-side {
        min-height: 220px;
    }

    .login-content {
        padding: 0 19px;
    }
}

@media (max-width: 800px) {
    .main-split {
        flex-direction: column;
    }

    .banner-side {
        display: none;
    }

    .login-side {
        padding: 150px 0 0 0;
    }

    .login-content {
        padding: 0 6px;
    }

    .main-footer {
        padding-top: 22px;
    }
}

@media (max-width: 991px) {
    .ein-container {
        padding: 0 10px;
        position: relative;
        height: 10px;
    }

    .ein-brand-side {
        padding-left: 100px;
        position: absolute;
        right: 53%;
        top: 50%;
        transform: translate(50%, -50%);
        left: unset;
        margin: 0 !important;
    }

    .nav-right {
        top: 45%;
        padding-left: 300px;
        margin-top: -15px;
        margin-bottom: -20px;
        padding-bottom: 30px;
    }


    .navt .ein-mode-switch {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .navbar-toggler {
        border: none;
        order: 1;
        margin-right: 3px;
        /* margin-bottom: 5px; */
    }

    .ein-btns-side {
        width: 100%;
        gap: 10px;
        margin-top: 10px;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

@media (min-width: 992px) {
    .navbar-toggler {
        display: none !important;
    }

    .ein-brand-side {
        position: static;
        transform: none;
        margin: 0;
    }
}

@media (max-width: 800px) {
    .main-split {
        flex-direction: column;
    }

    .banner-side {
        display: block !important;
        order: -1;
        /* تخليها فوق الفورم */
        width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        margin-bottom: 20px;
    }

    .login-side {
        width: 100% !important;
        min-width: unset !important;
    }
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 85vw;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    box-shadow: 0 0 40px #DB88FF33;
    z-index: 9999;
    display: none;
    flex-direction: column;
    gap: 19px;
    padding: 32px 18px 18px 18px;
    transition: transform 0.25s;
    border-radius: 0 18px 18px 0;
}

.side-menu.show {
    display: flex;
    animation: slideIn .25s;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

.close-btn {
    background: none;
    border: none;
    font-size: 2.3rem;
    color: #DB88FF;
    position: absolute;
    top: 14px;
    left: 18px;
    cursor: pointer;
}

.side-btn {
    background: #F3EAFA;
    color: #DB88FF;
    border: none;
    border-radius: 12px;
    font-size: 1.13rem;
    font-weight: 700;
    padding: 15px 0;
    margin-bottom: 7px;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 12px #DB88FF22;
    transition: background 0.14s, color 0.14s;
}

.side-btn-main {
    background: #DB88FF;
    color: #fff;
}

.side-btn:hover,
.side-btn:focus {
    background: #FB3FFF;
    color: #fff;
}

@media (min-width: 992px) {

    .side-menu,
    #menuBtn {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .ein-logo-text {
        font-size: 2.0rem;
        /* ← حجم أصغر للموبايل */
    }
}

body.dark .side-menu {
    background: var(--dark-secondary);
    box-shadow: 0 0 40px var(--dark-shadow);
}

body.dark .side-btn {
    background: var(--dark-card);
    color: var(--dark-text);
    box-shadow: 0 2px 12px var(--dark-shadow);
    border: 1px solid var(--dark-border);
}

body.dark .side-btn-main {
    background: var(--dark-accent);
    color: #fff;
}

body.dark .close-btn {
    color: var(--dark-accent);
}

body.dark .study-section {
    background: var(--dark-bg);
}

body.dark .study-title {
    color: var(--dark-text);
}

body.dark .study-title .atom {
    color: var(--dark-accent);
}

body.dark .study-desc {
    color: var(--dark-text-secondary);
}

body.dark .study-btn {
    background: var(--dark-accent);
    color: #fff;
}

body.dark .study-btn:hover {
    background: var(--primary);
    color: #fff;
}

@media (max-width: 768px) {
    .carousel img {
        height: 680px;
    }
}

* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

@media (min-width: 768px) and (max-width: 820px) {
    nav {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 1rem 0;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.4rem;
    }

    .nav-btn {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    .nav-right {
        margin-left: 250px;
    }
}