/* =========================================
   VARIABLES & THEME SETTINGS (Premium UI)
   ========================================= */
:root {
    /* Dark gray background base (User requested instead of pure black) */
    --bg-main: #000000;
    --bg-secondary: #121212;
    
    /* Enhanced Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    
    /* Brand Colors */
    --color-primary: #5170FF;
    --color-primary-dark: #3d59e0;
    --color-primary-glow: rgba(81, 112, 255, 0.3);
    
    --color-text: #ffffff;
    --color-text-muted: #888888;
    --color-star: #ffea00;
    
    /* Layout */
    --nav-height: 58px;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Light Theme Variables - More vibrant */
[data-theme="light"] {
    --bg-main: #f8f9fa;
    --bg-secondary: #ffffff;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-hover: rgba(255, 255, 255, 1);
    --glass-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
    
    --color-primary: #5170FF;
    --color-primary-dark: #3d59e0;
    --color-primary-glow: rgba(81, 112, 255, 0.2);
    
    --color-text: #1a1a1a;
    --color-text-muted: #666666;
}

/* =========================================
   RESET & GLOBAL STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--color-text);
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Background Ambient Glow */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 60%);
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}
body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(100, 50, 255, 0.15) 0%, transparent 60%);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}

::-webkit-scrollbar { width: 0px; background: transparent; }

button {
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

img { max-width: 100%; display: block; }

#app-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    padding-bottom: calc(var(--nav-height) + 30px);
}

/* =========================================
   HEADER
   ========================================= */
#main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-smooth);
    direction: ltr;
}
[data-theme="light"] #main-header {
    background: rgba(248, 249, 250, 0.85);
}

/* Desktop & Tablet: extend header to full screen width using negative margins */
@media (min-width: 601px) {
    #main-header {
        width: 100vw;
        margin-right: calc(-50vw + 50%);
        margin-left: calc(-50vw + 50%);
        padding-left: 30px;
        padding-right: 30px;
    }
}

/* Add border when scrolling (handled by transparency) */
#main-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}



/* =========================================
   SITE LOGO
   ========================================= */
#site-logo {
    display: block;
    height: 48px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    image-rendering: auto;
    transform: translateZ(0);
    flex-shrink: 0;
}

/* Mobile: تصغير الهيدر وعناصره على الهواتف فقط */
@media (max-width: 600px) {
    /* تقليل ارتفاع وpadding الهيدر ليصبح بين 60px و70px */
    #main-header {
        padding: 8px 16px;
        min-height: 60px;
        max-height: 70px;
        height: auto;
        align-items: center;
    }

    /* تصغير الشعار بنسبة ~25% */
    #site-logo {
        max-height: 33px;
        max-width: 142px;
        height: auto;
        width: auto;
    }

    /* تصغير زر (+) ليتناسب مع الهيدر الأنحف */
    #open-add-request-modal {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px;
        min-height: 34px;
        border-radius: 50% !important;
        flex-shrink: 0;
    }

    /* تصغير الأيقونة داخل الزر */
    #open-add-request-modal svg {
        width: 17px !important;
        height: 17px !important;
    }
}




#page-title {
    font-size: 32px;
    font-weight: 800;

    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideInDown 0.5s var(--transition-bounce);
}

[data-theme="light"] #page-title {
    background: linear-gradient(135deg, #111 0%, #555 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    animation: fadeIn 0.8s ease;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: all var(--transition-bounce);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.icon-btn:hover { 
    background: var(--glass-hover); 
    transform: translateY(-3px) rotate(10deg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.2);
}

.header-profile img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    transition: transform var(--transition-bounce);
}
.header-profile:hover img {
    transform: scale(1.1);
    border-color: var(--color-primary);
}

/* =========================================
   TAB CONTENT & ANIMATIONS
   ========================================= */
.tab-content {
    display: none;
    padding: 0 20px;
    animation: slideUpFade 0.5s var(--transition-smooth) forwards;
}
.tab-content.active { display: block; }
#tab-home, #tab-games, #tab-apps { margin-top: 50px; }

.section-title {
    font-size: 26px;
    font-weight: 800;
    margin: 30px 0 20px 0;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    text-align: right;
    gap: 12px;
    direction: rtl;
    color: var(--color-text);
}
.section-title::before {
    content: '';
    display: block;
    width: 6px;
    height: 28px;
    background: var(--color-primary);
    border-radius: 3px;
    box-shadow: 0 0 12px var(--color-primary-glow);
    flex-shrink: 0;
}

/* =========================================
   CARDS GRID (Staggered Animation)
   ========================================= */
.cards-grid {
    display: grid;
    /* On mobile, cards are smaller, fit more */
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 12px;
    padding-bottom: 20px;
    direction: ltr;
}
@media (min-width: 480px) {
    .cards-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; }
}
@media (min-width: 768px) {
    .cards-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (min-width: 1024px) {
    .cards-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

.app-card {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    direction: ltr;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    height: auto;
    min-height: 100%;
}

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background: var(--glass-hover);
    border-color: rgba(255,255,255,0.15);
}
.app-card:active {
    transform: scale(0.97);
}

.app-logo-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.app-logo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    object-fit: cover;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* =========================================
   MODDED BADGE — شارة مهكر
   ========================================= */
.modded-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px 3px 5px;
    background: #16a34a;
    border: none;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    text-shadow: none;
    animation: none;
    z-index: 2;
    max-width: calc(100% - 8px);
    overflow: hidden;
}

.modded-badge svg {
    flex-shrink: 0;
    color: #ffffff;
    stroke: #ffffff;
    width: 8px;
    height: 8px;
}

