/* ==========================================
   EnglishWords - الصفحة الرئيسية
========================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, "Tahoma", sans-serif;
    background: #f8f9fc;
    color: #171827;
    min-height: 100vh;
}


/* ==========================================
   الشريط العلوي
========================================== */

.topbar {
    width: 100%;
    min-height: 82px;

    background: #ffffff;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 6%;

    border-bottom: 1px solid #eeeeF4;

    position: sticky;
    top: 0;
    z-index: 100;
}


/* الشعار */

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #171827;
}

.logo span {
    color: #6657e8;
}


/* ==========================================
   الملف الشخصي
========================================== */

.profile {
    display: flex;
    align-items: center;
    gap: 11px;
}

.profile > div:not(.avatar) {
    text-align: right;
}

.profile strong {
    font-size: 15px;
    color: #171827;
}

.profile small {
    display: block;
    color: #8a8c99;
    margin-top: 4px;
    font-size: 12px;
}


.avatar {
    width: 46px;
    height: 46px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #8b7cf6,
            #6657e8
        );

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    font-weight: bold;

    box-shadow:
        0 5px 15px rgba(102, 87, 232, .20);
}


/* ==========================================
   أزرار أعلى الصفحة
========================================== */

.profile-btn,
.logout-btn {
    width: 40px;
    height: 40px;

    border: none;
    border-radius: 12px;

    background: #f4f3ff;

    cursor: pointer;

    font-size: 19px;

    transition: .2s;
}

.profile-btn:hover,
.logout-btn:hover {
    background: #e9e7ff;
    transform: translateY(-2px);
}


/* ==========================================
   المحتوى
========================================== */

.container {
    width: min(1050px, 92%);
    margin: 28px auto 45px;
}


/* ==========================================
   البانر الرئيسي
========================================== */

.welcome {
    min-height: 220px;

    border-radius: 25px;

    padding: 32px 38px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    overflow: hidden;

    color: white;

    background:
        linear-gradient(
            135deg,
            #5c5bea,
            #8667ed
        );

    box-shadow:
        0 15px 35px rgba(102, 87, 232, .20);

    position: relative;

    margin-bottom: 30px;
}


/* تأثير زخرفي */

.welcome::after {
    content: "";

    position: absolute;

    width: 220px;
    height: 220px;

    border-radius: 50%;

    background: rgba(255,255,255,.08);

    left: -70px;
    bottom: -100px;
}


.welcome h1 {
    font-size: 31px;
    margin: 9px 0 10px;
    line-height: 1.4;
}

.welcome p {
    line-height: 1.8;
    color: rgba(255,255,255,.90);
}

.small-title {
    font-size: 14px;
    opacity: .9;
}

.welcome-icon {
    font-size: 85px;
    z-index: 1;

    filter:
        drop-shadow(
            0 10px 15px rgba(0,0,0,.15)
        );
}


/* ==========================================
   عنوان ماذا تريد
========================================== */

.container > h2 {
    font-size: 22px;
    margin-bottom: 17px;
    color: #171827;
}


/* ==========================================
   القائمة
========================================== */

.menu {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 15px;
}


/* ==========================================
   البطاقات
========================================== */

.menu-card {
    width: 100%;
    min-height: 108px;

    border: 1px solid #eeeeF4;

    border-radius: 19px;

    background: #ffffff;

    color: #171827;

    padding: 18px;

    display: flex;
    align-items: center;

    text-align: right;

    cursor: pointer;

    box-shadow:
        0 5px 18px rgba(30, 32, 55, .05);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}


.menu-card:hover {
    transform: translateY(-3px);

    border-color: #dcd8ff;

    box-shadow:
        0 10px 28px rgba(30, 32, 55, .09);
}


.menu-card:active {
    transform: scale(.98);
}


/* ==========================================
   أيقونة البطاقة
========================================== */

.card-icon {
    width: 58px;
    height: 58px;

    min-width: 58px;

    border-radius: 17px;

    background: #f0efff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 28px;

    box-shadow:
        inset 0 0 0 1px rgba(102,87,232,.05);
}


/* ==========================================
   النص
========================================== */

.card-text {
    flex: 1;
    min-width: 0;

    margin-right: 15px;
}

.card-text h3 {
    font-size: 18px;

    margin-bottom: 6px;

    color: #171827;
}

.card-text p {
    color: #858794;

    font-size: 13px;

    line-height: 1.5;
}


/* ==========================================
   السهم
========================================== */

.arrow {
    font-size: 22px;

    color: #8b8c99;

    margin-right: 10px;

    transition: .2s;
}

.menu-card:hover .arrow {
    color: #6657e8;
    transform: translateX(-4px);
}


/* ==========================================
   بطاقة تعلم الكلمات
========================================== */

