/* =====================================================
   NOXTARY — style.css  (Design System v4)
   Mobile-fixed buttons | Books+Articles merged | Services
   ===================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --card-radius:     16px;
    --card-hover-lift: translateY(-6px);
    --card-transition: all 0.32s cubic-bezier(0.175,0.885,0.32,1.275);
    --font-title:      'Orbitron', sans-serif;
    --font-body:       'Cairo', 'Segoe UI', sans-serif;
    --gap:             22px;
}

:root, body.theme-cyber-dark {
    --blue-dark:   #0a1628;
    --blue-mid:    #0d2040;
    --bg-deep:     #020509;
    --blue-glow:   #1565c0;
    --blue-bright: #1e88e5;
    --blue-shine:  #42a5f5;
    --blue-accent: #64b5f6;
    --white-glow:  rgba(255,255,255,0.92);
    --nav-bg:      rgba(5, 12, 30, 0.72);
    --card-bg:         rgba(10, 22, 40, 0.78);
    --card-border:     rgba(255,255,255,0.06);
    --card-shadow:     0 4px 20px rgba(0,0,0,0.45);
    --text-color:      #e0e0e0;
    --text-muted:      rgba(255,255,255,0.55);
    --logo-glow:       rgba(30,136,229,0.55);
}

body.theme-neon-purple {
    --blue-dark:   #0e061c;
    --blue-mid:    #1c0f35;
    --bg-deep:     #050209;
    --blue-glow:   #6d28d9;
    --blue-bright: #7c3aed;
    --blue-shine:  #8b5cf6;
    --blue-accent: #a78bfa;
    --white-glow:  rgba(255,255,255,0.92);
    --nav-bg:      rgba(14, 6, 28, 0.72);
    --card-bg:         rgba(24, 12, 44, 0.78);
    --card-border:     rgba(255,255,255,0.06);
    --card-shadow:     0 4px 20px rgba(0,0,0,0.5);
    --text-color:      #f3e8ff;
    --text-muted:      rgba(243,232,255,0.55);
    --logo-glow:       rgba(124,58,237,0.55);
}

body.theme-emerald-green {
    --blue-dark:   #020804;
    --blue-mid:    #051c0e;
    --bg-deep:     #000301;
    --blue-glow:   #047857;
    --blue-bright: #059669;
    --blue-shine:  #10b981;
    --blue-accent: #34d399;
    --white-glow:  rgba(255,255,255,0.92);
    --nav-bg:      rgba(2, 8, 4, 0.72);
    --card-bg:         rgba(4, 24, 12, 0.78);
    --card-border:     rgba(255,255,255,0.06);
    --card-shadow:     0 4px 20px rgba(0,0,0,0.5);
    --text-color:      #ecfdf5;
    --text-muted:      rgba(236,253,245,0.55);
    --logo-glow:       rgba(5,150,105,0.55);
}

body.theme-sunset-orange {
    --blue-dark:   #0e0804;
    --blue-mid:    #241207;
    --bg-deep:     #050301;
    --blue-glow:   #b45309;
    --blue-bright: #d97706;
    --blue-shine:  #f59e0b;
    --blue-accent: #fbbf24;
    --white-glow:  rgba(255,255,255,0.92);
    --nav-bg:      rgba(14, 8, 4, 0.72);
    --card-bg:         rgba(30, 16, 8, 0.78);
    --card-border:     rgba(255,255,255,0.06);
    --card-shadow:     0 4px 20px rgba(0,0,0,0.5);
    --text-color:      #fffbeb;
    --text-muted:      rgba(255,251,235,0.55);
    --logo-glow:       rgba(217,119,6,0.55);
}

body.theme-neo-light {
    --blue-dark:   #f9fafb;
    --blue-mid:    #f3f4f6;
    --bg-deep:     #e5e7eb;
    --blue-glow:   #3b82f6;
    --blue-bright: #2563eb;
    --blue-shine:  #1d4ed8;
    --blue-accent: #1e40af;
    --white-glow:  rgba(17,24,39,0.92);
    --nav-bg:      rgba(243, 244, 246, 0.82);
    --card-bg:         rgba(255, 255, 255, 0.85);
    --card-border:     rgba(0, 0, 0, 0.08);
    --card-shadow:     0 8px 30px rgba(0, 0, 0, 0.06);
    --text-color:      #111827;
    --text-muted:      rgba(17, 24, 39, 0.65);
    --logo-glow:       rgba(37,99,235,0.35);
}

/* =====================================================
   BASE
   ===================================================== */
html {
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
}

body {
    background: radial-gradient(ellipse at 30% 20%, var(--blue-mid) 0%, var(--blue-dark) 60%, var(--bg-deep) 100%);
    color: var(--text-color);
    font-family: var(--font-body);
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.5s ease, color 0.5s ease;
}

/* FIXED — السبب الجذري: يضمن أن أي عنصر (نافبار، كارت، حاوية)
   لا يمكنه أبداً أن يتجاوز عرض الشاشة المرئي، بدل الاعتماد
   فقط على overflow-x:hidden الذي يقصّ المحتوى بصرياً بدون حل المشكلة */