[data-theme="light"] .modded-badge {
    background: #16a34a;
    color: #ffffff;
    text-shadow: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.app-info { 
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
}
.app-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
    line-height: 1.3;
    width: 100%;
}

#tab-home .app-title,
#home-more-page .app-title {
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.app-version {
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-top: auto;
    padding-top: 4px;
    text-transform: uppercase;
    text-align: left;
}

/* =========================================
   SEARCH SECTION
   ========================================= */
.search-container { margin-bottom: 25px; }
.search-input-wrapper { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 20px; color: var(--color-text-muted); transition: color var(--transition-fast); }

#search-input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--color-text);
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    transition: all var(--transition-bounce);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
    direction: ltr;
    text-align: left;
}
#search-input:focus { 
    outline: none; 
    border-color: var(--color-primary); 
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 8px 25px var(--color-primary-glow);
    transform: translateY(-2px);
}
[data-theme="light"] #search-input:focus { background: #fff; }
#search-input:focus + .search-icon { color: var(--color-primary); }

#clear-search { position: absolute; right: 20px; color: var(--color-text-muted); transition: color var(--transition-fast); }
#clear-search:hover { color: var(--color-text); }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    animation: fadeIn var(--transition-smooth);
}
.empty-state svg { color: var(--glass-border); width: 64px; height: 64px; }

/* =========================================
   BOTTOM NAVIGATION
   ========================================= */
#bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: rgba(5, 5, 5, 0.96);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
    direction: ltr;
}
[data-theme="light"] #bottom-nav { background: rgba(255, 255, 255, 0.96); }
[data-theme="dark"] #bottom-nav { background: rgba(5, 5, 5, 0.96); }

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--color-text-muted);
    transition: all var(--transition-bounce);
    flex: 1;
    padding: 5px 0;
    position: relative;
}
.nav-item span { font-size: 10.5px; font-weight: 600; }
.nav-item svg { width: 21px; height: 21px; transition: transform var(--transition-bounce); }

/* Active Indicator */
.nav-item::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 30px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 0 0 4px 4px;
    transition: transform var(--transition-bounce);
    box-shadow: 0 2px 10px var(--color-primary-glow);
}

.nav-item.active { color: var(--color-primary); }
.nav-item.active::before { transform: translateX(-50%) scaleX(1); }
.nav-item.active svg { transform: translateY(-2px) scale(1.1); filter: drop-shadow(0 4px 6px var(--color-primary-glow)); }
.nav-item:active { transform: scale(0.9); }

/* =========================================
   FULL SCREEN OVERLAYS (Detail & Timer)
   ========================================= */
.full-screen-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-main);
    z-index: 200;
    overflow-y: auto !important;
    touch-action: auto !important;
    pointer-events: auto !important;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    direction: rtl;
}

.top-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 210;
    direction: ltr;
}

.back-btn {
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white; /* Always white due to banner */
    transition: all var(--transition-bounce);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.back-btn:hover { 
    transform: scale(1.1) translateX(2px); 
    background: rgba(0,0,0,0.6);
}
.back-btn svg {
    transform: scaleX(-1);
}

/* Detail Content */
.detail-banner {
    width: 100%;
    height: 350px;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    animation: scaleDown 1s ease-out;
}

.detail-header {
    padding: 0 20px;
    margin-top: -80px;
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    direction: ltr;
    gap: 20px;
    align-items: flex-end;
}

.detail-logo {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    border: 3px solid var(--bg-main);
    background: var(--bg-main);
    /* animation removed to fix GPU ghosting on Android */
}

.detail-title-group { padding-bottom: 10px; /* animation removed to fix GPU ghosting on Android */ text-align: left; direction: ltr; }
.detail-title { font-size: 24px; font-weight: 700; font-family: 'Tajawal', sans-serif; margin-bottom: 4px; }
.detail-developer { color: #00bf63; font-weight: 600; font-size: 15px; margin-bottom: 10px; }

.btn-inline-download {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #3d59e0 100%);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 800;
    transition: all var(--transition-bounce);

}
.btn-inline-download:hover {
    transform: translateY(-3px) scale(1.05);
}
.btn-inline-download:active { transform: scale(0.95); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 30px 20px;
    /* animation removed to fix GPU ghosting on Android */
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    direction: rtl;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary-glow);
}
.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(81, 112, 255, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-text);
}
.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* Screenshots */
.screenshots-container { padding: 0 20px; margin-bottom: 35px; /* animation removed to fix GPU ghosting on Android */ }
.screenshots-scroll {
    display: flex;
    align-items: center;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 15px;
    scrollbar-width: none; /* Firefox */
}
.screenshots-scroll::-webkit-scrollbar { display: none; } /* Chrome */
.screenshot-img {
    max-height: 400px;
    max-width: 92vw;
    width: auto;
    height: auto;
    flex-shrink: 0;
    border-radius: 12px;
    scroll-snap-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    transition: transform var(--transition-smooth);
    background-color: transparent;
    cursor: pointer;
}

/* =========================================
   LIGHTBOX OVERLAY
   ========================================= */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}
.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-top-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
}
.lightbox-counter {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 20px;

}
.lightbox-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}
.lightbox-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}
.lightbox-img-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 70px; /* Space for desktop arrows */
}
.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    user-select: none;
    animation: scaleIn 0.3s ease-out;
}
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10000;
}
.lightbox-nav-btn:hover { 
    background: rgba(255,255,255,0.3); 
    transform: translateY(-50%) scale(1.05);
}
.lightbox-prev { right: 20px; }
.lightbox-next { left: 20px; }

@media (max-width: 768px) {
    .lightbox-img-container { padding: 0 10px; }
    .lightbox-nav-btn { display: none; } /* Hide arrows on mobile, rely on swipe */
}
.screenshot-img:hover { transform: scale(1.02); }

