﻿        :root {
            --ink-900: #0A0A0F;
            --ink-700: #1C1C28;
            --ink-500: #4B4B63;
            --ink-300: #8E8EA8;
            --ink-100: #E8E8F0;
            --ink-050: #F4F4F8;
            --white: #FFFFFF;
            --violet: #4F3EF5;
            --violet-dk: #3629D0;
            --violet-lt: #EEECFF;
            --amber: #D97A28;
            --amber-lt: #FDF1E7;
            --sage: #1B7B4B;
            --sage-lt: #EAF4EF;
            --rose: #E53E6D;
            --rose-lt: #FDEEF3;
            --s1: 0 1px 3px rgba(10, 10, 15, .06);
            --s2: 0 3px 12px rgba(10, 10, 15, .08);
            --max: 680px;
            --r: 14px;
            --r-s: 10px;
            --r-l: 20px;
        }

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

        html {
            font-family: 'Inter', system-ui, sans-serif;
            background: var(--ink-050);
            color: var(--ink-700);
            -webkit-font-smoothing: antialiased;
            font-size: 15px
        }

        body {
            min-height: 100dvh;
            padding-bottom: 96px
        }

        a {
            text-decoration: none;
            color: inherit
        }

        button {
            font-family: inherit;
            cursor: pointer;
            border: none;
            background: none
        }

        .page {
            max-width: var(--max);
            margin: 0 auto;
            padding: 0 18px
        }

        .ap {
            opacity: 0;
            transform: translateY(10px);
            transition: opacity .45s cubic-bezier(.16, 1, .3, 1), transform .45s cubic-bezier(.16, 1, .3, 1)
        }

        .ap.in {
            opacity: 1;
            transform: none
        }

        /* TOPBAR */
        .topbar {
            position: sticky;
            top: 0;
            z-index: 50;
            background: rgba(250, 250, 252, .92);
            backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px);
            border-bottom: 1px solid var(--ink-100)
        }

        .tb {
            max-width: var(--max);
            margin: 0 auto;
            padding: 12px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between
        }

        .tb-title {
            font-size: 16px;
            font-weight: 800;
            color: var(--ink-900);
            letter-spacing: -.3px
        }

        .tb-xp {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            font-weight: 700;
            color: var(--violet);
            background: var(--violet-lt);
            border-radius: 99px;
            padding: 5px 12px
        }

        /* HERO STATS */
        .hero-stats {
            background: linear-gradient(135deg, #3629D0, #6B5CF5 55%, #9B8BFF);
            border-radius: var(--r-l);
            padding: 20px;
            color: white;
            margin-bottom: 16px;
            position: relative;
            overflow: hidden
        }

        .hero-stats::before {
            content: '';
            position: absolute;
            top: -50px;
            right: -30px;
            width: 200px;
            height: 200px;
            border-radius: 50%;
            background: rgba(255, 255, 255, .07)
        }

        .hs-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
            position: relative;
            z-index: 1
        }

        .hs-level {
            display: flex;
            align-items: center;
            gap: 8px
        }

        .hs-lvl-badge {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            background: rgba(255, 255, 255, .2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            font-weight: 800
        }

        .hs-lvl-info small {
            font-size: 10px;
            opacity: .7;
            display: block
        }

        .hs-lvl-info strong {
            font-size: 14px;
            font-weight: 700
        }

        .hs-streak {
            text-align: right
        }

        .hs-streak-num {
            font-size: 28px;
            font-weight: 800;
            line-height: 1
        }

        .hs-streak-lbl {
            font-size: 10px;
            opacity: .7
        }

        .hs-xp-bar {
            position: relative;
            z-index: 1
        }

        .hs-xp-labels {
            display: flex;
            justify-content: space-between;
            font-size: 10px;
            opacity: .7;
            margin-bottom: 5px
        }

        .hs-xp-track {
            height: 6px;
            background: rgba(255, 255, 255, .2);
            border-radius: 99px;
            overflow: hidden
        }

        .hs-xp-fill {
            height: 100%;
            background: rgba(255, 255, 255, .85);
            border-radius: 99px;
            transition: width .8s cubic-bezier(.16, 1, .3, 1)
        }

        /* SECTION LABEL */
        .sec-lbl {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .8px;
            color: var(--ink-300);
            margin: 20px 0 10px
        }

        /* GAME GRID */
        .game-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 20px
        }

        .game-card {
            background: var(--white);
            border: 1px solid var(--ink-100);
            border-radius: var(--r-l);
            padding: 16px;
            cursor: pointer;
            transition: all .2s;
            position: relative;
            overflow: hidden
        }

        .game-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--s2)
        }

        .game-card:active {
            transform: scale(.97)
        }

        .gc-ico {
            width: 44px;
            height: 44px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 12px;
            font-size: 22px
        }

        .gc-title {
            font-size: 13px;
            font-weight: 700;
            color: var(--ink-900);
            margin-bottom: 3px
        }

        .gc-sub {
            font-size: 11px;
            color: var(--ink-300);
            line-height: 1.4
        }

        .gc-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            font-size: 9px;
            font-weight: 700;
            padding: 3px 7px;
            border-radius: 99px
        }

        .game-card.violet .gc-ico {
            background: var(--violet-lt);
            color: var(--violet)
        }

        .game-card.amber .gc-ico {
            background: var(--amber-lt);
            color: var(--amber)
        }

        .game-card.sage .gc-ico {
            background: var(--sage-lt);
            color: var(--sage)
        }

        .game-card.rose .gc-ico {
            background: var(--rose-lt);
            color: var(--rose)
        }

        .game-card.violet .gc-badge {
            background: var(--violet-lt);
            color: var(--violet)
        }

        .game-card.amber .gc-badge {
            background: var(--amber-lt);
            color: var(--amber)
        }

        .game-card.sage .gc-badge {
            background: var(--sage-lt);
            color: var(--sage)
        }

        .game-card.rose .gc-badge {
            background: var(--rose-lt);
            color: var(--rose)
        }

        /* LEADERBOARD */
        .rank-card {
            background: var(--white);
            border: 1px solid var(--ink-100);
            border-radius: var(--r-l);
            overflow: hidden;
            margin-bottom: 20px
        }

        .rank-head {
            padding: 14px 16px 10px;
            border-bottom: 1px solid var(--ink-050);
            display: flex;
            align-items: center;
            justify-content: space-between
        }

        .rank-title {
            font-size: 13px;
            font-weight: 700
        }

        .rank-row {
            display: flex;
            align-items: center;
            padding: 11px 16px;
            border-bottom: 1px solid var(--ink-050);
            transition: background .15s
        }

        .rank-row:last-child {
            border: none
        }

        .rank-row.me {
            background: var(--violet-lt)
        }

        .rr-pos {
            width: 24px;
            font-size: 12px;
            font-weight: 700;
            color: var(--ink-300);
            flex-shrink: 0
        }

        .rr-pos.gold {
            color: #F5A623
        }

        .rr-pos.silver {
            color: #8E8EA8
        }

        .rr-pos.bronze {
            color: #C97D4E
        }

        .rr-av {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--ink-100);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 700;
            flex-shrink: 0;
            margin: 0 10px
        }

        .rank-row.me .rr-av {
            background: var(--violet);
            color: white
        }

        .rr-name {
            flex: 1;
            font-size: 13px;
            font-weight: 600;
            color: var(--ink-900)
        }

        .rr-sub {
            font-size: 10px;
            color: var(--ink-300)
        }

        .rr-xp {
            font-size: 13px;
            font-weight: 700;
            color: var(--ink-500)
        }

        .rank-row.me .rr-xp {
            color: var(--violet)
        }

        /* MODAL OVERLAY */
        .modal-bg {
            position: fixed;
            inset: 0;
            background: rgba(10, 10, 15, .6);
            z-index: 200;
            display: none;
            align-items: flex-end;
            justify-content: center;
            padding: 0 0 env(safe-area-inset-bottom)
        }

        .modal-bg.show {
            display: flex
        }

        .modal {
            background: var(--white);
            border-radius: 24px 24px 0 0;
            width: 100%;
            max-width: var(--max);
            max-height: 92dvh;
            display: flex;
            flex-direction: column;
            overflow: hidden
        }

        .modal-drag {
            width: 40px;
            height: 4px;
            border-radius: 99px;
            background: var(--ink-100);
            margin: 12px auto 0
        }

        /* KUIS MODAL */
        .quiz-head {
            padding: 20px 20px 0
        }

        .qh-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 6px;
            margin-bottom: 16px;
            flex-wrap: wrap
        }

        .qh-top>div:first-child {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
            flex: 1;
            min-width: 0
        }

        #q-mode-lbl {
            font-size: 13px;
            font-weight: 700;
            color: var(--ink-900);
            white-space: nowrap
        }

        #q-xp-rate {
            font-size: 10px;
            color: var(--violet);
            font-weight: 600;
            white-space: nowrap;
            background: var(--violet-lt);
            padding: 2px 8px;
            border-radius: 6px
        }

        #q-lives {
            font-size: 14px;
            letter-spacing: 1px;
            flex-shrink: 0
        }

        .q-close {
            width: 32px;
            height: 32px;
            border-radius: 10px;
            background: var(--ink-050);
            border: 1px solid var(--ink-100);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--ink-500)
        }

        .q-prog-wrap {
            margin-bottom: 4px
        }

        .q-prog-lbl {
            display: flex;
            justify-content: space-between;
            font-size: 11px;
            color: var(--ink-300);
            margin-bottom: 5px
        }

        .q-prog-bar {
            height: 5px;
            background: var(--ink-100);
            border-radius: 99px;
            overflow: hidden
        }

        .q-prog-fill {
            height: 100%;
            background: var(--violet);
            border-radius: 99px;
            transition: width .4s ease
        }

        .quiz-body {
            flex: 1;
            overflow-y: auto;
            padding: 20px
        }

        .q-category {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .8px;
            color: var(--violet);
            margin-bottom: 8px
        }

        .q-text {
            font-size: 17px;
            font-weight: 700;
            color: var(--ink-900);
            line-height: 1.5;
            margin-bottom: 20px
        }

        .q-arab {
            font-family: 'Amiri', serif;
            font-size: 22px;
            direction: rtl;
            text-align: right;
            line-height: 1.7;
            color: var(--ink-900);
            background: var(--ink-050);
            border-radius: var(--r);
            padding: 14px;
            margin-bottom: 14px
        }

        @media (max-width: 400px) {
            .q-arab {
                font-size: 19px;
                padding: 12px;
                margin-bottom: 10px
            }

            .q-text {
                font-size: 15px;
                margin-bottom: 12px
            }

            .q-opt {
                padding: 11px 14px;
                font-size: 12px
            }

            .q-opts {
                gap: 7px
            }

            .quiz-head {
                padding: 14px 16px 0
            }

            .quiz-body {
                padding: 14px 16px
            }

            .quiz-foot {
                padding: 12px 16px
            }
        }

        .q-opts {
            display: flex;
            flex-direction: column;
            gap: 9px
        }

        .q-opt {
            padding: 14px 16px;
            border: 2px solid var(--ink-100);
            border-radius: var(--r);
            background: var(--white);
            text-align: left;
            font-size: 13px;
            font-weight: 500;
            color: var(--ink-700);
            transition: all .15s;
            word-break: break-word;
            line-height: 1.4
        }

        .q-opt:hover:not(:disabled) {
            border-color: var(--violet);
            background: var(--violet-lt);
            color: var(--violet)
        }

        .q-opt.correct {
            border-color: var(--sage);
            background: var(--sage-lt);
            color: var(--sage)
        }

        .q-opt.wrong {
            border-color: var(--rose);
            background: var(--rose-lt);
            color: var(--rose)
        }

        .quiz-foot {
            padding: 16px 20px;
            border-top: 1px solid var(--ink-100);
            background: var(--white)
        }

        .q-next-btn {
            width: 100%;
            padding: 14px;
            border-radius: var(--r);
            background: var(--violet);
            color: white;
            font-size: 14px;
            font-weight: 700;
            transition: background .15s
        }

        .q-next-btn:hover {
            background: var(--violet-dk)
        }

        .q-next-btn:disabled {
            background: var(--ink-100);
            color: var(--ink-300);
            cursor: not-allowed
        }

        /* RESULT MODAL */
        .result-body {
            padding: 32px 24px;
            text-align: center;
            flex: 1
        }

        .result-ico {
            font-size: 60px;
            margin-bottom: 12px
        }

        .result-title {
            font-size: 24px;
            font-weight: 800;
            color: var(--ink-900);
            margin-bottom: 6px
        }

        .result-sub {
            font-size: 14px;
            color: var(--ink-500);
            margin-bottom: 24px
        }

        .result-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-bottom: 28px
        }

        .rs-item {
            background: var(--ink-050);
            border-radius: var(--r);
            padding: 14px 8px
        }

        .rs-num {
            font-size: 22px;
            font-weight: 800;
            color: var(--ink-900)
        }

        .rs-lbl {
            font-size: 10px;
            color: var(--ink-300);
            margin-top: 2px
        }

        .result-xp {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: var(--violet-lt);
            border-radius: var(--r);
            padding: 12px;
            margin-bottom: 24px;
            font-weight: 700;
            color: var(--violet);
            font-size: 15px
        }

        .result-btns {
            display: flex;
            gap: 10px
        }

        .rbtn {
            flex: 1;
            padding: 13px;
            border-radius: var(--r);
            font-size: 13px;
            font-weight: 700;
            transition: all .15s
        }

        .rbtn.outline {
            border: 1px solid var(--ink-100);
            color: var(--ink-700)
        }

        .rbtn.solid {
            background: var(--violet);
            color: white
        }

        .rbtn:hover.solid {
            background: var(--violet-dk)
        }

        /* CATEGORY PICKER */
        .cat-head {
            padding: 20px
        }

        .cat-title {
            font-size: 18px;
            font-weight: 800;
            color: var(--ink-900);
            margin-bottom: 4px
        }

        .cat-sub {
            font-size: 13px;
            color: var(--ink-300);
            margin-bottom: 16px
        }

        .cat-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            padding: 0 20px 24px
        }

        .cat-item {
            padding: 14px;
            border-radius: var(--r);
            border: 2px solid var(--ink-100);
            text-align: center;
            cursor: pointer;
            transition: all .15s
        }

        .cat-item:hover {
            border-color: var(--violet);
            background: var(--violet-lt)
        }

        .cat-item.active {
            border-color: var(--violet);
            background: var(--violet-lt)
        }

        .ci-ico {
            font-size: 28px;
            margin-bottom: 6px
        }

        .ci-name {
            font-size: 12px;
            font-weight: 700;
            color: var(--ink-900)
        }

        .ci-count {
            font-size: 10px;
            color: var(--ink-300);
            margin-top: 2px
        }

        .cat-start {
            margin: 0 20px 24px;
            padding: 14px;
            border-radius: var(--r);
            background: var(--violet);
            color: white;
            font-size: 14px;
            font-weight: 700;
            width: calc(100% - 40px);
            transition: background .15s
        }

        .cat-start:hover {
            background: var(--violet-dk)
        }

        /* TOAST */
        .toast {
            position: fixed;
            bottom: 110px;
            left: 50%;
            transform: translateX(-50%) translateY(20px);
            background: var(--ink-900);
            color: white;
            padding: 10px 20px;
            border-radius: 99px;
            font-size: 13px;
            font-weight: 600;
            opacity: 0;
            transition: all .3s;
            z-index: 999;
            pointer-events: none;
            white-space: nowrap
        }

        .toast.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0)
        }

        /* NAV */
        .nav-shell {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 0 18px 18px;
            z-index: 100;
            pointer-events: none
        }

        .nav-bar {
            max-width: var(--max);
            margin: 0 auto;
            background: rgba(255, 255, 255, .88);
            backdrop-filter: blur(20px) saturate(160%);
            -webkit-backdrop-filter: blur(20px) saturate(160%);
            border: 1px solid rgba(255, 255, 255, .9);
            border-radius: 22px;
            padding: 8px 6px;
            display: flex;
            align-items: center;
            justify-content: space-around;
            box-shadow: 0 2px 0 rgba(255, 255, 255, .8) inset, 0 10px 36px rgba(10, 10, 15, .12), 0 2px 6px rgba(10, 10, 15, .06);
            pointer-events: all
        }

        .nl {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 3px;
            padding: 7px 12px;
            border-radius: 12px;
            color: var(--ink-300);
            cursor: pointer;
            transition: all .18s;
            -webkit-tap-highlight-color: transparent;
            min-width: 52px;
            flex: 1
        }

        .nl:hover {
            background: var(--ink-050);
            color: var(--ink-700)
        }

        .nl.on {
            color: var(--violet)
        }

        .nl-ico {
            width: 21px;
            height: 21px
        }

        .nl-lbl {
            font-size: 9.5px;
            font-weight: 600
        }

        .nav-dot {
            width: 4px;
            height: 4px;
            border-radius: 99px;
            background: transparent;
            margin-top: 1px;
            transition: background .18s
        }

        .nl.on .nav-dot {
            background: var(--violet)
        }

        .ico {
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round
        }

        @keyframes pop {
            0% {
                transform: scale(.8);
                opacity: 0
            }

            60% {
                transform: scale(1.1)
            }

            100% {
                transform: scale(1);
                opacity: 1
            }
        }

        .pop {
            animation: pop .3s cubic-bezier(.16, 1, .3, 1)
        }

        /* JUZ PICKER */
        .juz-picker-head {
            padding: 20px 20px 10px
        }

        .juz-picker-title {
            font-size: 18px;
            font-weight: 800;
            color: var(--ink-900);
            margin-bottom: 2px
        }

        .juz-picker-sub {
            font-size: 13px;
            color: var(--ink-300)
        }

        .juz-acak-btn {
            margin: 12px 20px 0;
            padding: 14px 16px;
            background: var(--violet);
            color: white;
            border-radius: var(--r);
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            transition: background .15s;
            border: none;
            font-family: inherit;
            width: calc(100% - 40px)
        }

        .juz-acak-btn:hover {
            background: var(--violet-dk)
        }

        .jab-left {
            display: flex;
            align-items: center;
            gap: 10px
        }

        .jab-ico {
            font-size: 20px
        }

        .jab-info {
            text-align: left
        }

        .jab-title {
            font-size: 13px;
            font-weight: 700;
            display: block
        }

        .jab-sub {
            font-size: 11px;
            opacity: .75;
            display: block
        }

        .jab-pts {
            font-size: 12px;
            font-weight: 700;
            background: rgba(255, 255, 255, .2);
            border-radius: 99px;
            padding: 4px 10px
        }

        .juz-divider {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 16px 20px 8px;
            color: var(--ink-300);
            font-size: 11px;
            font-weight: 600;
            letter-spacing: .5px
        }

        .juz-divider::before,
        .juz-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: var(--ink-100)
        }

        .juz-pts-note {
            text-align: center;
            font-size: 11px;
            color: var(--amber);
            font-weight: 700;
            background: var(--amber-lt);
            border-radius: 99px;
            padding: 4px 12px;
            margin: 0 auto 12px;
            display: inline-block;
            margin-left: 20px
        }

        .juz-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 6px;
            padding: 0 20px 24px;
            max-height: 220px;
            overflow-y: auto
        }

        .juz-btn {
            padding: 8px 4px;
            border: 1px solid var(--ink-100);
            border-radius: var(--r-s);
            background: var(--white);
            cursor: pointer;
            transition: all .15s;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px
        }

        .juz-btn:hover {
            border-color: var(--amber);
            background: var(--amber-lt)
        }

        .juz-btn:active {
            transform: scale(.95)
        }

        .jb-num {
            font-size: 14px;
            font-weight: 800;
            color: var(--ink-900)
        }

        .jb-lbl {
            font-size: 9px;
            color: var(--ink-300)
        }

        #q-xp-rate {
            font-size: 11px;
            color: var(--violet);
            font-weight: 600;
            background: var(--violet-lt);
            border-radius: 99px;
            padding: 3px 8px
        }