.navbar,
.content-wrapper,
.items-grid,
.nc-unified,
.nc-card,
.nc-mod,
.nc-service,
.pd-wrapper {
    max-width: 100%;
    box-sizing: border-box;
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: var(--nav-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(30,136,229,0.18);
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    /* Smooth hide/show on scroll */
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s ease,
                box-shadow 0.35s ease;
}

/* Navbar hidden state — slides up out of view */
.navbar--hidden {
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.mini-logo  { width: 35px; height: 35px; flex-shrink: 0; }
.back-home  { color: var(--blue-accent); display: flex; align-items: center; flex-shrink: 0; }

.login-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(21,101,192,0.18);
    color: var(--blue-accent);
    border: 1px solid rgba(66,165,245,0.35);
    padding: 8px 16px;
    border-radius: 50px;
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
}
.login-btn:hover {
    background: rgba(21,101,192,0.4);
    border-color: var(--blue-shine);
    color: #fff;
    box-shadow: 0 0 18px rgba(66,165,245,0.45);
    transform: translateY(-1px);
}

.translate-wrapper { position: relative; flex-shrink: 0; }
.translate-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(21,101,192,0.18);
    color: var(--blue-accent);
    border: 1px solid rgba(66,165,245,0.35);
    padding: 8px 12px;
    border-radius: 50px;
    font-family: var(--font-title);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
}
.translate-btn:hover {
    background: rgba(21,101,192,0.4);
    border-color: var(--blue-shine);
    color: #fff;
    box-shadow: 0 0 18px rgba(66,165,245,0.45);
}
.translate-btn .chevron { transition: transform 0.3s ease; }
.translate-btn.open .chevron { transform: rotate(180deg); }

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(6,14,32,0.97);
    border: 1px solid rgba(66,165,245,0.3);
    border-radius: 14px;
    padding: 8px;
    min-width: 160px;
    display: none;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 20px rgba(21,101,192,0.2);
    backdrop-filter: blur(20px);
    z-index: 200;
    animation: dropDown 0.2s ease;
}
.lang-dropdown.show { display: flex; }

@keyframes dropDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lang-option {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.75);
    padding: 9px 14px;
    border-radius: 9px;
    font-size: 0.88rem;
    font-family: var(--font-body);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lang-option:hover, .lang-option.active {
    background: rgba(21,101,192,0.3);
    color: #fff;
}

/* =====================================================
   INDEX PAGE
   ===================================================== */
.container {
    padding: 40px 24px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 70px;
}

.brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: nowrap;
}

.logo-glow-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-glow-wrapper::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30,136,229,0.55) 0%, transparent 70%);
    animation: logoPulse 2.8s ease-in-out infinite;
    z-index: 0;
}

.brand-logo {
    width: 70px; height: 70px;
    object-fit: contain;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 12px rgba(30,136,229,0.9))
            drop-shadow(0 0 28px rgba(21,101,192,0.6))
            brightness(1.15);
    animation: logoGlow 2.8s ease-in-out infinite;
}

@keyframes logoPulse {
    0%,100% { opacity:0.7; transform:scale(1); }
    50%     { opacity:1;   transform:scale(1.1); }
}
@keyframes logoGlow {
    0%,100% {
        filter: drop-shadow(0 0 10px rgba(30,136,229,0.8))
                drop-shadow(0 0 22px rgba(21,101,192,0.5))
                brightness(1.1);
    }
    50% {
        filter: drop-shadow(0 0 22px rgba(66,165,245,1))
                drop-shadow(0 0 44px rgba(30,136,229,0.8))
                brightness(1.25);
    }
}

.brand-title {
    font-family: var(--font-title);
    font-size: 3.8rem;
    font-weight: 900;
    color: #1565c0;
    letter-spacing: 4px;
    line-height: 1;
    text-shadow:
        0 0 10px rgba(21,101,192,1),
        0 0 25px rgba(30,136,229,0.9),
        0 0 55px rgba(66,165,245,0.7),
        0 0 90px rgba(100,181,246,0.4);
    animation: titleGlow 2.8s ease-in-out infinite;
    white-space: nowrap;
}
@keyframes titleGlow {
    0%,100% {
        text-shadow: 0 0 10px rgba(21,101,192,1),0 0 25px rgba(30,136,229,0.9),
                     0 0 55px rgba(66,165,245,0.7),0 0 90px rgba(100,181,246,0.4);
    }
    50% {
        text-shadow: 0 0 18px rgba(21,101,192,1),0 0 40px rgba(30,136,229,1),
                     0 0 80px rgba(66,165,245,0.9),0 0 120px rgba(100,181,246,0.6);
        color: #1e88e5;
    }
}