/* Description */
.description-container { padding: 0 20px; margin-bottom: 40px; /* animation removed to fix GPU ghosting on Android */ }

.desc-heading {
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    padding: 14px 20px 14px 14px;
    border-radius: 10px;
    margin: 40px 0 20px 0;
    font-family: 'Tajawal', sans-serif;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.6;
    color: var(--color-text);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    direction: rtl;
    text-align: right;
}

.desc-heading::before {
    content: '';
    position: absolute;
    right: -1px;
    top: -1px;
    bottom: -1px;
    width: 6px;
    background: var(--color-primary);
    border-radius: 0 10px 10px 0;
    box-shadow: -2px 0 12px var(--color-primary-glow);
}

[data-theme="light"] .desc-heading {
    background: #e8e8e8;
    border-color: #d1d1d1;
    color: #000000;
}

.description-text {
    font-family: 'Tajawal', sans-serif;
    font-size: 17.5px;
    line-height: 1.9;
    color: var(--color-text);
    opacity: 0.95;
    direction: rtl;
    text-align: right;
    font-weight: 500;
}

.description-text p {
    margin-bottom: 22px;
}

.description-text p:last-child {
    margin-bottom: 0;
}

.description-text ul {
    margin-bottom: 25px;
    padding-right: 25px;
    list-style-type: disc;
}

.description-text li {
    margin-bottom: 12px;
    line-height: 1.9;
}

.description-text li::marker {
    color: var(--color-primary);
}

.description-text strong {
    font-weight: 800;
    color: var(--color-text);
}

/* Auto-detected headings inside description */
.desc-auto-heading {
    position: relative;
    font-family: 'Tajawal', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    padding: 12px 20px 12px 12px;
    border-radius: 10px;
    direction: rtl;
    text-align: right;
    margin: 30px 0 12px 0;
    line-height: 1.5;

    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.desc-auto-heading::before {
    content: '';
    position: absolute;
    right: -1px;
    top: -1px;
    bottom: -1px;
    width: 6px;
    background: var(--color-primary);
    border-radius: 0 10px 10px 0;
    box-shadow: -2px 0 12px var(--color-primary-glow);
}

[data-theme="light"] .desc-auto-heading {
    background: #e8e8e8;
    border-color: #d1d1d1;
    color: #000000;
}

/* Download Section */
.download-section { padding: 0 20px 50px 20px; /* animation removed to fix GPU ghosting on Android */ }

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, #3d59e0 100%);
    color: #fff;
    padding: 18px;
    border-radius: var(--radius-lg);
    font-size: 18px;
    font-weight: 800;
    transition: all var(--transition-bounce);
    text-align: center;
    display: block;
}
.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
}
.btn-primary:active { transform: scale(0.98); }

/* Override: btn-primary inside modals — no glow, no lift, clean style */
.update-modal-overlay .btn-primary,
.update-modal-box .btn-primary {
    background: var(--color-primary);
    box-shadow: none;
    transition: background 0.2s ease, transform 0.15s ease;
}
.update-modal-overlay .btn-primary:hover,
.update-modal-box .btn-primary:hover {
    transform: none;
    background: var(--color-primary-dark);
}
.update-modal-overlay .btn-primary:active,
.update-modal-box .btn-primary:active {
    transform: scale(0.98);
    background: var(--color-primary-dark);
}

.btn-secondary {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--color-text);
    padding: 18px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 700;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all var(--transition-bounce);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}
.btn-secondary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}
.btn-secondary:hover::after { left: 200%; }
.btn-secondary:hover {
    background: var(--glass-hover);
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.2);
}

/* =========================================
   TIMER PAGE (Countdown)
   ========================================= */
.timer-content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at center, rgba(81,112,255,0.05) 0%, transparent 70%);
}

.timer-game-info {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 450px;
    margin-bottom: 30px;
    text-align: center;
    animation: slideInDown 0.6s var(--transition-bounce);
}

.ad-notice-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    margin-bottom: 30px;
    text-align: center;
    font-family: 'Tajawal', sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.8;
    color: var(--color-text);
    direction: rtl;
    max-width: 90%;
    animation: scaleIn 0.8s var(--transition-bounce);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.timer-game-logo {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(81,112,255,0.2);
    border: 2px solid var(--glass-border);
    margin: 0 auto 20px auto;
}
.timer-game-title { font-size: 26px; font-weight: 800; font-family: 'Tajawal', sans-serif; margin-bottom: 5px; }

.timer-circle-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 30px;
    animation: scaleIn 0.8s var(--transition-bounce);
}
.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 15px var(--color-primary-glow));
}
.timer-bg {
    fill: none;
    stroke: var(--glass-border);
    stroke-width: 8;
}
.timer-progress {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283; /* 2 * PI * 45 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: 800;
    color: var(--color-primary);
    text-shadow: 0 0 20px var(--color-primary-glow);
}

.timer-status {
    color: var(--color-text-muted);
    font-family: 'Tajawal', sans-serif;
    font-size: 17px;
    font-weight: 500;

    animation: pulseText 2s infinite ease-in-out;
}

/* =========================================
   DOWNLOAD CARD (New Progress Bar Style)
   ========================================= */
.dl-card {
    width: 100%;
    max-width: 480px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 28px 28px 32px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    direction: rtl;
    animation: scaleIn 0.5s var(--transition-bounce);
}

.dl-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Tajawal', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 18px;
}

.dl-card-header svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.dl-card-divider {
    height: 1px;
    background: var(--glass-border);
    margin-bottom: 24px;
    border-radius: 2px;
}

