:root {
    --c-brand-alt: #850606;
    --c-balance-alt: #facc15;
    --c-accent: #28cb69;
    --c-success: rgb(24 135 83);
    --c-blas: rgb(12 107 249);
    --c-add: #ffc107;
    --c-warning: #dc3545;
    --c-danger: #ef4444;
    --c-odefd: #0d6efd;
    --c-body-bg: #ffffff;
    --c-border: #e5e7eb;
    --c-border-strong: #d1d5db;
    --c-text-main: #0f172a;
    --c-text-muted: #64748b;
    --c-header-bg: #082c49;
    --c-social-whatsapp: #00ad00;
    --c-social-telegram: #229ED9;
}

*, *::before, *::after { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box;
}

html, body {
    font-family: 'Tajawal', sans-serif;
    height: 100%;
}

::-webkit-scrollbar {
    display: none;
}


body {
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
        background: var(--c-body-bg);
        font-family: 'Tajawal', sans-serif;
        margin: 0;
    }


    /* ===== Navigation ===== */
    .sb-nav { list-style: none; padding: 20px 0; margin: 0; }

    .sb-nav__item { margin-bottom: 2px; }

    .sb-nav__link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 10px;
        min-height: 38px;
        border-radius: 10px;
        text-decoration: none;
        color: var(--c-header-bg);
        font-size: 13px;
        font-weight: 600;
        transition: background .15s, transform .1s;
    }

    .sb-nav__link:hover { background: #e8eef2; transform: translateY(-1px); }
    .sb-nav__link--active {
        background: #dce8f0;
        color: #0b3a5c;
        box-shadow: inset -3px 0 0 #0ea5e9;
    }
    .sb-nav__link--danger { color: var(--c-danger); }

    .sb-nav__ico {
        width: 28px;
        height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 28px;
    }

    .sb-nav__ico svg {
        width: 16px;
        height: 16px;
        display: block;
        fill: currentColor;
    }

    .sb-nav__label {
        display: inline-flex;
        align-items: center;
    }

    /* ===== Theme Toggle ===== */
    .sb-theme {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 4px 10px;
        margin-bottom: 40px;
        margin-top: 20px;
        margin-right: 35px;
    }

    .sb-theme__switch {
        position: relative;
        width: 52px;
        height: 28px;
        border: 0;
        background: 0 0;
        padding: 0;
        cursor: pointer;
        border-radius: 999px;
        outline: 0;
        flex-shrink: 0;
    }

    .sb-theme__track {
        position: absolute;
        inset: 0;
        background: #e5e7eb;
        border-radius: 999px;
        transition: background .25s;
    }

    .sb-theme__knob {
        position: absolute;
        top: 2px;
        left: 2px;
        width: 24px;
        height: 24px;
        background: #fff;
        border-radius: 50%;
        display: grid;
        place-items: center;
        box-shadow: 0 1px 4px rgba(0,0,0,.2);
        transition: transform .25s;
    }

    .sb-theme__switch.is-dark .sb-theme__track { background: #4b5563; }
    .sb-theme__switch.is-dark .sb-theme__knob { transform: translateX(24px); background: #1f2937; }

    .sb-theme__label {
        font-size: 13px;
        font-weight: 600;
        color: var(--c-text-main);
    }

    /* ===== Social Links ===== */
    .sb-social {
        display: flex;
        justify-content: center;
        gap: 16px;
        padding: 4px 10px;
    }

    .sb-social__link {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: transform .15s;
        opacity: .9;
    }

    .sb-social__link:hover { transform: translateY(-2px); opacity: 1; }

    .sb-social__link i { font-size: 1.3rem; }

    .sb-social__link i.bi-whatsapp { color: var(--c-social-whatsapp); }
    .sb-social__link i.fa-telegram { color: var(--c-social-telegram); }

    .sb-badge {
        position: absolute;
        top: -6px;
        right: -6px;
        min-width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--c-accent);
        color: #fff;
        font-size: 9px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 0 4px rgba(0,0,0,.3);
        pointer-events: none;
    }

    .sb-badge--icon { background: var(--c-social-telegram); font-size: 8px; }
    .sb-badge--icon i { font-size: 8px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .slider-container,
    .welcome-box-moving,
    .search-container,
    .categories-container {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .slide,
    .slide img {
        width: 100%;
    }

    .category-item {
        width: calc(50% - 10px);
    }

    .categories-container {
        gap: 14px;
        padding: 24px 12px;
        margin-bottom: 100px;
    }
}

@media (max-width: 768px) {
    .container,
    .main-wrapper {
        padding-left: 12px;
        padding-right: 12px;
    }

    .slider-container {
        height: 220px;
        margin-top: 16px;
        border-radius: 12px;
    }

    .slide,
    .slide img {
        border-radius: 12px;
    }

    .header-bar {
        padding: 8px 10px;
        gap: 8px;
        min-height: 52px;
    }

    .header-actions {
        gap: 8px;
    }

    .hdr-balance-text {
        font-size: 13px;
    }

    .hdr-menu {
        font-size: 20px;
    }

    .hdr-bell {
        font-size: 20px;
    }

    .hdr-vip img {
        width: 26px;
        height: 26px;
    }

    .logo-placeholder {
        width: 40px;
        height: 40px;
    }

    .logo-placeholder img {
        height: 38px;
    }

    .sidebar {
        max-width: min(280px, 88vw);
    }

    .sb-actions {
        gap: 48px;
    }

    .fab-container {
        bottom: 16px;
        left: 16px;
    }

    .fab-button {
        width: 52px;
        height: 52px;
        font-size: 24px;
    }

    .app-page {
        padding: 14px 4px 40px;
    }
}

@media (max-width: 480px) {
    .slider-container {
        height: 180px;
        margin-top: 12px;
    }

    .header-actions {
        gap: 6px;
    }

    .hdr-sep {
        height: 18px;
    }

    .hdr-balance {
        gap: 6px;
    }

    .hdr-balance-text {
        font-size: 12px;
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .category-name {
        font-size: 13px;
        margin-top: 6px;
    }

    .categories-container {
        gap: 10px;
        padding: 16px 8px;
    }

    .sb-actions {
        gap: 36px;
    }

    .sb-charge-btn {
        min-width: 88%;
        font-size: 12px;
        padding: 6px 12px;
    }

    .sb-currency-menu {
        width: 88%;
    }

    .moving-text {
        font-size: 13px;
    }
}

/* 1. البانر الإعلاني*/
.slider-container {
    width: 116%;
    height: 400px; 
    overflow: hidden;
    position: relative;
    border-radius: 15px;
    margin-right: 110px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.slide {
    display: none; 
    width: 86%;
    height: 100%;
    border-radius: 15px;
}

.slide img {
    width: 86%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

/* 2. الصندوق الأبيض للشريط الترحيبي المتحرك */
.welcome-box-moving {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    overflow: hidden; /* لإخفاء النص الخارج عن الحدود */
    position: relative;
    white-space: nowrap;
    margin-right: 110px;
    margin-left: 110px;
}

/* النص المتحرك داخل الشريحة */
.moving-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 12s linear infinite;
    font-size: 14px;
    color: #333;
}

/* أنيميشن حركة النص من اليمين لليسار */
@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}


/* حقل البحث  */
.search-container {
    position: relative;
    margin-bottom: 20px;
    margin-left: 110px;
    margin-right: 110px;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    background-color: #ededed;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    color: #666;
    outline: none;
    text-align: right;
}


/* 3.  الاقسام  */
.categories-container {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #888;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px dashed #ccc;
    margin-top: 10px;
    margin-bottom: 120px;
    margin-right: 110px;
    margin-left: 110px;
}

/* حاوية الأقسام */
.categories-container {
    display: flex;
    flex-wrap: wrap;       /* يسمح للعناصر بالنزول لسطر جديد */
    gap: 20px;             /* مسافة بين المربعات */
    justify-content: flex-start; /* يبدأ التوزيع من اليمين */
    width: 86%;
}

.category-item {
    width: calc(25% - 15px);
    box-sizing: border-box;
    text-align: center;
}

.category-circle {
    width: 90%;
    aspect-ratio: 1 / 1;    
    border-radius: 0;       
    overflow: hidden;
    background-color: #eee;
}

.category-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;      
    border-radius: 10px;     
}

/* للاقسام , تنسيق الاسم */
.category-name {
    color: #000000 !important; 
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
    display: block;
}

/* حركة التكبير عند الوقوف بالماوس */
.category-item:hover .category-circle {
    transform: scale(1.05);
    transition: 1s;
}


/* الزر العائم والأنيميشن */
.fab-container { 
    position: fixed; 
    bottom: 30px; 
    left: 30px; 
    z-index: 1000; 
}

.fab-button { 
    width: 60px; 
    height: 60px; 
    background-color: #6b0505; 
    color: white; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    font-size: 30px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    transition: all 0.3s ease; 
}

.fab-button.active {
    transform: rotate(135deg); 
    background-color: #dc3545;
}

#fabIcon { 
    transition: transform 0.3s ease; 
}

.fab-options { 
    display: none; 
    flex-direction: column; 
    gap: 15px; 
    margin-bottom: 80px; 
    position: absolute; 
    bottom: 0; 
}

.fab-container.open .fab-options { 
    display: flex; 
    animation: fadeIn 0.3s ease-in-out; 
}

/* أنيميشن ظهور الزر من الاسفل للاعلى */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* تنسيق الأزرار الدائرية */
.fab-option { 
    width: 50px; 
    height: 50px; 
    background: white; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-decoration: none; 
    color: #a82a2a; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.3); 
    font-size: 22px; 
    transition: all 0.3s ease; 
    opacity: 0; 
    animation: slideInOption 0.4s ease forwards; 
    animation-delay: calc(0.05s * var(--i)); 
}

.fab-option:hover { 
    transform: scale(1.1); 
    background-color: #f8f9fa; 
}

/* أنيميشن دخول الأزرار */
@keyframes slideInOption {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* الزر الرئيسي مع الظل الأحمر */
.fab-button {
    width: 60px;
    height: 60px;
    background-color: #6b0505;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    /* الظل الأحمر الخفيف */
    box-shadow: 0 4px 15px rgba(133, 6, 6, 0.5); 
    transition: all 0.6s ease; /* سرعة الحركة */
}

/* حركة الدوران عند الضغط */
.fab-container.open .fab-button {
    transform: rotate(180deg);
    background-color: #6b0505;
}

.fab-button i {
    transition: all 0.5s ease;
}


/* الهيدر — مطابق للصورة المرجعية */
header {
    background-color: #850606;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    color: white;
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    min-height: 56px;
    gap: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-direction: row;
}

.hdr-menu {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.hdr-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    direction: ltr;
}

.hdr-balance-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.hdr-plus {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    background-color: white;
    font-size: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.hdr-plus:hover {
    background: rgba(255, 255, 255, 0.768);
}

.hdr-vip img{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    width: 30px;
    border-radius: 50%;
    flex-direction: row;
    line-height: 1;
    direction: ltr;
}


.hdr-bell {
    font-size: 24px;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 4px;
    color: #607d8b;
}

.hdr-bell:hover {
    color: #607d8ba4;
}

.header-brand {
    display: flex;
    align-items: center;
}

.logo-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-placeholder img {
    height: 44px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 8px;
}

.container,
.main-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 20px;
    box-sizing: border-box;
    flex: 1 0 auto;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}




/* تنسيقات القائمة الجانبية العامة */
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar {
  z-index: 1000;
}

.sidebar {
    height: 100%;
    width: 0px;
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    background-color: #f5f5f5;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 10px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1 );
    z-index: 1000;
}

/* بطاقة المستخدم — مطابق للصورة المرجعية */
.sb-user-card {
    padding: 0px 16px 18px;
    text-align: center;
    border-bottom: none;
}

.sb-user-avatar {
    width: 72px;
    height: 72px;
    background: #000000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin: 10px auto 10px;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    overflow: hidden;
    flex-shrink: 0;
}

.sb-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sb-user-avatar:hover {
    opacity: 0.92;
}

.sb-user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: 12px;
    direction: rtl;
}

.sb-badge-vip {
    background: #ededed;
    padding: 2px 10px 2px 7px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 6px #0001;
    gap: 4px;
}

.sb-badge-vip i {
    color: #f5a623;
    font-size: 11px;
}

.sb-username {
    font-weight: 800;
    color: #111827;
    font-size: 15px;
}

.sb-userid {
    color: rgb(94 124 138);;
    font-size: 13px;
    font-weight: 500;
}

.sb-verified {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    flex-shrink: 0;
}

.sb-user-info-svg {
    fill: rgb(94 124 138);;
    color: #fff;
}
 

.sb-balance {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin: 8px 0 18px;
}

.sb-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 70px;
    margin-bottom: 18px;
    direction: ltr;
}

.sb-logout-form {
    display: flex;
    margin: 0;
    padding: 0;
}

.sb-action-btn {
    font-size: 20px;
    color: #111827;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.sb-action-fav {
    color: #da3545;
}

.sb-charge-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
    min-width: 78%;
    max-width: 92%;
    margin: 0 auto;
    padding: 7px 16px;
    background: #f8d4d4;
    color: #850606;
    border-radius: 999px;
    border: 1px solid #c45a5a;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Tajawal', sans-serif;
}

