* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --main: #2096ED;
    --main-dark: #087dcc;
    --text: #12304a;
    --muted: #718294;
    --white: #ffffff;
    --border: rgba(32, 150, 237, .14);
    --shadow: 0 15px 45px rgba(20, 70, 110, .10);
}

body {
    font-family: "Cairo", sans-serif;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f7fbff 50%,
            #eef8ff 100%
        );
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}


/* ================================
   الخلفية
================================ */

.bg-circle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(1px);
}

.circle-one {
    width: 280px;
    height: 280px;
    background: rgba(32, 150, 237, .07);
    top: -100px;
    right: -80px;
}

.circle-two {
    width: 220px;
    height: 220px;
    background: rgba(32, 150, 237, .05);
    bottom: 60px;
    left: -90px;
}

.circle-three {
    width: 120px;
    height: 120px;
    background: rgba(32, 150, 237, .05);
    top: 45%;
    right: 8%;
}


/* ================================
   الصفحة
================================ */

.versions-page {
    width: min(900px, calc(100% - 30px));
    margin: auto;
    padding: 30px 0 25px;
}


/* ================================
   الرأس
================================ */

.versions-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.back-button {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    color: var(--main);

    border: 1px solid var(--border);
    border-radius: 15px;

    text-decoration: none;

    box-shadow: 0 8px 25px rgba(0,0,0,.06);

    transition: .25s ease;
}

.back-button:hover {
    transform: translateX(4px);
    background: var(--main);
    color: white;
}


.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-logo {
    width: 65px;
    height: 65px;
    border-radius: 19px;

    background: white;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 10px 30px rgba(32,150,237,.13);

    overflow: hidden;
}

.brand-logo img {
    width: 82%;
    height: 82%;
    object-fit: contain;
}

.brand h1 {
    font-size: 23px;
    font-weight: 800;
}

.brand p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 2px;
}


/* ================================
   اختيار النوع
================================ */

.version-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;

    margin-bottom: 25px;
}

.type-button {
    border: 1px solid var(--border);
    background: rgba(255,255,255,.85);

    border-radius: 20px;

    padding: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    cursor: pointer;

    color: var(--text);

    font-family: inherit;

    box-shadow: var(--shadow);

    transition: .25s ease;
}

.type-button i {
    font-size: 29px;
    color: var(--main);
}

.type-button span {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.type-button strong {
    font-size: 15px;
}

.type-button small {
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}

.type-button:hover {
    transform: translateY(-2px);
}

.type-button.active {
    color: white;
    background: linear-gradient(
        135deg,
        #2096ED,
        #1688dc
    );

    border-color: transparent;
}

.type-button.active i,
.type-button.active small {
    color: white;
}


/* ================================
   عنوان القائمة
================================ */

.list-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 15px;
}

.small-label {
    color: var(--main);
    font-size: 12px;
    font-weight: 700;
}

.list-heading h2 {
    font-size: 22px;
    margin-top: 2px;
}

.version-count {
    color: var(--muted);
    font-size: 12px;
}


/* ================================
   البطاقات
================================ */

.versions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.version-card {
    background: rgba(255,255,255,.92);

    border: 1px solid var(--border);

    border-radius: 20px;

    padding: 16px;

    display: flex;
    align-items: center;
    gap: 15px;

    box-shadow: var(--shadow);

    transition: .25s ease;

    animation: cardIn .35s ease both;
}

.version-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 45px rgba(32,150,237,.12);
}


/* الشعار */

