        :root {
            --primary: #6366f1;
            --primary-soft: rgba(99, 102, 241, 0.12);
            --secondary: #14b8a6;
            --secondary-soft: rgba(20, 184, 166, 0.15);
            --accent: #f97316;
            --page-bg: #0f172a;
            --panel-bg: rgba(15, 23, 42, 0.75);
            --border: rgba(148, 163, 184, 0.15);
            --text-main: #e2e8f0;
            --text-muted: #94a3b8;
            --card-bg: rgba(15, 23, 42, 0.9);
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            background: radial-gradient(120% 120% at 100% 0%, rgba(79, 70, 229, 0.45) 0%, rgba(15, 23, 42, 0.95) 45%, #020617 100%);
            color: var(--text-main);
            font-family: 'Tajawal', sans-serif;
            line-height: 1.6;
            min-height: 100vh;
        }

        a {
            color: inherit;
        }

        .navbar {
            background: rgba(15, 23, 42, 0.75);
            backdrop-filter: blur(16px);
            border-bottom: 1px solid var(--border);
            padding: 1rem 0;
            position: relative;
            z-index: 12000;
        }

        .navbar-brand img {
            filter: drop-shadow(0 10px 25px rgba(15, 23, 42, 0.45));
        }

        .navbar-nav .nav-link {
            font-weight: 600;
            color: var(--text-main);
            transition: color 0.2s ease;
        }

        .navbar-nav .nav-link:hover,
        .navbar-nav .nav-link:focus {
            color: var(--secondary);
        }

        .news-ticker {
            background: linear-gradient(90deg, rgba(249, 115, 22, 0.95), rgba(236, 72, 153, 0.9));
            color: #0f172a;
            padding: 0.35rem 1rem;
            font-weight: 600;
            letter-spacing: 0.02em;
            overflow: hidden;
            position: relative;
        }

        .news-ticker span {
            display: inline-block;
            min-width: 100%;
            animation: ticker 18s linear infinite;
        }

        @keyframes ticker {
            from {
                transform: translateX(0);
            }

            to {
                transform: translateX(calc(-100% - 2rem));
            }
        }

        .page-wrapper {
            position: relative;
            padding-bottom: 4rem;
            background: transparent;
        }

        .page-wrapper::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15), transparent 45%),
                radial-gradient(circle at 80% 0%, rgba(20, 184, 166, 0.12), transparent 55%);
            opacity: 0.8;
            pointer-events: none;
        }

        .container-xl {
            position: relative;
            z-index: 1;
        }

        .container-fluid {
            position: relative;
            z-index: 1;
        }

        .layout-grid {
            display: grid;
            gap: 2.5rem;
            grid-template-columns: minmax(0, 1fr);
        }

        @media (min-width: 992px) {
            .layout-grid.layout-grid--with-aside {
                grid-template-columns: 280px minmax(0, 1fr);
                align-items: start;
            }
        }

        .categories-panel {
            position: sticky;
            top: 7rem;
            background: var(--panel-bg);
            border-radius: 24px;
            padding: 1.75rem 1.5rem;
            border: 1px solid var(--border);
            box-shadow: 0 25px 45px rgba(2, 6, 23, 0.35);
        }

        .panel-title {
            font-size: 1.1rem;
            font-weight: 700;
            margin-bottom: 1.2rem;
            color: #f8fafc;
        }

        .category-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .category-link {
            display: block;
            padding: 0.75rem 1rem;
            border-radius: 16px;
            background: rgba(148, 163, 184, 0.08);
            font-weight: 600;
            color: var(--text-main);
            text-decoration: none;
            transition: transform 0.2s ease, background 0.2s ease;
        }

        .category-link:hover,
        .category-link:focus {
            transform: translateX(-6px);
            background: var(--primary-soft);
            color: #c7d2fe;
        }

        .content-panel {
            display: flex;
            flex-direction: column;
            gap: 3rem;
        }

        .hero-section {
            display: grid;
            gap: 2.5rem;
            border-radius: 32px;
            padding: clamp(2rem, 4vw, 3.5rem);
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(20, 184, 166, 0.2));
            border: 1px solid rgba(99, 102, 241, 0.2);
            position: relative;
            overflow: hidden;
        }

        @media (min-width: 992px) {
            .hero-section {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                align-items: center;
            }
        }

        .hero-section::after {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at 0% 0%, rgba(236, 72, 153, 0.35), transparent 45%);
            mix-blend-mode: screen;
            pointer-events: none;
        }

        .hero-content {
            position: relative;
            z-index: 1;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: rgba(15, 23, 42, 0.55);
            padding: 0.35rem 0.9rem;
            border-radius: 999px;
            font-size: 0.85rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .hero-title {
            font-size: clamp(1.9rem, 3.8vw, 2.9rem);
            font-weight: 800;
            line-height: 1.2;
            margin: 0;
        }

        .hero-subtitle {
            margin: 0;
            color: var(--text-muted);
            font-size: 1.05rem;
            max-width: 38ch;
        }

        .hero-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .hero-stats {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .stat-pill {
            min-width: 150px;
            padding: 1rem 1.25rem;
            border-radius: 18px;
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid rgba(99, 102, 241, 0.25);
            box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.1);
        }

        .stat-pill strong {
            display: block;
            font-size: 1.6rem;
            font-weight: 700;
            color: #c7d2fe;
        }

        .stat-pill span {
            font-size: 0.9rem;
            color: var(--text-muted);
        }

        .hero-visual {
            position: relative;
            z-index: 1;
        }

        .floating-card {
            position: relative;
            background: rgba(15, 23, 42, 0.82);
            border-radius: 28px;
            overflow: hidden;
            border: 1px solid rgba(99, 102, 241, 0.25);
            box-shadow: 0 30px 60px rgba(2, 6, 23, 0.45);
            animation: float 6s ease-in-out infinite;
        }

        .floating-card__media {
            width: 100%;
            aspect-ratio: 16 / 9;
            background: rgba(15, 23, 42, 0.45);
            border-radius: 22px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .floating-card__image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .floating-card__body {
            padding: 1.6rem;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            text-align: start;
        }

        .floating-card__category {
            font-size: 0.9rem;
            font-weight: 600;
            color: #a5b4fc;
        }

        .floating-card__title {
            font-size: 1.3rem;
            font-weight: 700;
            margin: 0;
        }

        .floating-card__excerpt {
            color: var(--text-muted);
            font-size: 0.95rem;
        }

        .floating-card__meta {
            display: flex;
            justify-content: space-between;
            font-weight: 600;
            color: #fef9c3;
        }

        .floating-shape {
            position: absolute;
            border-radius: 999px;
            filter: blur(45px);
            opacity: 0.6;
            animation: pulse 8s ease-in-out infinite;
        }

        .shape-one {
            width: 160px;
            height: 160px;
            top: -35px;
            inset-inline-start: 30%;
            background: rgba(236, 72, 153, 0.6);
        }

        .shape-two {
            width: 200px;
            height: 200px;
            bottom: -60px;
            inset-inline-end: -30px;
            background: rgba(20, 184, 166, 0.5);
            animation-delay: 1.2s;
        }

        @keyframes float {

            0%,
            100% {
                transform: translateY(0) scale(1);
            }

            50% {
                transform: translateY(-12px) scale(1.01);
            }
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 0.4;
                transform: scale(0.9);
            }

            50% {
                opacity: 0.9;
                transform: scale(1.1);
            }
        }

        .section-header {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            margin-bottom: 1.5rem;
        }

        .section-title {
            font-size: 1.6rem;
            font-weight: 700;
            margin: 0;
        }

        .section-subtitle {
            margin: 0;
            color: var(--text-muted);
        }

        .hot-categories,
        .featured-carousel,
        .latest-highlights {
            background: var(--card-bg);
            border-radius: 28px;
            padding: clamp(1.8rem, 3vw, 2.4rem);
            border: 1px solid var(--border);
            box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
        }

        .category-scroll {
            display: flex;
            gap: 1rem;
            overflow-x: auto;
            padding-bottom: 0.5rem;
            scrollbar-width: thin;
        }

        .category-scroll::-webkit-scrollbar {
            height: 6px;
        }

        .category-scroll::-webkit-scrollbar-thumb {
            background: rgba(148, 163, 184, 0.4);
            border-radius: 999px;
        }

        .category-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.65rem 1.2rem;
            border-radius: 999px;
            border: 1px solid rgba(99, 102, 241, 0.25);
            background: rgba(99, 102, 241, 0.12);
            color: #c7d2fe;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .category-pill:hover,
        .category-pill:focus {
            background: rgba(99, 102, 241, 0.25);
            transform: translateY(-4px);
        }

        .modern-carousel .carousel-indicators [data-bs-target] {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background-color: rgba(148, 163, 184, 0.4);
        }

        .modern-carousel .carousel-indicators .active {
            background-color: var(--primary);
        }

        .question-card {
            display: grid;
            gap: 1.5rem;
            background: rgba(15, 23, 42, 0.85);
            border: 1px solid rgba(148, 163, 184, 0.1);
            border-radius: 24px;
            overflow: hidden;
            box-shadow: 0 25px 55px rgba(2, 6, 23, 0.45);
        }

        .question-card__media {
            position: relative;
            margin: 0;
            overflow: hidden;
            aspect-ratio: 4 / 3;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(15, 23, 42, 0.2);
            border-radius: 18px;
        }

        .question-card__media img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            transition: transform 0.6s ease;
        }

        .question-card:hover .question-card__media img {
            transform: scale(1.04);
        }

        .question-card__category {
            position: absolute;
            inset-inline-start: 1rem;
            bottom: 1rem;
            background: rgba(15, 23, 42, 0.75);
            border-radius: 999px;
            padding: 0.45rem 1rem;
            font-weight: 600;
            letter-spacing: 0.06em;
        }

        .question-card__body {
            padding: 1.75rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            text-align: start;
        }

        .question-card__title {
            margin: 0;
            font-size: 1.35rem;
            font-weight: 700;
        }

        .question-card__excerpt {
            color: var(--text-muted);
        }

        .question-card__cta {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            align-items: center;
            justify-content: space-between;
        }

        .question-card__meta {
            font-size: 0.9rem;
            color: rgba(148, 163, 184, 0.8);
        }

        .question-card.compact {
            background: rgba(15, 23, 42, 0.78);
            border-radius: 22px;
            border: 1px solid rgba(148, 163, 184, 0.08);
            transition: transform 0.2s ease, border 0.2s ease;
        }

        .question-card.compact:hover {
            transform: translateY(-6px);
            border-color: rgba(99, 102, 241, 0.35);
        }

        .question-grid {
            display: grid;
            gap: 1.5rem;
        }

        .scroll-to-top {
            position: fixed;
            inset-block-end: 2rem;
            inset-inline-end: 2rem;
            width: 52px;
            height: 52px;
            border-radius: 50%;
            border: none;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.92), rgba(14, 165, 233, 0.85));
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.4rem;
            cursor: pointer;
            box-shadow: 0 20px 40px rgba(15, 23, 42, 0.45);
            opacity: 0;
            transform: translateY(10px);
            pointer-events: none;
            transition: opacity 0.25s ease, transform 0.25s ease;
            z-index: 1050;
        }

        .scroll-to-top__icon {
            width: 24px;
            height: 24px;
            stroke: currentColor;
        }

        .scroll-to-top.is-visible {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        body.theme-light .scroll-to-top {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(14, 165, 233, 0.8));
            box-shadow: 0 15px 30px rgba(15, 23, 42, 0.2);
        }

        .hot-question-list.loading {
            position: relative;
            min-height: 160px;
        }

        .hot-question-list.loading::after {
            content: '... loading';
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            color: var(--text-muted);
            font-weight: 600;
            letter-spacing: 0.1em;
        }

        @media (min-width: 768px) {
            .question-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        .btn-hero {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            border-radius: 999px;
            padding: 0.65rem 1.5rem;
            font-weight: 700;
            border: 1px solid transparent;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .btn-hero.primary {
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            color: #f8fafc;
            box-shadow: 0 15px 35px rgba(99, 102, 241, 0.35);
        }

        .btn-hero.primary:hover {
            transform: translateY(-2px);
        }

        .btn-hero.ghost {
            background: transparent;
            border-color: rgba(148, 163, 184, 0.4);
            color: #cbd5f5;
        }

        .btn-hero.ghost:hover {
            border-color: rgba(99, 102, 241, 0.4);
            color: #e0e7ff;
        }

        .animate-on-scroll {
            opacity: 0;
            transform: translateY(25px);
            transition: opacity 0.6s ease, transform 0.6s ease;
        }

        .animate-on-scroll.in-view {
            opacity: 1;
            transform: translateY(0);
        }

        .footer {
            text-align: center;
            color: var(--text-muted);
            margin-top: 4rem;
            padding: 2rem 0 3rem;
            font-size: 0.9rem;
        }

        @media (max-width: 767px) {

            .hero-stats,
            .hero-actions {
                justify-content: center;
            }

            .floating-card__image {
                \r\n width: 100%;
                \r\n height: clamp(180px, 30vw, 260px);
                \r\n object-fit: cover;
                \r\n border-radius: 20px;
                \r\n
            }
        }

        .theme-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 1px solid rgba(148, 163, 184, 0.35);
            background: transparent;
            color: inherit;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
        }

        .theme-toggle:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
        }

        .theme-toggle:hover {
            transform: translateY(-1px);
            border-color: rgba(99, 102, 241, 0.5);
        }

        .theme-toggle__icon {
            font-size: 1.1rem;
            line-height: 1;
            transition: opacity 0.2s ease;
        }

        body.theme-dark .theme-toggle__icon--sun,
        body.theme-light .theme-toggle__icon--moon {
            opacity: 0.2;
        }

        body.theme-light .theme-toggle {
            background: rgba(248, 250, 252, 0.95);
            border-color: rgba(148, 163, 184, 0.35);
            color: #0f172a;
        }

        @media (max-width: 768px) {
            .theme-toggle {
                width: 44px;
                height: 44px;
            }
        }
        @media (max-width: 576px) {
            .theme-toggle {
                width: 40px;
                height: 40px;
            }
        }

        body.theme-light {
            color-scheme: light;
            background: #f8fafc;
            color: #050505;
        }

        body.theme-dark {
            color-scheme: dark;
        }

        body.theme-light .navbar {
            background: rgba(255, 255, 255, 0.85);
            border-bottom: 1px solid rgba(148, 163, 184, 0.25);
        }

        body.theme-light .navbar-nav .nav-link {
            color: #050505;
        }

        body.theme-light .navbar-nav .nav-link:hover,
        body.theme-light .navbar-nav .nav-link:focus {
            color: #1d4ed8;
        }

        body.theme-light .news-ticker {
            background: linear-gradient(90deg, rgba(59, 130, 246, 0.85), rgba(191, 219, 254, 0.85));
            color: #0f172a;
        }

        body.theme-light .page-wrapper {
            background: #fefefe;
            border-top: 1px solid rgba(226, 232, 240, 0.8);
        }

        body.theme-light .page-wrapper::before {
            background: none;
            opacity: 0;
        }

        body.theme-light .categories-panel,
        body.theme-light .hot-categories,
        body.theme-light .featured-carousel,
        body.theme-light .latest-highlights {
            background: rgba(255, 255, 255, 0.92);
            border: 1px solid rgba(203, 213, 225, 0.7);
            box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
        }

        body.theme-light .panel-title {
            color: #050505;
        }

        body.theme-light .category-link {
            background: rgba(148, 163, 184, 0.12);
            color: #050505;
        }

        body.theme-light .category-link:hover,
        body.theme-light .category-link:focus {
            background: rgba(59, 130, 246, 0.15);
            color: #1d4ed8;
        }

        body.theme-light .hero-section {
            background: linear-gradient(135deg, rgba(191, 219, 254, 0.55), rgba(255, 255, 255, 0.85));
            border: 1px solid rgba(148, 163, 184, 0.25);
        }

        body.theme-light .hero-badge {
            background: rgba(59, 130, 246, 0.15);
            color: #1d4ed8;
        }

        body.theme-light .hero-title {
            color: #0f172a;
        }

        body.theme-light .hero-subtitle,
        body.theme-light .section-subtitle {
            color: #111111;
        }

        body.theme-light .hero-stats .stat-pill {
            background: #f1f5f9;
            border: 1px solid rgba(148, 163, 184, 0.35);
            box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
            color: #050505;
        }

        body.theme-light .hero-stats .stat-pill span {
            color: #111111;
        }

        body.theme-light .floating-card {
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid rgba(203, 213, 225, 0.65);
            box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
            color: #050505;
        }

        body.theme-light .floating-card__meta {
            color: #1d4ed8;
        }

        body.theme-light .floating-shape {
            opacity: 0.45;
        }

        body.theme-light .category-scroll::-webkit-scrollbar-thumb {
            background: rgba(148, 163, 184, 0.6);
        }

        body.theme-light .category-pill {
            background: rgba(59, 130, 246, 0.12);
            border: 1px solid rgba(59, 130, 246, 0.35);
            color: #1d4ed8;
        }

        body.theme-light .category-pill:hover,
        body.theme-light .category-pill:focus {
            background: rgba(59, 130, 246, 0.2);
        }

        body.theme-light .question-card {
            background: rgba(255, 255, 255, 0.94);
            border: 1px solid rgba(203, 213, 225, 0.7);
            box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
            color: #050505;
        }

        body.theme-light .question-card__excerpt {
            color: #111111;
        }

        body.theme-light .question-card__meta {
            color: #111111;
        }

        body.theme-light .question-card.compact {
            background: rgba(255, 255, 255, 0.92);
            border: 1px solid rgba(203, 213, 225, 0.7);
        }

        body.theme-light .question-card.compact:hover {
            border-color: rgba(59, 130, 246, 0.35);
        }

        body.theme-light .btn-hero.ghost {
            background: rgba(59, 130, 246, 0.12);
            border-color: rgba(59, 130, 246, 0.3);
            color: #1d4ed8;
        }

        body.theme-light .btn-hero.ghost:hover {
            border-color: rgba(59, 130, 246, 0.5);
            color: #1e3a8a;
        }

        body.theme-light .cta-footer small,
        body.theme-light .question-excerpt,
        body.theme-light .question-card__excerpt,
        body.theme-light .hero-subtitle,
        body.theme-light .section-subtitle {
            color: #111111;
        }

        body.theme-light .question-page .question-card {
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid rgba(203, 213, 225, 0.7);
            box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
            color: #050505;
        }

        body.theme-light .question-page .question-card::before {
            background: rgba(59, 130, 246, 0.35);
        }

        body.theme-light .question-page .question-card::after {
            background: rgba(125, 211, 252, 0.3);
        }

        body.theme-light .question-page .question-title,
        body.theme-light .question-page .floating-card__title {
            color: #0f172a;
        }

        body.theme-light .question-page .question-excerpt,
        body.theme-light .question-page .question-card__excerpt {
            color: #111111;
        }

        body.theme-light .question-page .question-body {
            background: rgba(255, 255, 255, 0.92);
            border: 1px solid rgba(203, 213, 225, 0.7);
            color: #050505;
        }

        body.theme-light .question-page .question-body h1,
        body.theme-light .question-page .question-body h2,
        body.theme-light .question-page .question-body h3,
        body.theme-light .question-page .question-body h4,
        body.theme-light .question-page .question-body h5,
        body.theme-light .question-page .question-body h6 {
            color: #0f172a;
        }

        body.theme-light .question-page .badge-pill {
            background: rgba(59, 130, 246, 0.12);
            border: 1px solid rgba(59, 130, 246, 0.3);
            color: #1d4ed8;
        }

        body.theme-light .question-page .btn-glow.secondary {
            background: rgba(59, 130, 246, 0.1);
            border-color: rgba(59, 130, 246, 0.25);
            color: #1d4ed8;
        }

        body.theme-light .question-page .btn-glow.secondary:hover {
            border-color: rgba(59, 130, 246, 0.4);
            color: #1e3a8a;
        }

        body.theme-light .question-page .cta-footer small {
            color: #111111;
        }

        body.theme-light .floating-card__category,
        body.theme-light .question-card__category {
            color: #1d4ed8;
            background: rgba(59, 130, 246, 0.15);
            border-color: rgba(59, 130, 246, 0.25);
        }

        body.theme-light .floating-card__body,
        body.theme-light .question-card__body {
            color: #050505;
        }

        body.theme-light .question-card__body p,
        body.theme-light .question-card__body li {
            color: #050505;
        }
        }

        /* --- Responsive hotfixes injected --- */

        .home-leaderboard {
            margin-top: clamp(1.5rem, 4vw, 3rem);
        }

        .leaderboard-widget {
            background: rgba(15, 23, 42, 0.85);
            border-radius: 28px;
            border: 1px solid rgba(148, 163, 184, 0.18);
            padding: clamp(1.25rem, 3vw, 1.75rem);
            box-shadow: 0 30px 55px rgba(2, 6, 23, 0.35);
        }

        .leaderboard-widget__header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            margin-bottom: 1.2rem;
        }

        .leaderboard-widget__eyebrow {
            text-transform: uppercase;
            letter-spacing: 0.16em;
            font-size: 0.7rem;
            color: rgba(226, 232, 240, 0.65);
            margin: 0 0 0.2rem;
        }

        .leaderboard-widget__header h3 {
            margin: 0;
            font-size: 1.35rem;
        }

        .leaderboard-widget__view-all {
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 0.1rem;
            color: inherit;
            text-decoration: none;
        }

        .leaderboard-widget__list {
            list-style: none;
            margin: 0;
            padding: 0;
            display: grid;
            gap: 0.55rem;
        }

        .leaderboard-widget__item {
            display: grid;
            grid-template-columns: auto 1fr auto;
            gap: 0.8rem;
            align-items: center;
            border-radius: 18px;
            padding: 0.85rem 1rem;
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid rgba(99, 102, 241, 0.12);
            animation: leaderboardFade 0.6s both;
            animation-delay: var(--delay, 0s);
        }

        .leaderboard-widget__rank {
            font-weight: 700;
            font-size: 1.1rem;
            color: rgba(226, 232, 240, 0.65);
        }

        .leaderboard-widget__profile {
            display: flex;
            align-items: center;
            gap: 0.55rem;
        }

        .leaderboard-widget__profile strong {
            display: block;
            margin: 0;
        }

        .leaderboard-widget__profile span {
            font-size: 0.85rem;
            color: rgba(226, 232, 240, 0.6);
        }

        .leaderboard-widget__avatar {
            width: 46px;
            height: 46px;
            border-radius: 50%;
            background: rgba(99, 102, 241, 0.18);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .leaderboard-widget__avatar img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
        }

        .leaderboard-widget__score {
            text-align: right;
        }

        .leaderboard-widget__score strong {
            display: block;
            font-size: 1.3rem;
        }

        .leaderboard-widget__trend {
            font-size: 0.85rem;
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
        }

        .leaderboard-widget__item--up .leaderboard-widget__trend {
            color: #4ade80;
        }

        .leaderboard-widget__item--down .leaderboard-widget__trend {
            color: #fb7185;
        }

        .leaderboard-widget__item--steady .leaderboard-widget__trend {
            color: rgba(226, 232, 240, 0.6);
        }

        .leaderboard-widget__empty {
            text-align: center;
            padding: 2rem 1rem;
            color: rgba(226, 232, 240, 0.7);
        }

        @keyframes leaderboardFade {
            from {
                opacity: 0;
                transform: translateY(12px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        body.theme-light .leaderboard-widget {
            background: #ffffff;
            border-color: rgba(148, 163, 184, 0.35);
            box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
        }

        body.theme-light .leaderboard-widget__item {
            background: rgba(248, 250, 252, 0.9);
            border-color: rgba(148, 163, 184, 0.25);
        }

        body.theme-light .leaderboard-widget__profile span {
            color: #475569;
        }

        body.theme-light .leaderboard-widget__score strong {
            color: #050505;
        }

        body.theme-light .leaderboard-widget__eyebrow,
        body.theme-light .leaderboard-widget__header h3 {
            color: #0f172a;
        }

        /* Safer wrapping for long Arabic/English tokens */
        h1,
        h2,
        h3,
        h4,
        h5,
        h6,
        p,
        span,
        a,
        button {
            overflow-wrap: anywhere;
            word-break: break-word;
        }


        /* Clamp and prevent horizontal overflow on mobile */
        html,
        body {
            max-width: 100%;
            overflow-x: hidden;
        }

        .container,
        .container-fluid,
        .container-xl {
            overflow-x: visible;
        }

        /* Safer navbar brand image sizing */
        .navbar-brand img,
        .brand-logo__img {
            max-height: 120px;
            height: 120px;
            width: auto !important;
            display: block;
        }

        @media (max-width: 576px) {

            .navbar-brand img,
            .brand-logo__img {
                max-height: 32px;
                height: 32px;
            }
        }

        /* Keep floating background shapes from causing scroll width */
        .hero-section,
        .home-hero,
        .home-panel {
            overflow: hidden;
        }

        /* Avoid min-width pills forcing horizontal scroll */
        .stat-pill,
        .home-stats article {
            min-width: 0;
        }
        