/* State 1 */
.dl-hint-text {
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 22px;
    line-height: 1.7;
}

.dl-start-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #3d59e0 100%);
    color: #fff;
    border-radius: var(--radius-full);
    font-family: 'Tajawal', sans-serif;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: all var(--transition-bounce);
}

.dl-start-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.dl-start-btn:active { transform: scale(0.97); }

/* State 2 */
.dl-status-text {
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 20px;
    animation: pulseText 2s infinite ease-in-out;
}

.dl-progress-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.dl-progress-bar {
    flex: 1;
    height: 12px;
    background: var(--glass-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.dl-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), #00e676);
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px var(--color-primary-glow);
    transition: width 1s linear;
}

.dl-percent {
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--color-primary);
    min-width: 44px;
    text-align: left;
}

.dl-time-text {
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 4px;
}

/* State 3 */
.dl-success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--color-primary);
    animation: scaleIn 0.5s var(--transition-bounce);
    filter: drop-shadow(0 0 12px var(--color-primary-glow));
}

.dl-ready-text {
    font-family: 'Tajawal', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 20px;
}

/* Final download container: flex column for multiple buttons */
#final-download-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    animation: scaleIn 0.4s var(--transition-bounce);
}

/* Primary final download button — bold gradient */
.dl-final-btn-primary {
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: var(--radius-lg);
    border: none;
    padding: 15px 20px;
    gap: 15px;
    transition: all var(--transition-bounce);
    background: linear-gradient(135deg, var(--color-primary), #3a56e0);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    cursor: pointer;
    text-decoration: none;
}

.dl-final-btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.dl-final-btn-primary:active {
    transform: scale(0.97);
}

/* Secondary final download button — glass style */
.dl-final-btn-secondary {
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(81, 112, 255, 0.35);
    padding: 15px 20px;
    gap: 15px;
    transition: all var(--transition-bounce);
    background: rgba(81, 112, 255, 0.1);
    box-shadow: none;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
}

.dl-final-btn-secondary:hover {
    transform: translateY(-3px) scale(1.02);
    background: rgba(81, 112, 255, 0.18);
    border-color: rgba(81, 112, 255, 0.55);
    box-shadow: 0 8px 25px rgba(81, 112, 255, 0.15);
}

.dl-final-btn-secondary:active {
    transform: scale(0.97);
}

/* Icon circles */
.dl-final-btn-icon {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.dl-final-btn-icon-alt {
    background: rgba(81, 112, 255, 0.25);
    color: var(--color-primary);
}

/* Button text block */
.dl-final-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    flex: 1;
}

.dl-final-btn-title {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    line-height: 1.2;
}

.dl-final-btn-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Tajawal', sans-serif;
}

/* Secondary button text colors */
.dl-final-btn-title-alt {
    color: var(--color-text);
}

.dl-final-btn-sub-alt {
    color: var(--color-text-muted);
}

[data-theme="light"] .dl-final-btn-title-alt {
    color: var(--color-text);
}

/* Legacy fallback */
#final-download-container .btn-primary,
#final-download-container a.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    font-family: 'Tajawal', sans-serif;
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    border-radius: var(--radius-full);
    box-shadow: 0 6px 20px var(--color-primary-glow);
}

/* =========================================
   RESPONSIVE — Final Download Buttons
   ========================================= */
@media (max-width: 400px) {
    .dl-final-btn-primary,
    .dl-final-btn-secondary {
        padding: 13px 14px;
        gap: 12px;
    }
    .dl-final-btn-icon {
        width: 40px;
        height: 40px;
    }
    .dl-final-btn-icon svg {
        width: 19px;
        height: 19px;
    }
    .dl-final-btn-title {
        font-size: 15px;
    }
    .dl-final-btn-sub {
        font-size: 11px;
    }
}

@media (min-width: 600px) {
    .dl-final-btn-primary,
    .dl-final-btn-secondary {
        padding: 17px 25px;
        gap: 18px;
    }
    .dl-final-btn-icon {
        width: 50px;
        height: 50px;
    }
    .dl-final-btn-title {
        font-size: 18px;
    }
    .dl-final-btn-sub {
        font-size: 13px;
    }
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUpFade {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes slideInDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes scaleDown {
    from { transform: scale(1.1); }
    to { transform: scale(1); }
}
@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes pulseText {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* =========================================
   GLOBAL SEARCH BAR (always at top)
   ========================================= */
#global-search-bar {
    padding: 0 20px;
    margin-top: 16px;
    margin-bottom: 18px;
    position: relative;
    z-index: 9;
}

@media (max-width: 600px) {
    #global-search-bar {
        margin-top: 20px;
        margin-bottom: 14px;
    }
}


#global-search-input {
    width: 100%;
    padding: 15px 20px 15px 52px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--color-text);
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    transition: all var(--transition-bounce);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
    direction: ltr;
    text-align: left;
}
#global-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}
[data-theme="light"] #global-search-input:focus { background: var(--glass-bg); }

#global-clear-search {
    position: absolute;
    right: 20px;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}
#global-clear-search:hover { color: var(--color-text); }

/* Global search results wrapper */
#global-search-results-wrap {
    padding: 0 20px;
}

.hidden { display: none !important; }

/* =========================================
   FAQ SECTION (Timer Page)
   ========================================= */
.faq-container {
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    direction: rtl;
    /* animation removed to fix GPU ghosting on Android */
}


.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.faq-item.active {
    border-color: var(--color-primary-glow);
    background: rgba(81, 112, 255, 0.03);
}

[data-theme="light"] .faq-item.active {
    background: rgba(81, 112, 255, 0.03);
}

.faq-question {
    width: 100%;
    text-align: right;
    padding: 18px 20px;
    font-family: 'Tajawal', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color var(--transition-fast);
}