.tagline {
    font-size: 1.08rem;
    color: var(--white-glow);
    letter-spacing: 0.4px;
    line-height: 1.8;
    max-width: 680px;
    margin: 0 auto 36px;
    text-shadow: 0 0 8px rgba(255,255,255,0.35), 0 0 20px rgba(255,255,255,0.18);
    font-weight: 400;
    direction: ltr;
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #0d47a1 100%);
    color: #fff;
    padding: 15px 44px;
    text-decoration: none;
    border-radius: 50px;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.35s ease;
    border: 1px solid rgba(66,165,245,0.5);
    box-shadow: 0 0 18px rgba(21,101,192,0.6), 0 0 40px rgba(13,71,161,0.35),
                inset 0 1px 0 rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transition: left 0.5s ease;
}
.btn:hover::before { left: 100%; }
.btn:hover {
    background: linear-gradient(135deg, #1565c0 0%, #1e88e5 50%, #1565c0 100%);
    box-shadow: 0 0 28px rgba(30,136,229,0.85), 0 0 60px rgba(21,101,192,0.55),
                inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(-3px) scale(1.03);
    border-color: rgba(100,181,246,0.8);
}
.btn:active { transform: translateY(-1px) scale(1.01); }

/* =====================================================
   LANDING PAGE ENHANCEMENTS
   ===================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 120px 24px 80px;
    z-index: 1;
}

.hero-shell {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: fadeUp 0.8s ease both;
}

.brand-header-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-glow-wrapper-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-glow-wrapper-hero::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30,136,229,0.6) 0%, transparent 70%);
    animation: logoPulse 2.8s ease-in-out infinite;
    z-index: 0;
}

.brand-logo-hero {
    width: 88px; height: 88px;
    object-fit: contain;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 16px rgba(30,136,229,1))
            drop-shadow(0 0 32px rgba(21,101,192,0.75))
            brightness(1.2);
    animation: logoGlow 2.8s ease-in-out infinite;
}

.brand-title-hero {
    font-family: var(--font-title);
    font-size: 4.2rem;
    font-weight: 900;
    color: #1565c0;
    letter-spacing: 4px;
    line-height: 1;
    text-shadow:
        0 0 12px rgba(21,101,192,1),
        0 0 30px rgba(30,136,229,0.95),
        0 0 60px rgba(66,165,245,0.8),
        0 0 100px rgba(100,181,246,0.5);
    animation: titleGlow 2.8s ease-in-out infinite;
    white-space: nowrap;
    text-align: center;
}

.hero-badges-subtitle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
}

.hero-pill-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(21,101,192,0.16);
    border: 1px solid rgba(66,165,245,0.24);
    color: rgba(255,255,255,0.8);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

.hero-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn--ghost {
    background: transparent;
    color: var(--blue-accent);
    border: 1px solid rgba(66,165,245,0.35);
    box-shadow: none;
}

.btn--ghost:hover {
    background: rgba(66,165,245,0.12);
    color: #fff;
}

.hero-intro-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 18px;
    margin-top: 8px;
}

.hero-panel {
    background: linear-gradient(145deg, rgba(8,18,36,0.9), rgba(10,24,44,0.72));
    border: 1px solid rgba(66,165,245,0.2);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(16px);
}

.hero-panel--main h2 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: #fff;
    margin: 6px 0 10px;
    line-height: 1.4;
}

.hero-panel--main p {
    color: rgba(255,255,255,0.72);
    line-height: 1.8;
}

.feature-list {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding-left: 18px;
    color: var(--blue-accent);
}

.feature-list li {
    color: rgba(255,255,255,0.8);
}

.hero-panel--stats {
    display: grid;
    gap: 12px;
}

.stat-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-card strong {
    font-family: var(--font-title);
    font-size: 1.3rem;
    color: #fff;
}

.stat-card span {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
}

.info-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.feature-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.feature-card h3 {
    font-family: var(--font-title);
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #fff;
}

.feature-card p {
    color: rgba(255,255,255,0.68);
    line-height: 1.7;
    font-size: 0.9rem;
}

.catalog-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    margin-bottom: 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(21,101,192,0.12), rgba(255,255,255,0.03));
    border: 1px solid rgba(66,165,245,0.14);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.catalog-hero h2 {
    font-family: var(--font-title);
    font-size: 1rem;
    color: #fff;
    margin: 4px 0 6px;
}

.catalog-hero p {
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    max-width: 500px;
    font-size: 0.9rem;
}

.catalog-hero__chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   HOME PAGE
   ===================================================== */
.home-page { justify-content: flex-start; }

.content-wrapper {
    width: 100%;
    max-width: 1200px;
    padding: 100px 20px 60px;
    z-index: 2;
}

/* Tabs */
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(13,32,64,0.6);
    border: 1px solid rgba(66,165,245,0.2);
    color: var(--blue-accent);
    padding: 9px 20px;
    border-radius: 50px;
    font-family: var(--font-title);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    white-space: nowrap;
}
.tab-btn:hover {
    border-color: var(--blue-shine);
    background: rgba(21,101,192,0.2);
}
.tab-btn.active {
    background: var(--blue-glow);
    color: #fff;
    border-color: var(--blue-bright);
    box-shadow: 0 0 15px rgba(30,136,229,0.5);
}

/* Search */
.search-container {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 380px;
}
.search-container input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(66,165,245,0.2);
    padding: 8px 40px 8px 15px;
    border-radius: 50px;
    color: #fff;
    outline: none;
    transition: 0.3s;
    font-family: var(--font-body);
}
.search-container input:focus {
    border-color: var(--blue-shine);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 10px rgba(66,165,245,0.3);
}
.search-icon {
    position: absolute;
    right: 15px; top: 50%;
    transform: translateY(-50%);
    color: var(--blue-accent);
}

/* Coming Soon */
.coming-soon-card {
    grid-column: 1 / -1;
    padding: 40px;
    border: 2px dashed rgba(66,165,245,0.2);
    border-radius: 20px;
    color: var(--blue-accent);
    font-family: var(--font-title);
    font-size: 1.05rem;
    opacity: 0.6;
    text-align: center;
}