.version-icon {
    width: 62px;
    height: 62px;

    flex-shrink: 0;

    border-radius: 17px;

    background: #f5fbff;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.version-icon img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}


/* المعلومات */

.version-info {
    flex: 1;
    min-width: 0;
}

.version-info h3 {
    font-size: 16px;
    font-weight: 800;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.version-number {
    color: var(--main);
    font-weight: 700;
    font-size: 13px;
    margin-top: 2px;
}

.version-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 7px;
}

.version-meta span {
    color: var(--muted);
    font-size: 11px;

    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.version-meta i {
    color: var(--main);
}


/* زر التحميل */

.version-download {
    border: 0;

    background: var(--main);
    color: white;

    border-radius: 13px;

    min-width: 105px;

    padding: 11px 14px;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    transition: .25s ease;
}

.version-download:hover {
    background: var(--main-dark);
    transform: translateY(-2px);
}


/* ================================
   لا يوجد
================================ */

.empty-state {
    display: none;

    text-align: center;

    background: white;

    border: 1px solid var(--border);

    border-radius: 22px;

    padding: 45px 20px;

    box-shadow: var(--shadow);
}

.empty-state i {
    font-size: 45px;
    color: var(--main);
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 18px;
}

.empty-state p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 5px;
}


/* ================================
   زر الرئيسية
================================ */

.home-button {
    width: fit-content;
    margin: 25px auto 0;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 11px 18px;

    border-radius: 14px;

    color: var(--main);
    background: white;

    border: 1px solid var(--border);

    text-decoration: none;

    font-size: 12px;
    font-weight: 700;

    box-shadow: 0 8px 25px rgba(0,0,0,.05);

    transition: .25s ease;
}

.home-button:hover {
    background: var(--main);
    color: white;
}


/* ================================
   الحقوق
================================ */

footer {
    text-align: center;

    color: #687888;

    font-size: 11px;

    margin-top: 25px;
}


/* ================================
   نافذة التحميل
================================ */

.download-modal {
    position: fixed;
    inset: 0;

    background: rgba(7,25,40,.48);

    backdrop-filter: blur(7px);

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 1000;
}

.download-modal.show {
    display: flex;
}

.download-modal-box {
    width: min(390px, 100%);

    background: white;

    border-radius: 25px;

    padding: 28px 22px;

    text-align: center;

    position: relative;

    box-shadow: 0 25px 80px rgba(0,0,0,.22);

    animation: modalIn .25s ease;
}

.modal-close {
    position: absolute;

    top: 12px;
    left: 12px;

    width: 35px;
    height: 35px;

    border: 0;

    border-radius: 50%;

    background: #f2f6f9;

    color: #657482;

    cursor: pointer;

    font-size: 15px;
}

.modal-logo {
    width: 75px;
    height: 75px;

    margin: 0 auto 12px;

    border-radius: 20px;

    background: #f4fbff;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.modal-logo img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}

.download-modal-box h3 {
    font-size: 19px;
}

.download-modal-box p {
    color: var(--muted);
    font-size: 12px;
    margin: 5px 0 18px;
}

.modal-download {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    background: var(--main);
    color: white;

    padding: 13px;

    border-radius: 14px;

    text-decoration: none;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    transition: .25s ease;
}

.modal-download:hover {
    background: var(--main-dark);
}


/* ================================
   Animation
================================ */

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(.94) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* ================================
   الجوال
================================ */

@media (max-width: 600px) {

    .versions-page {
        width: min(100% - 20px, 500px);
        padding-top: 18px;
    }

    .brand-logo {
        width: 55px;
        height: 55px;
    }

    .brand h1 {
        font-size: 19px;
    }

    .version-selector {
        gap: 8px;
    }

    .type-button {
        padding: 12px 8px;
        border-radius: 16px;
        gap: 7px;
    }

    .type-button i {
        font-size: 23px;
    }

    .type-button strong {
        font-size: 12px;
    }

    .type-button small {
        font-size: 9px;
    }

    .version-card {
        padding: 12px;
        gap: 10px;
        border-radius: 17px;
    }

    .version-icon {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    .version-info h3 {
        font-size: 13px;
    }

    .version-number {
        font-size: 11px;
    }

    .version-meta {
        gap: 5px;
    }

    .version-meta span {
        font-size: 9px;
    }

    .version-download {
        min-width: 72px;
        padding: 9px 8px;
        font-size: 10px;
    }

    .list-heading h2 {
        font-size: 18px;
    }
}


/* شاشات صغيرة جدًا */

@media (max-width: 380px) {

    .version-card {
        display: grid;
        grid-template-columns: 48px 1fr;
    }

    .version-download {
        grid-column: 1 / -1;
        width: 100%;
    }

}
/* =====================================================
   توحيد حجم بطاقات اختيار الإصدارات
===================================================== */

.version-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.type-button {
    min-height: 82px;
    width: 100%;
    justify-content: center;
}

.type-button span {
    min-width: 135px;
}

.type-button strong {
    white-space: nowrap;
}

.type-button small {
    white-space: nowrap;
}

/* الجوال */
@media (max-width: 600px) {

    .version-selector {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .type-button {
        min-height: 76px;
        padding: 10px 6px;
    }

    .type-button span {
        min-width: 0;
    }

    .type-button strong {
        font-size: 11px;
        white-space: nowrap;
    }

    .type-button small {
        font-size: 8px;
        white-space: nowrap;
    }

    .type-button i {
        flex-shrink: 0;
    }
}
/* =====================================================
   بطاقة حزمة التطبيق
===================================================== */

.app-package-card {
    width: min(100%, 1100px);
    margin: 25px auto 35px;

    display: flex;
    align-items: center;
    gap: 18px;

    padding: 20px 24px;

    background:
        linear-gradient(
            135deg,
            rgba(32, 150, 237, 0.12),
            rgba(255, 255, 255, 0.85)
        );

    border: 1px solid rgba(32, 150, 237, 0.18);

    border-radius: 22px;

    box-shadow:
        0 10px 35px rgba(32, 150, 237, 0.08);

    position: relative;
    overflow: hidden;

    box-sizing: border-box;
}


/* تأثير ضوء بالخلفية */

.app-package-card::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    left: -80px;
    top: -100px;

    background: rgba(32, 150, 237, 0.10);

    border-radius: 50%;

    pointer-events: none;
}


/* أيقونة أندرويد */

.package-icon {
    width: 58px;
    height: 58px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 17px;

    background: linear-gradient(
        135deg,
        #2096ed,
        #48b9ff
    );

    color: white;

    font-size: 27px;

    box-shadow:
        0 8px 20px rgba(32, 150, 237, 0.25);
}


/* المحتوى */

.package-content {
    flex: 1;
    min-width: 0;
}


/* العنوان */

.package-label {
    display: flex;
    align-items: center;
    gap: 7px;

    color: #2096ed;

    font-size: 13px;
    font-weight: 700;

    margin-bottom: 6px;
}


/* اسم الحزمة */

.package-name {
    direction: ltr;
    text-align: right;

    color: #1d2939;

    font-family:
        "Cairo",
        monospace;

    font-size: 17px;

    font-weight: 800;

    word-break: break-all;
}


/* الوصف */

.package-content p {
    margin: 5px 0 0;

    color: #7b8794;

    font-size: 12px;

    font-weight: 500;
}


/* الحالة */

.package-status {
    display: flex;
    align-items: center;
    gap: 6px;

    padding: 8px 13px;

    border-radius: 50px;

    background: rgba(34, 197, 94, 0.10);

    color: #16a34a;

    font-size: 12px;

    font-weight: 700;

    flex-shrink: 0;
}


/* =====================================================
   الجوال
===================================================== */

@media (max-width: 600px) {

    .app-package-card {

        margin: 20px 0 28px;

        padding: 16px;

        gap: 13px;

        border-radius: 18px;
    }


    .package-icon {

        width: 48px;
        height: 48px;

        border-radius: 14px;

        font-size: 22px;
    }


    .package-label {

        font-size: 11px;
    }


    .package-name {

        font-size: 14px;
    }


    .package-content p {

        font-size: 10px;

        line-height: 1.6;
    }


    .package-status {

        padding: 6px 9px;

        font-size: 10px;
    }

}


/* =====================================================
   الشاشات الصغيرة جدًا
===================================================== */

@media (max-width: 400px) {

    .app-package-card {

        align-items: flex-start;
    }


    .package-status {

        display: none;
    }

}