.faq-item.active .faq-question {
    color: var(--color-primary);
}

.faq-icon {
    transition: transform var(--transition-bounce);
    color: var(--color-text-muted);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-smooth);
}

.faq-answer-content {
    padding: 0 20px 20px 20px;
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    line-height: 1.9;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* =========================================
   UPDATE REQUEST MODAL & BUTTON
   ========================================= */
.btn-update-request {
    width: 100%;
    background: #ff751f;
    color: #fff;
    padding: 16px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 800;
    font-family: 'Tajawal', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: opacity var(--transition-fast);
    box-shadow: none;
    border: none;
}

.btn-update-request:hover {
    opacity: 0.88;
}

.btn-update-request:active {
    opacity: 0.75;
}

.update-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    touch-action: none;
    overscroll-behavior: none;
}

.update-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.update-modal-box {
    background: var(--bg-main);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    touch-action: auto;
    position: relative;
    text-align: center;
    direction: rtl;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.update-modal-overlay.active .update-modal-box {
    transform: translateY(0) scale(1);
}

.update-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.update-modal-close:hover {
    color: var(--color-text);
    background: rgba(255,255,255,0.1);
    transform: rotate(90deg);
}

.update-modal-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 117, 31, 0.1);
    color: #ff751f;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.update-modal-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--color-text);
}

.update-modal-text {
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
}

.btn-update-submit {
    width: 100%;
    background: var(--color-primary);
    color: #fff;
    padding: 16px;
    border-radius: var(--radius-lg);
    font-size: 17px;
    font-weight: 800;
    font-family: 'Tajawal', sans-serif;
    transition: background 0.2s ease, transform 0.15s ease;
    border: none;
    box-shadow: none;
    cursor: pointer;
}

.btn-update-submit:hover {
    background: var(--color-primary-dark);
}

.btn-update-submit:active {
    transform: scale(0.98);
    background: var(--color-primary-dark);
}

/* =========================================
   SCROLL TO TOP BUTTON
   ========================================= */
#scroll-top-btn {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transform: translateY(16px) scale(0.9);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 0;
}

#scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

#scroll-top-btn .progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
    border-radius: 50%;
    filter: drop-shadow(0 0 4px var(--color-primary-glow));
}

.progress-ring-bg {
    stroke: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .progress-ring-bg {
    stroke: rgba(0, 0, 0, 0.1);
}

.progress-ring-fill {
    stroke: var(--color-primary);
    transition: stroke-dashoffset 0.08s linear;
}

.scroll-top-arrow {
    position: relative;
    z-index: 1;
    color: var(--color-primary);
    filter: drop-shadow(0 1px 3px rgba(81,112,255,0.5));
}

/* =========================================
   SOCIAL MEDIA SECTION
   ========================================= */
.social-section {
    text-align: center;
    margin: 10px 20px 20px;
    padding: 20px 20px;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.social-section-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-muted);
    margin: 0 0 16px 0;

}

.social-icons-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    text-decoration: none;
    flex-shrink: 0;
}

.social-icon-link svg {
    display: block;
    width: 40px;
    height: 40px;
}

/* TikTok icon — use brand color */
.social-icon-link[aria-label="TikTok"] svg {
    color: #ffffff;
}

@media (max-width: 400px) {
    .social-icons-row {
        gap: 24px;
    }
    .social-icon-link {
        width: 44px;
        height: 44px;
    }
    .social-icon-link svg {
        width: 36px;
        height: 36px;
    }
}

/* =========================================
   LOAD MORE BUTTON
   ========================================= */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px 24px;
    width: 100%;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 36px;
    background: transparent;
    border: none;
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-family: 'Tajawal', 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: color var(--transition-fast);
    box-shadow: none;

    min-width: 160px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.load-more-btn:hover {
    background: transparent;
    color: var(--color-primary);
    box-shadow: none;
    border: none;
}

.load-more-btn:active {
    background: transparent;
    box-shadow: none;
    border: none;
}

.load-more-icon {
    transition: transform var(--transition-smooth);
    flex-shrink: 0;
}

.load-more-btn:hover .load-more-icon {
    transform: translateY(3px);
}

/* =========================================
   CARD FADE-IN ANIMATION
   ========================================= */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.card-fade-in {
    animation: cardFadeIn 0.35s ease both;
}

/* Responsive tweaks for load-more */
@media (max-width: 480px) {
    .load-more-btn {
        font-size: 14px;
        padding: 12px 28px;
        min-width: 140px;
    }
}

/* =========================================
   ROUTER LOADING OVERLAY
   يظهر عند فتح رابط مباشر /game/... /app/...
   ========================================= */
#router-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#router-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.router-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.router-loading-spinner {
    animation: routerSpin 0.9s linear infinite;
    transform-origin: center;
}

@keyframes routerSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.router-loading-text {
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    color: var(--color-text-muted);
    margin: 0;

}

/* =========================================
   ROUTER 404 TOAST
   يظهر عند عدم وجود العنصر المطلوب
   ========================================= */
.router-404-toast {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 80, 80, 0.35);
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 90vw;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    white-space: nowrap;
}

.router-404-toast svg {
    stroke: #ff6b6b;
    flex-shrink: 0;
}

.router-404-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

[data-theme="light"] .router-404-toast {
    background: rgba(255, 255, 255, 0.95);
    color: #222;
    border-color: rgba(255, 80, 80, 0.25);
}

/* =========================================
   SAFE & SECURE BOX (TIMER PAGE)
   ========================================= */