/* =====================================================
   GRID LAYOUTS — حسب القسم
   ===================================================== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--gap);
    width: 100%;
}

/* All — عمود واحد عريض */
.items-grid--unified {
    grid-template-columns: 1fr;
    max-width: 760px;
    margin: 0 auto;
    gap: 14px;
}

/* Apps — أعمدة قياسية */
.items-grid--apps {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Mods & Services — عمود واحد كامل (بانر) */
.items-grid--list {
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Audio — أعمدة ضيقة */
.items-grid--covers {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

/* Books & Articles موحّد — أعمدة متوسطة */
.items-grid--ba {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* =====================================================
   DESIGN TOKENS — مشتركة
   ===================================================== */
.nc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    font-family: var(--font-title);
    background: color-mix(in srgb, var(--type-color) 12%, transparent);
    color: var(--type-color);
    border: 1px solid color-mix(in srgb, var(--type-color) 30%, transparent);
    width: fit-content;
    white-space: nowrap;
}

.nc-meta-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.66rem;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.50);
    border: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
}

/* ── Card base — flex column لضمان الزر دائماً مرئياً ── */
.nc-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    transition: var(--card-transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.nc-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.nc-card:hover { transform: var(--card-hover-lift); }
.nc-card:hover::before { opacity: 1; }

.nc-card__title {
    font-family: var(--font-title);
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0.2px;
    /* FIXED: السبب الجذري — عنوان طويل بدون مسافات كان يفرض
       اتساع الكارت كله أفقياً ويدفع الزر خارج الشاشة */
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}
.nc-card__desc {
    font-size: 0.79rem;
    color: rgba(255,255,255,0.55);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

/* ── الأهم: الأزرار دائماً ظاهرة، أبداً لا تُقطع ── */
.nc-card__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;        /* يدفع الزر للأسفل دائماً */
    padding-top: 10px;
    width: 100%;
}

.nc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 10;
    white-space: nowrap;
    font-family: var(--font-title);
    /* FIXED: الزر يتمدد/يتقلص مع الكارت بدل أن يبقى بحجم ثابت */
    flex-shrink: 1;
    flex-grow: 0;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
/* زر بعرض كامل — يتمدد دائماً مع عرض الكارت على كل الشاشات */
.nc-btn--full {
    width: 100%;
    flex: 1 1 100%;
    box-sizing: border-box;
}
.nc-btn--primary {
    background: linear-gradient(135deg,
        var(--type-color) 0%,
        color-mix(in srgb, var(--type-color) 70%, #000) 100%);
    color: #000;
    box-shadow: 0 0 10px color-mix(in srgb, var(--type-color) 40%, transparent);
}
.nc-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px color-mix(in srgb, var(--type-color) 65%, transparent);
}
.nc-btn--outline {
    background: transparent;
    color: var(--type-color);
    border: 1.5px solid color-mix(in srgb, var(--type-color) 50%, transparent);
    box-shadow: none;
}
.nc-btn--outline:hover {
    background: color-mix(in srgb, var(--type-color) 12%, transparent);
    transform: translateY(-2px);
}

/* =====================================================
   UNIFIED CARD — قسم All
   ===================================================== */
.nc-unified {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    border-left: 4px solid var(--type-color);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    transition: var(--card-transition);
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.nc-unified::after {
    content: '';
    position: absolute;
    inset: auto -20px -24px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--type-color) 20%, transparent) 0%, transparent 70%);
    pointer-events: none;
}
.nc-unified:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(0,0,0,0.5),
                0 0 18px color-mix(in srgb, var(--type-color) 18%, transparent);
    border-color: color-mix(in srgb, var(--type-color) 55%, transparent);
    border-left-color: var(--type-color);
}

/* الصف العلوي — صورة + نص جنباً إلى جنب */
.nc-unified__top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
}

.nc-unified__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.nc-unified__type-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--type-color) 13%, transparent);
    color: var(--type-color);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid color-mix(in srgb, var(--type-color) 28%, transparent);
}

.nc-unified__hint {
    font-size: 0.69rem;
    color: rgba(255,255,255,0.58);
    font-weight: 600;
}

.nc-unified__img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.nc-unified__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nc-unified__title {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    /* FIXED: ينكسر بدل أن يفرض اتساعاً أفقياً مع عناوين طويلة */
    word-break: break-word;
    overflow-wrap: break-word;
}

.nc-unified__desc {
    font-size: 0.74rem;
    color: rgba(255,255,255,0.50);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* الصف السفلي — الزر بعرض كامل، دائماً مرئي بالكامل */
.nc-unified__btn {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 16px !important;
    font-size: 0.72rem !important;
}

/* =====================================================
   APP CARD
   ===================================================== */
.nc-app {
    padding: 20px;
    gap: 12px;
}
.nc-app:hover {
    border-color: rgba(0,212,255,0.35);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(0,212,255,0.10);
}
.nc-app__icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4),
                0 0 0 1px rgba(0,212,255,0.10);
}
.nc-app__meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* =====================================================
   BOOK + ARTICLE — كارت موحّد جديد
   ===================================================== */