.sb-charge-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #850606;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.sb-charge-icon i {
    display: inline-block;
    transition: transform 0.55s ease;
}

.sb-charge-btn.is-spinning .sb-charge-icon i,
.sb-charge-icon.is-spinning i {
    animation: sb-currency-spin 0.6s ease;
}

@keyframes sb-currency-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sb-charge-btn:hover { background: #f3c0c0; }

/* قائمة خيارات العملة */
.sb-currency-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 6px 0 4px;
}

.sb-currency-toggle-row {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* الفاصل الأفقي في منتصف زر العملة */
.sb-currency-divider {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #d1d5db;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

.sb-currency-menu {
    list-style: none;
    margin: 10px 0 0;
    padding: 8px;
    width: 78%;
    max-width: 92%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sb-currency-menu[hidden] {
    display: none !important;
}

.sb-currency-option {
    width: 100%;
    display: block;
    text-align: center;
    padding: 10px 12px;
    margin: 0;
    border: 1px solid #e8a0a0;
    background: #fdecec;
    color: #850606;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.sb-currency-option:hover,
.sb-currency-option.is-active {
    background: #f8d4d4;
    border-color: #850606;
}

/* ===== Loading ===== */
.loading-screen {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-screen.is-visible {
    display: flex;
}

.spinner {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 4px solid #e8e8e8;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.spinner img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* ===== قسم المطور ===== */
.sb-developer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 16px 12px 100px;
    padding: 24px 16px;
    background: #ffffff;
    border-radius: 12px;
    text-align: center;
}

.sb-developer__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.sb-developer__logo {
    height: 88px;
    width: 88px;
    margin-bottom: 12px;
    object-fit: contain;
    background: transparent;
}

.sb-developer__text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    direction: ltr;
    font-size: 14px;
    line-height: 1.4;
}

.sb-developer__brand {
    font-size: 14px;
    color: #2196f3;
    font-weight: 700;
}

.sb-developer__tagline {
    color: #555555;
    font-size: 14px;
    font-weight: 500;
}

.sb-developer__copy {
    color: #555555;
    font-size: 13px;
    margin-top: 6px;
}

/* صفحات المحتوى المشتركة بعد تسجيل الدخول */
.app-page {
    padding: 18px 16px 40px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.app-page__title {
    font-size: 24px;
    font-weight: 800;
    color: #4f4f4f;
    margin-bottom: 14px;
    text-align: right;
}

.app-page__card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px 18px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
}

.sb-action-profile {
    color: #850606 !important;
}

.sb-action-profile:hover {
    color: #6b0505 !important;
}

/* فاصل رأسي في منتصف ارتفاع زر الرصيد/العملة */
.hdr-sep {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
    align-self: center;
}

.sb-nav__ico--api,
.sb-nav__ico--api svg {
    color: #16a34a !important;
    fill: #16a34a !important;
}

.category-item--link {
    text-decoration: none;
    color: inherit;
    display: block;
}