.safe-secure-box {
    background-color: rgba(0, 191, 99, 0.08);
    border: 1px solid rgba(0, 191, 99, 0.4);
    border-radius: var(--radius-lg, 24px);
    padding: 20px;
    margin: 20px 20px 30px;
    text-align: right;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    direction: rtl;
}
.safe-secure-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.safe-secure-title {
    color: #00bf63;
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    font-family: 'Tajawal', sans-serif;
}
.safe-secure-text {
    color: var(--color-text-muted, #888);
    font-size: 14.5px;
    line-height: 1.7;
    margin: 0;
    font-family: 'Tajawal', sans-serif;
}

/* =========================================
   DOWNLOAD PAGE REDESIGN
   ========================================= */
.detail-redesign-header {
    text-align: center;
    padding: 30px 20px 10px;
    /* animation removed to fix GPU ghosting on Android */
}

.detail-redesign-logo {
    width: 140px;
    height: 140px;
    border-radius: 35px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 3px solid rgba(255, 255, 255, 0.05);
    margin: 0 auto 20px auto;
    object-fit: cover;
}

.detail-redesign-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--color-text);
    font-family: 'Tajawal', sans-serif;
}

.detail-redesign-version {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.stats-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 15px 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    /* animation removed to fix GPU ghosting on Android */
}

.stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.stat-chip-icon {
    color: var(--color-primary);
}

.stat-chip-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.stat-chip-divider {
    width: 1px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .stat-chip-divider {
    background: rgba(0, 0, 0, 0.1);
}

.popularity-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin: 20px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    /* animation removed to fix GPU ghosting on Android */
}


.section-divider-wrap {
    display: flex;
    align-items: center;
    margin: 30px 20px 20px;
    gap: 15px;
    /* animation removed to fix GPU ghosting on Android */
}

.section-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

[data-theme="light"] .section-divider-line {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
}

.section-divider-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-text);
    margin: 0;
}

.section-divider-icon {
    color: var(--color-primary);
    display: flex;
}

.download-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin: 0 20px;
    /* animation removed to fix GPU ghosting on Android */
}

/* === Badge (MOD / APK) فوق الزر === */
.dl-btn-badge {
    position: absolute;
    top: -6px;
    left: -4px;
    background: #ffffff;
    color: #111111;
    font-size: 9.5px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;

    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1.4;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    white-space: nowrap;
}

.download-btn-primary, .download-btn-secondary {
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 12px;
    border: none;
    padding: 10px 14px;
    gap: 10px;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
    cursor: pointer;
    position: relative; /* needed for badge positioning */
    overflow: visible;
}

.download-btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #3a56e0);
}

.download-btn-secondary {
    background: rgba(81, 112, 255, 0.1);
    border: 1px solid rgba(81, 112, 255, 0.3);
    box-shadow: none;
}

.download-btn-primary:hover, .download-btn-secondary:hover {
    transform: translateY(-2px) scale(1.01);
}

.download-btn-primary:active, .download-btn-secondary:active {
    transform: scale(0.97);
}

.dl-btn-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.download-btn-secondary .dl-btn-icon {
    background: rgba(81, 112, 255, 0.2);
    color: var(--color-primary);
}

.dl-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    flex: 1;
}

.dl-btn-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    line-height: 1.2;
}

[data-theme="light"] .dl-btn-title {
    color: #222;
}

[data-theme="light"] .download-btn-primary .dl-btn-title {
    color: #fff;
}

/* Responsive: on desktop slightly bigger */
@media (min-width: 600px) {
    .download-btn-primary, .download-btn-secondary {
        padding: 11px 16px;
        gap: 12px;
    }
    .dl-btn-icon {
        width: 36px;
        height: 36px;
    }
    .dl-btn-title {
        font-size: 14.5px;
    }
}

.share-buttons-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 0 20px 20px;
    /* animation removed to fix GPU ghosting on Android */
}

.share-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all var(--transition-bounce);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-5px) scale(1.1);
}

