@font-face { font-family: "Readex Pro"; src: url("./fonts/readex-ar.woff2") format("woff2"); font-weight: 160 700; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E; }
@font-face { font-family: "Readex Pro"; src: url("./fonts/readex-lat.woff2") format("woff2"); font-weight: 160 700; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Sora"; src: url("./fonts/sora-lat.woff2") format("woff2"); font-weight: 100 800; unicode-range: U+0000-00FF, U+0131, U+2000-206F, U+20AC; }
@font-face { font-family: "Sora"; src: url("./fonts/sora-ext.woff2") format("woff2"); font-weight: 100 800; unicode-range: U+0100-02BA, U+1E00-1EFF; }

/* Branding defaults. Everything here can be overridden from config.json
   (the site sets the same CSS variables at load). */
.g-root {
    --g-font-ar: "Readex Pro";
    --g-font-en: "Sora";
    --g-ar: var(--g-font-ar), -apple-system, "Geeza Pro", sans-serif;
    --g-en: var(--g-font-en), -apple-system, "SF Pro Display", sans-serif;
    --g-bg1: #120a3a;
    --g-bg2: #1b0f4d;
    --g-bg3: #0a2a4a;
    --g-bg4: #07323a;
    --g-blob1: #8a5cff;
    --g-blob2: #ff4f9a;
    --g-blob3: #19d3c5;
    --g-text: #f1ecff;
    --g-hgrad: linear-gradient(120deg, #9ff7ea, #c3a6ff 55%, #ff9cc9);

    position: relative; overflow: hidden; isolation: isolate; min-height: 100vh;
    color: var(--g-text);
    font-family: var(--g-en), var(--g-font-ar), -apple-system, sans-serif;
    background: linear-gradient(160deg, var(--g-bg1) 0%, var(--g-bg2) 35%, var(--g-bg3) 70%, var(--g-bg4) 100%);
}

html, body, #root { margin: 0; min-height: 100%; background: #0b0820; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

.g-blob { position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: 0.75; pointer-events: none; animation: g-float 18s ease-in-out infinite alternate; }
.g-b1 { width: 340px; height: 340px; top: -90px; inset-inline-start: -80px; background: radial-gradient(circle, var(--g-blob1), rgba(0, 0, 0, 0) 70%); }
.g-b2 { width: 380px; height: 380px; top: 36%; inset-inline-end: -140px; background: radial-gradient(circle, var(--g-blob2), rgba(0, 0, 0, 0) 70%); animation-duration: 22s; }
.g-b3 { width: 360px; height: 360px; bottom: -120px; inset-inline-start: -60px; background: radial-gradient(circle, var(--g-blob3), rgba(0, 0, 0, 0) 70%); animation-duration: 26s; }
@keyframes g-float { to { transform: translate3d(30px, -40px, 0) scale(1.15); } }

.g-wrap { position: relative; max-width: 560px; margin: 0 auto; padding: 28px 18px 48px; min-height: 100vh; }

.g-card {
    position: relative; color: inherit; text-decoration: none;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
    -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    box-shadow: 0 18px 40px rgba(4, 2, 24, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}
.g-tone-a { background-image: linear-gradient(145deg, rgba(120, 255, 230, 0.22), rgba(120, 100, 255, 0.08) 60%, rgba(255, 255, 255, 0.03)); }
.g-tone-b { background-image: linear-gradient(145deg, rgba(255, 120, 190, 0.24), rgba(150, 100, 255, 0.10) 60%, rgba(255, 255, 255, 0.03)); }

.g-brand {
    margin: 5vh 0 -6vh; text-align: center;
    font-family: var(--g-ar); font-size: 26px; font-weight: 700; line-height: 1.3;
    background: var(--g-hgrad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.g-home { display: grid; gap: 18px; padding-top: 12vh; }
.g-big {
    display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 18px;
    min-height: 168px; padding: 24px 24px;
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}
.g-big:active { transform: scale(0.97); }
.g-big:hover { transform: translateY(-3px); }
.g-big .g-folder { grid-row: 1 / 3; width: 72px; height: 64px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35)); }
.g-big-label { font-family: var(--g-ar); font-size: 38px; font-weight: 600; line-height: 1.2; align-self: end; letter-spacing: 0; }
.g-big-count { font-family: var(--g-ar); font-size: 18px; font-weight: 400; color: rgba(241, 236, 255, 0.78); align-self: start; }
.g-big .g-chev { grid-row: 1 / 3; grid-column: 3; }
.g-chev { font-size: 30px; line-height: 1; color: rgba(255, 255, 255, 0.6); font-family: var(--g-en); font-weight: 300; }

.g-main { display: block; }
.g-back {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; margin-bottom: 14px;
    font-family: var(--g-ar); font-size: 15px; font-weight: 500; color: var(--g-text); text-decoration: none; cursor: pointer;
    background: rgba(255, 255, 255, 0.1); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 22px;
}
button.g-back, a.g-back { font: inherit; font-family: var(--g-ar); font-size: 15px; font-weight: 500; }
.g-h1 { margin: 4px 0 20px; font-family: var(--g-ar); font-size: 44px; font-weight: 600; line-height: 1.2; letter-spacing: 0; background: var(--g-hgrad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.g-list { display: grid; gap: 14px; }
.g-empty { display: grid; place-items: center; min-height: 150px; opacity: 0.8; }
.g-empty .g-folder { width: 64px; height: 56px; opacity: 0.6; }
.g-folder-card { overflow: hidden; border-radius: 28px; }
.g-folder-head {
    display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; width: 100%; min-height: 84px; padding: 14px 18px;
    background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: start;
}
.g-folder { width: 46px; height: 41px; flex: none; filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.3)); }
.g-fname { font-family: var(--g-en); font-size: 18px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.g-fcount { min-width: 30px; height: 30px; padding: 0 9px; display: grid; place-items: center; border-radius: 15px; font-family: var(--g-ar); font-size: 14px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.16); }
.g-chev-down { transform: rotate(-90deg); transition: transform .3s; }
.is-open .g-chev-down { transform: rotate(90deg); }
.g-fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s cubic-bezier(.2, .8, .2, 1); }
.is-open .g-fold { grid-template-rows: 1fr; }
.g-fold-in { overflow: hidden; display: grid; gap: 8px; padding: 0 12px; }
.is-open .g-fold-in { padding-bottom: 14px; }
.g-lec {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; cursor: pointer; text-align: start; color: inherit; font: inherit;
    background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 20px; transition: background .2s, transform .2s;
}
.g-lec:active { transform: scale(0.98); background: rgba(255, 255, 255, 0.16); }
.g-lec-body { flex: 1; display: grid; gap: 3px; min-width: 0; }
.g-lec-title { font-family: var(--g-en); font-size: 15.5px; font-weight: 600; overflow-wrap: anywhere; text-align: left; }
.g-lec-meta { font-family: var(--g-ar); font-size: 12.5px; color: rgba(241, 236, 255, 0.68); }

.g-lhead { padding: 22px 22px; margin-bottom: 16px; }
.g-ltitle { margin: 0; font-family: var(--g-en); font-size: 24px; line-height: 1.25; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.g-lmeta { margin: 8px 0 0; font-family: var(--g-ar); font-size: 13.5px; color: rgba(241, 236, 255, 0.75); }
.g-page-n { position: absolute; bottom: 8px; inset-inline-start: 8px; min-width: 28px; height: 28px; padding: 0 8px; display: grid; place-items: center; border-radius: 14px; font-family: var(--g-ar); font-size: 12px; color: var(--g-text); background: rgba(15, 8, 50, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

.g-wrap > * { animation: g-in .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes g-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .g-blob, .g-wrap > * { animation: none; } .g-fold, .g-big { transition: none; } }
@media (min-width: 768px) { .g-wrap { max-width: 720px; padding-top: 48px; } .g-home { grid-template-columns: 1fr 1fr; } }

.g-actions { display: flex; gap: 10px; margin-top: 16px; }
.g-act { flex: 1; display: grid; place-items: center; min-height: 48px; border-radius: 24px; font-family: var(--g-ar); font-size: 16px; font-weight: 600; color: var(--g-text); text-decoration: none; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.g-act-main { background: linear-gradient(120deg, rgba(120, 255, 230, 0.35), rgba(150, 110, 255, 0.4)); }
.g-bar { display: flex; align-items: center; gap: 8px; padding: 8px; margin-bottom: 14px; border-radius: 26px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); position: sticky; top: 8px; z-index: 5; }
.g-zoom { flex: none; width: 44px; height: 44px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.12); color: var(--g-text); font-size: 22px; font-family: var(--g-en); cursor: pointer; }
.g-zoom:disabled { opacity: 0.35; }
.g-zoom-v { flex: none; min-width: 44px; text-align: center; font-family: var(--g-ar); font-size: 13px; }
.g-chips { display: flex; gap: 6px; overflow-x: auto; flex: 1; padding: 2px; scrollbar-width: none; }
.g-chips::-webkit-scrollbar { display: none; }
.g-chip { flex: none; min-width: 36px; height: 36px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.08); color: var(--g-text); font-family: var(--g-ar); font-size: 13px; cursor: pointer; }
.g-reader { overflow-x: auto; border-radius: 20px; }
.g-sheet { display: grid; gap: 12px; max-width: none; }
.g-sheet-page { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 10px 24px rgba(4, 2, 24, 0.4); background: rgba(255, 255, 255, 0.05); }
.g-sheet-box { position: relative; }

.g-lmeta, .g-lec-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; }

.g-loading { display: grid; place-items: center; min-height: 60vh; font-family: var(--g-ar); font-size: 17px; color: rgba(241, 236, 255, 0.7); }