.nc-ba {
    padding: 0;
    gap: 0;
}
.nc-ba:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.5),
                0 0 20px color-mix(in srgb, var(--type-color) 14%, transparent);
    border-color: color-mix(in srgb, var(--type-color) 35%, transparent);
}

.nc-ba__img-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
}
/* الكتب: غلاف عمودي 3:4 — المقالات: عريض 16:9 */
.nc-ba__img-wrap--book    { aspect-ratio: 3/4; }
.nc-ba__img-wrap--article { aspect-ratio: 16/9; }

.nc-ba__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.nc-ba:hover .nc-ba__img { transform: scale(1.04); }

.nc-ba__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    backdrop-filter: blur(4px);
}

.nc-ba__body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nc-ba__meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* =====================================================
   MOD CARD — بانر أفقي
   ===================================================== */
.nc-mod {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-left: 3px solid rgba(249,115,22,0.5);
}
.nc-mod:hover {
    border-color: rgba(249,115,22,0.45);
    border-left-color: #f97316;
    box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 20px rgba(249,115,22,0.10);
}

.nc-mod__left { flex-shrink: 0; }
.nc-mod__icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

.nc-mod__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nc-mod__meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.nc-mod__actions {
    flex-shrink: 1;
    min-width: 0;
}
.nc-mod__actions .nc-btn { width: auto; flex-shrink: 1; }

/* =====================================================
   SERVICE CARD — بانر أفقي (نفس بنية mod)
   ===================================================== */
.nc-service {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-left: 3px solid rgba(234,179,8,0.5);
}
.nc-service:hover {
    border-color: rgba(234,179,8,0.45);
    border-left-color: #eab308;
    box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 20px rgba(234,179,8,0.10);
}
.nc-service__left { flex-shrink: 0; }
.nc-service__icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.nc-service__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nc-service__meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.nc-service__actions { flex-shrink: 1; min-width: 0; }
.nc-service__actions .nc-btn { width: auto; flex-shrink: 1; }

/* =====================================================
   AUDIO CARD
   ===================================================== */
.nc-audio { padding: 0; gap: 0; }
.nc-audio:hover {
    border-color: rgba(6,182,212,0.35);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(6,182,212,0.10);
}

.nc-audio__cover-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    flex-shrink: 0;
}
.nc-audio__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.nc-audio:hover .nc-audio__cover { transform: scale(1.04); }

.nc-audio__play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.3rem;
    color: rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}
.nc-audio:hover .nc-audio__play-overlay { opacity: 1; }

.nc-audio__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}
.nc-audio__meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* =====================================================
   PRODUCT PAGE — pd-*
   ===================================================== */
.pd-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 20px 80px;
    box-sizing: border-box;
    width: 100%;
}

.pd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 28px;
    font-size: 0.80rem;
    font-weight: 600;
    color: var(--blue-accent);
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.75;
    transition: opacity 0.2s ease, color 0.2s ease;
}
.pd-back-link:hover { opacity: 1; color: #fff; }

.pd-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(66,165,245,0.25), transparent);
    margin: 28px 0;
}

.pd-header {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    flex-wrap: wrap;
}

.pd-app-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    object-fit: cover;
    flex-shrink: 0;
}

.pd-header-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.pd-app-name {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
    line-height: 1.15;
    color: #fff;
    letter-spacing: 0.5px;
    word-break: break-word;
}

.pd-badges-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pd-category-tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    background: rgba(0,212,255,0.08);
    color: #00d4ff;
    border: 1px solid rgba(0,212,255,0.25);
}

.pd-size-tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.08);
}

/* ── Actions Row — مهم جداً: wrap كامل على الهاتف ── */
.pd-actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: stretch;
    margin-top: 4px;
    width: 100%;
}