.main-card {
    background:
        linear-gradient(
            135deg,
            #f0efff,
            #ffffff
        );

    border:
        1px solid #dcd8ff;
}

.main-card .card-icon {
    background: #dfdcff;
}


/* ==========================================
   ألوان مختلفة للأيقونات
========================================== */

.menu-card:nth-child(1) .card-icon {
    background: #eee9ff;
}

.menu-card:nth-child(2) .card-icon {
    background: #def8ed;
}

.menu-card:nth-child(3) .card-icon {
    background: #fff0d9;
}

.menu-card:nth-child(4) .card-icon {
    background: #ffe5f0;
}

.menu-card:nth-child(5) .card-icon {
    background: #fff5cf;
}

.menu-card:nth-child(6) .card-icon {
    background: #e4f1ff;
}

.menu-card:nth-child(7) .card-icon {
    background: #ffe8d9;
}


/* ==========================================
   🤖 بطاقة مدرب الإنجليزية بالذكاء الاصطناعي
========================================== */

.card-ai {
    background:
        linear-gradient(
            135deg,
            #eaf8ff,
            #ffffff
        );

    border:
        1px solid #cdefff;
}


.card-ai .card-icon {
    background: #d5f1ff;

    box-shadow:
        inset 0 0 0 1px rgba(45, 170, 220, .08);
}


.card-ai:hover {
    border-color: #b9e8fa;

    box-shadow:
        0 10px 28px rgba(45, 170, 220, .12);
}


/* ==========================================
   الإعدادات
========================================== */

.settings-btn {
    width: 48px;
    height: 48px;

    border: 1px solid #eeeeF4;

    border-radius: 14px;

    background: #ffffff;

    color: #686a78;

    font-size: 21px;

    cursor: pointer;

    transition: .2s;

    box-shadow:
        0 5px 15px rgba(30,32,55,.05);
}

.settings-btn:hover {
    color: #6657e8;

    background: #f3f1ff;

    transform: rotate(10deg);
}


/* ==========================================
   الفوتر
========================================== */

footer {
    text-align: center;

    color: #9a9ba5;

    font-size: 12px;

    padding: 25px;

    margin-top: 30px;
}


/* ==========================================
   نافذة الخصوصية
========================================== */

.privacy-overlay {
    backdrop-filter: blur(5px);
}

.privacy-box {
    animation: popup .25s ease;
}

@keyframes popup {

    from {
        opacity: 0;
        transform: scale(.94);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* ==========================================
   الجوال
========================================== */

@media (max-width: 700px) {

    body {
        background: #f8f9fc;
    }


    .topbar {
        min-height: 72px;

        padding:
            12px 4%;
    }


    .logo {
        font-size: 20px;
    }


    .profile {
        gap: 7px;
    }


    .profile > div:not(.avatar) {
        display: none;
    }


    .avatar {
        width: 42px;
        height: 42px;
    }


    .profile-btn,
    .logout-btn {
        width: 36px;
        height: 36px;

        font-size: 17px;
    }


    .container {
        width: 92%;

        margin:
            20px auto 35px;
    }


    /* البانر */

    .welcome {

        min-height: 190px;

        padding:
            25px 22px;

        border-radius: 22px;

        margin-bottom: 25px;
    }


    .welcome h1 {
        font-size: 24px;
    }


    .welcome p {
        font-size: 13px;
    }


    .welcome-icon {
        font-size: 52px;
    }


    .container > h2 {
        font-size: 19px;
    }


    /* البطاقات */

    .menu {
        grid-template-columns: 1fr;

        gap: 12px;
    }


    .menu-card {
        min-height: 92px;

        padding: 15px;

        border-radius: 17px;
    }


    .card-icon {
        width: 52px;
        height: 52px;

        min-width: 52px;

        font-size: 25px;

        border-radius: 15px;
    }


    .card-text {
        margin-right: 12px;
    }


    .card-text h3 {
        font-size: 16px;
    }


    .card-text p {
        font-size: 12px;
    }


    .arrow {
        font-size: 19px;
    }


    footer {
        padding-bottom: 25px;
    }
}


/* ==========================================
   شاشات صغيرة جدًا
========================================== */

@media (max-width: 380px) {

    .welcome {
        padding: 21px 18px;
    }

    .welcome h1 {
        font-size: 21px;
    }

    .welcome-icon {
        font-size: 43px;
    }

    .menu-card {
        padding: 13px;
    }

}


/* ==========================================
   القراءة
========================================== */

.card-reading {
    background: #fff4df;
}

.card-reading .icon {
    background: #ffe5b3;
}


.card-games {
    background: #fff0d9;
}

.card-games .icon {
    background: #ffe0a8;
}