.share-tg { background: linear-gradient(135deg, #0088cc, #00aaff); }
.share-wa { background: linear-gradient(135deg, #25D366, #128C7E); }
.share-fb { background: linear-gradient(135deg, #1877F2, #3b5998); }
.share-x { background: linear-gradient(135deg, #0f1419, #272c30); }
.share-copy { background: linear-gradient(135deg, #8e44ad, #9b59b6); }

/* Remove detail banner if it exists in old layout */
.detail-banner {
    display: none !important;
}

/* =========================================
   STORE DOWNLOAD BUTTONS (Google Play / App Store)
   ========================================= */
.download-btn-playstore,
.download-btn-appstore {
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 12px;
    border: none;
    padding: 10px 14px;
    gap: 10px;
    transition: all var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
    position: relative;
    overflow: visible;
}

.download-btn-playstore {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(66, 133, 244, 0.4);
}

.download-btn-appstore {
    background: linear-gradient(135deg, #1c1c1e, #2c2c2e);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.download-btn-playstore:hover,
.download-btn-appstore:hover {
    transform: translateY(-2px) scale(1.01);
}

.download-btn-playstore:active,
.download-btn-appstore:active {
    transform: scale(0.97);
}

/* Desktop slightly bigger */
@media (min-width: 600px) {
    .download-btn-playstore,
    .download-btn-appstore {
        padding: 11px 16px;
        gap: 12px;
    }
}

[data-theme="light"] .download-btn-playstore {
    background: linear-gradient(135deg, #e8f0fe, #d2e3fc);
    border-color: rgba(66, 133, 244, 0.5);
}

[data-theme="light"] .download-btn-playstore .dl-btn-title {
    color: #1a73e8 !important;
}

[data-theme="light"] .download-btn-appstore {
    background: linear-gradient(135deg, #f5f5f7, #e8e8ed);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .download-btn-appstore .dl-btn-title {
    color: #1d1d1f !important;
}

/* =========================================
   SHORT DESCRIPTION INFO BOX
   ========================================= */
.short-desc-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 20px 16px;
    padding: 14px 18px;
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid rgba(46, 213, 115, 0.35);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 15px rgba(46, 213, 115, 0.08);
    color: var(--color-text);
    font-family: 'Tajawal', sans-serif;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.7;
    direction: rtl;
    text-align: right;
}

.short-desc-box svg {
    color: #2ed573;
    flex-shrink: 0;
    margin-top: 2px;
}

[data-theme="light"] .short-desc-box {
    background: rgba(46, 213, 115, 0.08);
    border-color: rgba(46, 213, 115, 0.4);
    color: #1a1a2e;
}

/* =========================================
   UNIFIED BUTTON DESIGN (From Download Buttons)
   ========================================= */
.btn-primary,
.btn-update-submit,
.dl-start-btn,
.btn-inline-download,
.unified-btn,
.update-modal-close,
.back-btn,
.lightbox-close,
#global-clear-search,
.icon-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    border: none !important;
    padding: 10px 14px !important;
    gap: 10px !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    font-family: 'Tajawal', sans-serif !important;
    transition: all var(--transition-fast) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22) !important;
    cursor: pointer !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    width: auto !important;
    height: auto !important;
    box-sizing: border-box !important;
    background-color: var(--button-bg, inherit);
}

/* Main text buttons that should take full width */
.btn-primary,
.btn-update-submit,
.dl-start-btn,
#adblock-modal-confirm {
    width: 100% !important;
}

/* Hover effect */
.btn-primary:hover,
.btn-update-submit:hover,
.dl-start-btn:hover,
.btn-inline-download:hover,
.unified-btn:hover,
.update-modal-close:hover,
.back-btn:hover,
.lightbox-close:hover,
#global-clear-search:hover,
.icon-btn:hover {
    transform: translateY(-2px) scale(1.01) !important;
}

/* Active effect */
.btn-primary:active,
.btn-update-submit:active,
.dl-start-btn:active,
.btn-inline-download:active,
.unified-btn:active,
.update-modal-close:active,
.back-btn:active,
.lightbox-close:active,
#global-clear-search:active,
.icon-btn:active {
    transform: scale(0.97) !important;
}

/* Desktop Sizing */
@media (min-width: 600px) {
    .btn-primary,
    .btn-update-submit,
    .dl-start-btn,
    .btn-inline-download,
    .unified-btn,
    .update-modal-close,
    .back-btn,
    .lightbox-close,
    #global-clear-search,
    .icon-btn {
        padding: 11px 16px !important;
        gap: 12px !important;
        font-size: 14.5px !important;
    }
}

/* Fix SVG sizing to match download buttons icon size inside (20x20 or 22x22) */
.btn-primary svg,
.btn-update-submit svg,
.dl-start-btn svg,
.btn-inline-download svg,
.unified-btn svg,
.update-modal-close svg,
.back-btn svg,
.lightbox-close svg,
#global-clear-search svg,
.icon-btn svg {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0 !important;
}

/* Restore scroll-to-top button to its original circular design */
#scroll-top-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    gap: 0 !important;
}
#scroll-top-btn:hover {
    transform: translateY(-2px) scale(1.05) !important;
}
#scroll-top-btn:active {
    transform: scale(0.95) !important;
}
#scroll-top-btn svg.progress-ring {
    display: block !important;
}
#scroll-top-btn svg {
    width: auto !important;
    height: auto !important;
}

/* Remove default overrides for certain states */
.update-modal-overlay .btn-primary,
.update-modal-box .btn-primary {
    box-shadow: 0 4px 16px rgba(0,0,0,0.22) !important;
}
.download-btn-appstore {
    background: linear-gradient(135deg, #1c1c1e, #2c2c2e);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.download-btn-playstore:hover,
.download-btn-appstore:hover {
    transform: translateY(-2px) scale(1.01);
}

.download-btn-playstore:active,
.download-btn-appstore:active {
    transform: scale(0.97);
}

/* Desktop slightly bigger */
@media (min-width: 600px) {
    .download-btn-playstore,
    .download-btn-appstore {
        padding: 11px 16px;
        gap: 12px;
    }
}

[data-theme="light"] .download-btn-playstore {
    background: linear-gradient(135deg, #e8f0fe, #d2e3fc);
    border-color: rgba(66, 133, 244, 0.5);
}

[data-theme="light"] .download-btn-playstore .dl-btn-title {
    color: #1a73e8 !important;
}

[data-theme="light"] .download-btn-appstore {
    background: linear-gradient(135deg, #f5f5f7, #e8e8ed);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .download-btn-appstore .dl-btn-title {
    color: #1d1d1f !important;
}

/* =========================================
   SHORT DESCRIPTION INFO BOX
   ========================================= */
.short-desc-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 20px 16px;
    padding: 14px 18px;
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid rgba(46, 213, 115, 0.35);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 15px rgba(46, 213, 115, 0.08);
    color: var(--color-text);
    font-family: 'Tajawal', sans-serif;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.7;
    direction: rtl;
    text-align: right;
}

.short-desc-box svg {
    color: #2ed573;
    flex-shrink: 0;
    margin-top: 2px;
}

[data-theme="light"] .short-desc-box {
    background: rgba(46, 213, 115, 0.08);
    border-color: rgba(46, 213, 115, 0.4);
    color: #1a1a2e;
}

/* =========================================
   UNIFIED BUTTON DESIGN (From Download Buttons)
   ========================================= */
.btn-primary,
.btn-update-submit,
.dl-start-btn,
.btn-inline-download,
.unified-btn,
.update-modal-close,
.back-btn,
.lightbox-close,
#global-clear-search,
.icon-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    border: none !important;
    padding: 10px 14px !important;
    gap: 10px !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    font-family: 'Tajawal', sans-serif !important;
    transition: all var(--transition-fast) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22) !important;
    cursor: pointer !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    width: auto !important;
    height: auto !important;
    box-sizing: border-box !important;
    background-color: var(--button-bg, inherit);
}

/* Main text buttons that should take full width */
.btn-primary,
.btn-update-submit,
.dl-start-btn,
#adblock-modal-confirm {
    width: 100% !important;
}

/* Hover effect */
.btn-primary:hover,
.btn-update-submit:hover,
.dl-start-btn:hover,
.btn-inline-download:hover,
.unified-btn:hover,
.update-modal-close:hover,
.back-btn:hover,
.lightbox-close:hover,
#global-clear-search:hover,
.icon-btn:hover {
    transform: translateY(-2px) scale(1.01) !important;
}

/* Active effect */
.btn-primary:active,
.btn-update-submit:active,
.dl-start-btn:active,
.btn-inline-download:active,
.unified-btn:active,
.update-modal-close:active,
.back-btn:active,
.lightbox-close:active,
#global-clear-search:active,
.icon-btn:active {
    transform: scale(0.97) !important;
}

/* Desktop Sizing */
@media (min-width: 600px) {
    .btn-primary,
    .btn-update-submit,
    .dl-start-btn,
    .btn-inline-download,
    .unified-btn,
    .update-modal-close,
    .back-btn,
    .lightbox-close,
    #global-clear-search,
    .icon-btn {
        padding: 11px 16px !important;
        gap: 12px !important;
        font-size: 14.5px !important;
    }
}

/* Fix SVG sizing to match download buttons icon size inside (20x20 or 22x22) */
.btn-primary svg,
.btn-update-submit svg,
.dl-start-btn svg,
.btn-inline-download svg,
.unified-btn svg,
.update-modal-close svg,
.back-btn svg,
.lightbox-close svg,
#global-clear-search svg,
.icon-btn svg {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0 !important;
}

/* Remove default overrides for certain states */
.update-modal-overlay .btn-primary,
.update-modal-box .btn-primary {
    box-shadow: 0 4px 16px rgba(0,0,0,0.22) !important;
}
.update-modal-overlay .btn-primary:hover,
.update-modal-box .btn-primary:hover {
    transform: translateY(-2px) scale(1.01) !important;
    background: var(--color-primary) !important;
}
.update-modal-overlay .btn-primary:active,
.update-modal-box .btn-primary:active {
    transform: scale(0.97) !important;
    background: var(--color-primary) !important;
}

/* User Request: Make submit-add-request and submit-update-request buttons transparent with hover effect */
#submit-add-request,
#submit-update-request {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--color-primary) !important;
    padding: 0 !important;
}

#submit-add-request span,
#submit-update-request span,
#submit-add-request svg,
#submit-update-request svg {
    color: var(--color-primary) !important;
    transition: all var(--transition-fast) !important;
}

#submit-add-request:hover,
#submit-update-request:hover,
#submit-add-request:active,
#submit-update-request:active {
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

#submit-add-request:hover span,
#submit-update-request:hover span {
    color: var(--color-primary-dark) !important;
    text-decoration: underline !important;
}

#submit-add-request:hover svg,
#submit-update-request:hover svg {
    color: var(--color-primary-dark) !important;
}

/* =========================================
   HOME PAGE SECTIONS & SLIDERS
   ========================================= */

/* Override tab-home top margin for new layout */
#tab-home {
    margin-top: 10px !important;
    padding: 0 !important;
}