.pd-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: #000;
    background: linear-gradient(135deg,
        var(--type-color, #00d4ff) 0%,
        color-mix(in srgb, var(--type-color, #00d4ff) 70%, #000) 100%);
    box-shadow: 0 0 16px color-mix(in srgb, var(--type-color, #00d4ff) 50%, transparent),
                0 4px 14px rgba(0,0,0,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: fit-content;
    font-family: var(--font-title);
    white-space: nowrap;
}
.pd-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 26px color-mix(in srgb, var(--type-color, #00d4ff) 75%, transparent),
                0 6px 18px rgba(0,0,0,0.45);
}
.pd-download-btn:active { transform: translateY(0); }

.pd-btn--outline {
    background: transparent !important;
    color: var(--type-color, #00d4ff) !important;
    border: 1.5px solid color-mix(in srgb, var(--type-color, #00d4ff) 50%, transparent) !important;
    box-shadow: none !important;
}
.pd-btn--outline:hover {
    background: color-mix(in srgb, var(--type-color, #00d4ff) 12%, transparent) !important;
}

.pd-share-btn.pd-share-main {
    padding: 11px 20px;
    background: transparent;
    border: 1.5px solid rgba(66,165,245,0.35);
    color: var(--blue-accent);
    border-radius: 50px;
    font-size: 0.80rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
    font-family: var(--font-title);
    letter-spacing: 0.04em;
}
.pd-share-btn.pd-share-main:hover {
    background: rgba(66,165,245,0.10);
    border-color: var(--blue-shine);
    color: #fff;
}

.pd-copy-toast {
    display: none;
    font-size: 0.78rem;
    color: #00d4ff;
    margin-top: 4px;
}
.pd-copy-toast.show {
    display: block;
    animation: fadeInOut 2.5s ease;
}
@keyframes fadeInOut {
    0%  { opacity:0; }
    15% { opacity:1; }
    80% { opacity:1; }
    100%{ opacity:0; }
}

.pd-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-family: var(--font-title);
}

.pd-screenshots-section { margin-bottom: 0; }
.pd-screenshots-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.pd-screenshots-gallery::-webkit-scrollbar { height: 3px; }
.pd-screenshots-gallery::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 4px; }
.pd-screenshots-gallery::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.35); border-radius: 4px; }

.pd-screenshot {
    height: 300px;
    width: auto;
    flex-shrink: 0;
    border-radius: 14px;
    object-fit: cover;
    scroll-snap-align: start;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pd-screenshot:hover {
    transform: scale(1.03) translateY(-3px);
    box-shadow: 0 10px 32px rgba(0,0,0,0.65);
}
.pd-screenshot.landscape {
    height: auto;
    width: 460px;
    max-width: 85vw;
    object-fit: contain;
    background: rgba(0,0,0,0.25);
}

.pd-description-section { margin-bottom: 0; }
.pd-description-text {
    font-size: 0.88rem;
    line-height: 1.85;
    color: rgba(255,255,255,0.70);
    white-space: pre-line;
    margin: 0;
}

/* ── PDF Inline Viewer ── */
.pd-pdf-section { margin-top: 0; }
.pd-pdf-wrap {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    background: #1a1a1a;
}
.pd-pdf-frame {
    width: 100%;
    height: 75vh;
    min-height: 420px;
    border: none;
    display: block;
}

.pd-error {
    text-align: center;
    padding: 80px 20px;
    opacity: 0.65;
}
.pd-error p { font-size: 1rem; margin-bottom: 16px; }

/* =====================================================
   LIGHTBOX
   ===================================================== */
.lb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}
.lb-overlay.active { display: flex; }

.lb-img {
    max-height: 80vh;
    max-width: 90vw;
    width: auto;
    border-radius: 16px;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
    object-fit: contain;
    user-select: none;
}

.lb-close {
    position: absolute;
    top: 20px; right: 24px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10000;
}
.lb-close:hover { background: rgba(255,255,255,0.18); }

.lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    width: 48px; height: 48px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10000;
}
.lb-arrow:hover { background: rgba(0,212,255,0.20); }
.lb-left  { left: 20px; }
.lb-right { right: 20px; }
.lb-left:hover  { transform: translateY(-50%) translateX(-2px); }
.lb-right:hover { transform: translateY(-50%) translateX(2px); }

.lb-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-title);
    font-size: 0.70rem;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.45);
}

/* =====================================================
   RESPONSIVE — التركيز الأساسي: ضمان ظهور كل الأزرار
   ===================================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 12px;
        gap: 8px;
    }
    .search-container {
        flex: 1;
        max-width: none;
        min-width: 150px;
    }
    .search-container input {
        padding: 7px 32px 7px 12px;
        font-size: 0.85rem;
    }
    .login-btn {
        padding: 7px 12px;
        font-size: 0.65rem;
        gap: 4px;
    }
    .login-btn svg {
        width: 12px;
        height: 12px;
    }
    .translate-btn {
        padding: 7px 10px;
        font-size: 0.65rem;
        gap: 4px;
    }
    .translate-btn svg {
        width: 14px;
        height: 14px;
    }
    .theme-btn-instant {
        width: 36px;
        height: 36px;
    }
    .theme-btn-instant svg {
        width: 18px;
        height: 18px;
    }
    .mini-logo {
        width: 30px;
        height: 30px;
    }
    .brand-title    { font-size: 2.5rem; }
    .brand-logo     { width: 52px; height: 52px; }
    .brand-header   { gap: 12px; }
    .tagline        { font-size: 0.95rem; padding: 0 10px; }
    .btn            { padding: 13px 32px; font-size: 0.85rem; }
    .hero-intro-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .catalog-hero { 
        flex-direction: column; 
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
        margin-bottom: 16px;
    }
    .catalog-hero h2 {
        font-size: 0.95rem;
    }
    .catalog-hero p {
        font-size: 0.85rem;
        max-width: 100%;
    }
    .catalog-hero__chips { justify-content: flex-start; width: 100%; }

    .items-grid--ba     { grid-template-columns: repeat(2, 1fr); }
    .items-grid--covers { grid-template-columns: repeat(2, 1fr); }
    .items-grid--apps   { grid-template-columns: repeat(2, 1fr); }

    .nc-mod, .nc-service {
        flex-wrap: wrap;
    }
    .nc-mod__actions, .nc-service__actions {
        width: 100%;
    }
    .nc-mod__actions .nc-btn,
    .nc-service__actions .nc-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .navbar { 
        padding: 6px 8px; 
        gap: 6px; 
        flex-wrap: nowrap;
        overflow: visible;
    }
    .nav-left {
        gap: 6px;
        order: 0;
    }
    .search-container {
        order: 0;
        flex: 1 1 auto;
        min-width: 0;
        margin-bottom: 0;
    }
    .search-container input {
        padding: 6px 28px 6px 8px;
        font-size: 0.78rem;
        height: 32px;
    }
    .search-icon {
        width: 12px;
        height: 12px;
        right: 10px;
    }
    .navbar > div:last-child {
        display: flex;
        gap: 6px !important;
        align-items: center;
        flex-shrink: 0;
    }
    .login-btn {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 32px;
    }
    .login-btn span {
        display: none;
    }
    .login-btn svg {
        width: 13px;
        height: 13px;
    }
    .translate-btn {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 32px;
    }
    .translate-btn svg {
        width: 13px;
        height: 13px;
    }
    .translate-btn span,
    .translate-btn .chevron {
        display: none;
    }
    .theme-btn-instant {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    .theme-btn-instant svg {
        width: 14px;
        height: 14px;
    }
    .mini-logo {
        width: 24px;
        height: 24px;
    }
    .back-home svg {
        width: 18px;
        height: 18px;
    }
    .brand-title-hero { font-size: 2rem; letter-spacing: 1.5px; }
    .brand-logo-hero { width: 52px; height: 52px; }
    .logo-glow-wrapper-hero::before { inset: -8px; }
    .content-wrapper { padding: 80px 14px 40px; }
    .container { padding: 80px 14px 60px; }
    .hero-panel { padding: 18px; }
    .hero-panel--main h2 { font-size: 1.15rem; }
    .hero-badges-subtitle { gap: 6px; margin-top: 4px; }
    .hero-pill-subtitle { font-size: 0.62rem; padding: 4px 8px; }

    /* FIXED: عمود واحد لكاردات Apps و Books/Articles على الهاتف —
       عمودان كانا يضيّقان الكارت لدرجة قطع الزر بصرياً */
    .items-grid--apps {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .items-grid--ba {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    /* Audio يبقى عمودين — التصميم المربع يحتمل ذلك بدون قطع */
    .items-grid--covers {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .nc-app, .nc-ba__body { padding: 14px; }
    .nc-card__title { font-size: 0.85rem; }

    /* الزر يتقلص تلقائياً بحرف ووزن أصغر بدل أن يُقطع */
    .nc-btn {
        font-size: 0.66rem;
        padding: 8px 10px;
        letter-spacing: 0.02em;
        gap: 4px;
    }

    .pd-header        { flex-direction: column; align-items: flex-start; }
    .pd-app-icon      { width: 88px; height: 88px; }
    .pd-app-name      { font-size: 1.25rem; }

    /* الإصلاح الأهم: كل أزرار صفحة المنتج بعرض كامل وتُكدّس عمودياً */
    .pd-actions-row     { flex-direction: column; }
    .pd-actions-row > * { width: 100%; justify-content: center; text-align: center; }

    .pd-screenshot    { height: 220px; }
    .pd-pdf-frame     { height: 60vh; min-height: 320px; }
    .lb-arrow         { width: 38px; height: 38px; font-size: 0.9rem; }
    .lb-left          { left: 8px; }
    .lb-right         { right: 8px; }
}

@media (max-width: 360px) {
    .brand-title { font-size: 1.7rem; }
    .items-grid--apps,
    .items-grid--ba,
    .items-grid--covers {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   THEME SWITCHER
   ===================================================== */
.theme-wrapper {
    position: relative;
}
.theme-btn-instant {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: rgba(21, 101, 192, 0.18);
    color: var(--blue-accent);
    border: 1px solid rgba(66, 165, 245, 0.35);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-family: var(--font-title);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}
.theme-btn-instant:hover {
    background: rgba(21, 101, 192, 0.4);
    border-color: var(--blue-shine);
    color: #fff;
    box-shadow: 0 0 18px var(--logo-glow);
    transform: rotate(20deg);
}
.theme-btn-instant:active {
    transform: rotate(20deg) scale(0.95);
}
.theme-btn-instant svg {
    width: 18px;
    height: 18px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}
.theme-btn-instant .sun-icon {
    display: block;
}
.theme-btn-instant .moon-icon {
    display: none;
}

/* ==== Light mode: make the theme button DARK & VISIBLE ==== */
body.theme-neo-light .theme-btn-instant {
    background: rgba(17, 24, 39, 0.1);
    color: #111827;
    border: 1.5px solid rgba(17, 24, 39, 0.35);
}
body.theme-neo-light .theme-btn-instant:hover {
    background: rgba(17, 24, 39, 0.22);
    border-color: #1d4ed8;
    color: #1d4ed8;
    box-shadow: 0 0 14px rgba(37, 99, 235, 0.35);
}

.theme-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(21, 101, 192, 0.18);
    color: var(--blue-accent);
    border: 1px solid rgba(66, 165, 245, 0.35);
    padding: 8px 16px;
    border-radius: 50px;
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}
.theme-btn:hover {
    background: rgba(21, 101, 192, 0.4);
    border-color: var(--blue-shine);
    color: #fff;
    box-shadow: 0 0 18px var(--logo-glow);
}
.theme-btn .chevron { transition: transform 0.3s ease; }
.theme-btn.open .chevron { transform: rotate(180deg); }

.theme-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--nav-bg);
    border: 1px solid rgba(66, 165, 245, 0.3);
    border-radius: 14px;
    padding: 8px;
    min-width: 190px;
    display: none;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 20px rgba(21,101,192,0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 200;
    animation: dropDown 0.2s ease;
}
.theme-dropdown.show { display: flex; }

.theme-option {
    background: transparent;
    border: none;
    color: var(--text-color);
    opacity: 0.8;
    padding: 9px 14px;
    border-radius: 9px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.theme-option:hover, .theme-option.active {
    background: rgba(21, 101, 192, 0.25);
    color: #fff;
    opacity: 1;
}
.theme-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}

/* =====================================================
   CYBERPUNK LOGIN MODAL
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.cyber-modal {
    background: var(--card-bg);
    border: 1.5px solid var(--blue-bright);
    border-radius: 20px;
    width: 90%;
    max-width: 440px;
    padding: 30px;
    box-shadow: 0 0 35px color-mix(in srgb, var(--blue-glow) 40%, transparent);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}
.modal-overlay.active .cyber-modal {
    transform: scale(1);
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--blue-accent);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}
.modal-close:hover {
    color: #fff;
}
.modal-title {
    font-family: var(--font-title);
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px var(--blue-glow);
}
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-family: var(--font-title);
    font-size: 0.72rem;
    letter-spacing: 1px;
    color: var(--blue-accent);
}
.cyber-input {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(66,165,245,0.25);
    padding: 12px 16px;
    border-radius: 10px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}
.cyber-input:focus {
    border-color: var(--blue-shine);
    box-shadow: 0 0 12px color-mix(in srgb, var(--blue-shine) 30%, transparent);
}
.cyber-btn {
    margin-top: 10px;
    background: linear-gradient(135deg, var(--blue-glow) 0%, var(--blue-bright) 100%);
    color: #fff;
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--blue-glow) 40%, transparent);
    width: 100%;
}
.cyber-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--blue-glow) 60%, transparent);
}
.modal-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.modal-footer a {
    color: var(--blue-accent);
    text-decoration: none;
    font-weight: 600;
}
.modal-footer a:hover {
    text-decoration: underline;
}

/* Light mode overrides for text readability */
body.theme-neo-light .tagline {
    text-shadow: none;
    color: #374151;
}
body.theme-neo-light .nc-card__desc {
    color: #4b5563;
}
body.theme-neo-light .nc-meta-chip {
    background: rgba(0,0,0,0.05);
    color: #4b5563;
    border-color: rgba(0,0,0,0.08);
}
body.theme-neo-light .nc-badge {
    background: color-mix(in srgb, var(--type-color) 8%, #fff);
}
body.theme-neo-light .coming-soon-card {
    border-color: rgba(0,0,0,0.15);
    color: #4b5563;
}
body.theme-neo-light .pd-screenshot {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.08);
}
body.theme-neo-light .pd-screenshot.landscape {
    background: rgba(0,0,0,0.05);
}
body.theme-neo-light .pd-description-text {
    color: #374151;
}
body.theme-neo-light .pd-pdf-wrap {
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
body.theme-neo-light .pd-section-title {
    color: #4b5563;
    border-bottom-color: rgba(0,0,0,0.1);
}
body.theme-neo-light .pd-size-tag {
    background: rgba(0,0,0,0.04);
    color: #4b5563;
    border-color: rgba(0,0,0,0.06);
}
body.theme-neo-light .navbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
body.theme-neo-light .translate-btn,
body.theme-neo-light .theme-btn,
body.theme-neo-light .login-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
    color: #111827;
}
body.theme-neo-light .translate-btn:hover,
body.theme-neo-light .theme-btn:hover,
body.theme-neo-light .login-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--blue-bright);
}
body.theme-neo-light .search-container input {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
    color: #111827;
}
body.theme-neo-light .search-container input:focus {
    background: #fff;
    border-color: var(--blue-glow);
}
body.theme-neo-light .nc-btn--primary {
    color: #fff;
}
body.theme-neo-light .theme-option {
    color: #111827;
}
body.theme-neo-light .theme-option:hover,
body.theme-neo-light .theme-option.active {
    color: #fff;
}
body.theme-neo-light .modal-title,
body.theme-neo-light .cyber-modal label,
body.theme-neo-light .cyber-modal h3 {
    color: #111827;
}
body.theme-neo-light .cyber-input {
    background: #fff;
    color: #111827;
    border-color: rgba(0, 0, 0, 0.15);
}
body.theme-neo-light .cyber-input::placeholder {
    color: #9ca3af;
}
body.theme-neo-light .modal-close {
    color: #4b5563;
}
body.theme-neo-light .modal-close:hover {
    color: #111827;
}
body.theme-neo-light .pd-app-name {
    color: #111827;
}
body.theme-neo-light .nc-unified__title,
body.theme-neo-light .nc-card__title {
    color: #111827;
}
body.theme-neo-light .nc-unified__desc {
    color: #4b5563;
}
body.theme-neo-light .nc-unified__hint {
    color: #6b7280;
}
body.theme-neo-light .hero-panel,
body.theme-neo-light .feature-card,
body.theme-neo-light .catalog-hero {
    background: rgba(255,255,255,0.82);
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
body.theme-neo-light .hero-panel--main p,
body.theme-neo-light .feature-card p,
body.theme-neo-light .catalog-hero p {
    color: #4b5563;
}
body.theme-neo-light .hero-panel--main h2,
body.theme-neo-light .feature-card h3,
body.theme-neo-light .catalog-hero h2 {
    color: #111827;
}