/* Each home section wrapper */
.home-section {
    margin-bottom: 8px;
}

/* Header row: title divider + see-more button */
.home-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 10px;
    direction: rtl;
}

.home-section-header .section-divider-wrap {
    flex: 1;
    margin: 0 !important;
}

.home-section-header .section-divider-wrap .section-divider-line:first-child {
    display: none;
}

/* "عرض المزيد" button — matches existing site style */
.home-see-more-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: color var(--transition-fast), opacity var(--transition-fast);
    white-space: nowrap;
    direction: rtl;
}
.home-see-more-btn:hover {
    opacity: 0.75;
    transform: none !important;
}
.home-see-more-btn:active {
    transform: none !important;
}

/* Slider wrapper — hides overflow and enables drag scroll */
.home-slider-wrap {
    overflow: hidden;
    padding: 4px 0 12px;
    -webkit-mask-image: linear-gradient(to left, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(to left, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%);
}

/* The actual scrollable row */
.home-slider {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 20px 8px;
    cursor: grab;
    direction: rtl;
    user-select: none;
    align-items: stretch;
}
.home-slider::-webkit-scrollbar { display: none; }
.home-slider.dragging { cursor: grabbing; }

/* Cards inside slider — fixed width */
.home-slider .app-card {
    flex-shrink: 0;
    width: 110px;
    scroll-snap-align: start;
}

@media (min-width: 480px) {
    .home-slider .app-card { width: 125px; }
    .home-slider { gap: 14px; }
}
@media (min-width: 768px) {
    .home-slider .app-card { width: 135px; }
    .home-slider { gap: 15px; }
}
@media (min-width: 1024px) {
    .home-slider .app-card { width: 145px; }
}

/* =========================================
   HOME "SEE MORE" OVERLAY PAGE
   ========================================= */
.home-more-content {
    padding: 80px 20px 30px;
    direction: rtl;
}

.home-more-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 20px;
    text-align: right;
    padding-right: 4px;
}
