/* Davra Books — O'yinlar: Globus (globe.js). Animatsiyalar faqat transform/opacity; harakat kamaytirilsa o'chadi. */
.gl { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.gl-stage {
    position: relative; height: clamp(380px, 64vh, 680px); border-radius: 18px; overflow: hidden; isolation: isolate;
    border: 1px solid rgba(125, 211, 252, .22); box-shadow: 0 24px 60px -30px rgba(14, 116, 144, .6);
    background:
        radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, .7), transparent 60%),
        radial-gradient(1px 1px at 78% 12%, rgba(255, 255, 255, .55), transparent 60%),
        radial-gradient(1.5px 1.5px at 88% 72%, rgba(255, 255, 255, .5), transparent 60%),
        radial-gradient(1px 1px at 24% 82%, rgba(255, 255, 255, .5), transparent 60%),
        radial-gradient(1px 1px at 52% 6%, rgba(255, 255, 255, .45), transparent 60%),
        radial-gradient(ellipse at 50% 45%, #13233f 0%, #0a1222 55%, #060a14 100%);
}
.gm-stage:fullscreen .gl-stage { flex: 1; height: auto; }
.gl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; -webkit-tap-highlight-color: transparent; outline: none; }
.gl-canvas:active { cursor: grabbing; }
.gl-canvas.is-keys:focus { box-shadow: inset 0 0 0 3px rgba(125, 211, 252, .7); }
.gl-cross { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none; opacity: 0; transition: opacity .2s; }
.gl-cross::before, .gl-cross::after { content: ""; position: absolute; background: #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .7); }
.gl-cross::before { left: 12px; top: 0; width: 2px; height: 26px; }
.gl-cross::after { top: 12px; left: 0; height: 2px; width: 26px; }
/* Nishon belgisi faqat klaviatura bilan boshqarilganda (Enter markazdagi joyni tanlaydi) */
.gl-canvas.is-keys:focus ~ .gl-cross { opacity: 1; }

.gl-glass { background: rgba(15, 23, 42, .82); border: 1px solid rgba(148, 163, 184, .22); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #f8fafc; }

/* Savol kartasi (chap yuqorida) */
.gl-card { position: absolute; left: .75rem; top: .75rem; z-index: 3; display: flex; align-items: center; gap: .8rem; max-width: min(460px, calc(100% - 1.5rem)); padding: .6rem .9rem .6rem .6rem; border-radius: 16px; animation: gl-in .35s ease backwards; pointer-events: none; }
.gl-card-flag { width: 72px; height: 54px; flex: none; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); background: #fff; }
.gl-card-img { width: 64px; height: 64px; flex: none; border-radius: 10px; object-fit: cover; }
.gl-card-text { min-width: 0; }
.gl-card-kicker { display: block; font: 700 .68rem/1.2 "DM Sans", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; }
.gl-card-q { margin: .15rem 0 0; font-weight: 800; font-size: 1.05rem; line-height: 1.3; color: #fff; overflow-wrap: anywhere; }
.gl-hinttext { display: block; margin-top: .3rem; font-size: .8rem; color: #fde68a; }

/* Natija */
.gl-toast { position: absolute; left: 50%; bottom: 4.4rem; z-index: 3; width: max-content; max-width: min(520px, calc(100% - 1.5rem)); transform: translateX(-50%); padding: .55rem .9rem; border-radius: 14px; text-align: center; animation: gl-pop .3s ease backwards; }
.gl-toast b { font-weight: 800; }
.gl-toast span { display: block; font-size: .82rem; color: #cbd5e1; }
.gl-toast.is-ok { border-color: rgba(34, 197, 94, .6); box-shadow: 0 0 0 1px rgba(34, 197, 94, .35), 0 12px 30px -12px rgba(22, 163, 74, .7); }
.gl-toast.is-ok b { color: #86efac; }
.gl-toast.is-bad { border-color: rgba(248, 113, 113, .55); }
.gl-toast.is-bad b { color: #fca5a5; }
.gl-toast.is-info b { color: #e2e8f0; }
.gl-explain { margin: .35rem 0 0; max-width: 46ch; font-size: .86rem; line-height: 1.4; color: #e2e8f0; text-align: left; }
.gl-next { margin-top: .5rem; display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .9rem; border-radius: 999px; font-weight: 700; font-size: .85rem; color: #052e16; background: #4ade80; }
.gl-next:hover { background: #86efac; }

/* Pastki panel */
.gl-bar { position: absolute; left: 50%; bottom: .7rem; z-index: 3; display: flex; align-items: center; gap: .5rem; transform: translateX(-50%); max-width: calc(100% - 1rem); }
.gl-pill { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .35rem .75rem; border-radius: 12px; font-size: .86rem; white-space: nowrap; }
.gl-pill b { color: #5eead4; font-weight: 700; }
button.gl-pill { transition: border-color .2s, background-color .2s, opacity .2s; }
button.gl-pill:hover:not(:disabled) { border-color: rgba(94, 234, 212, .6); }
button.gl-pill:disabled { opacity: .45; cursor: not-allowed; }
.gl-pill svg { width: 17px; height: 17px; flex: none; }
.gl-kbd { padding: .05rem .4rem; border-radius: 6px; border: 1px solid rgba(148, 163, 184, .35); background: rgba(30, 41, 59, .9); font: 600 .72rem/1.4 ui-monospace, monospace; color: #e2e8f0; }
.gl-tries { display: inline-flex; gap: 4px; }
.gl-tries i { width: 10px; height: 10px; border-radius: 50%; background: #5eead4; box-shadow: 0 0 8px rgba(94, 234, 212, .6); transition: background-color .25s, box-shadow .25s; }
.gl-tries i.is-used { background: rgba(148, 163, 184, .35); box-shadow: none; }
.gl-zoom { position: absolute; right: .7rem; top: 50%; z-index: 3; display: grid; gap: .35rem; transform: translateY(-50%); }
.gl-zoom button { width: 40px; height: 40px; border-radius: 12px; font-size: 1.25rem; font-weight: 700; line-height: 1; }

.gl-loading { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; align-content: center; gap: .8rem; color: #cbd5e1; font-size: .9rem; }
.gl-spin { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(125, 211, 252, .25); border-top-color: #7dd3fc; animation: gl-rot .9s linear infinite; }

@keyframes gl-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes gl-pop { from { opacity: 0; transform: translate(-50%, 8px) scale(.96); } }
@keyframes gl-rot { to { transform: rotate(360deg); } }

@media (max-width: 639px) {
    .gl-stage { height: clamp(380px, calc(100svh - 230px), 620px); border-radius: 14px; }
    .gl-card { left: .5rem; right: .5rem; top: .5rem; max-width: none; padding: .5rem .7rem .5rem .5rem; gap: .6rem; }
    .gl-card-flag { width: 56px; height: 42px; }
    .gl-card-img { width: 52px; height: 52px; }
    .gl-card-q { font-size: .95rem; }
    .gl-bar { bottom: .5rem; gap: .35rem; }
    .gl-pill { min-height: 38px; padding: .3rem .55rem; font-size: .8rem; }
    .gl-pill .gl-kbd, .gl-level-name { display: none; }
    .gl-toast { bottom: 3.9rem; }
    .gl-zoom { right: .45rem; top: auto; bottom: 3.8rem; transform: none; }
    .gl-zoom button { width: 36px; height: 36px; }
}

/* Muharrir */
.gl-ed-picker { position: relative; height: clamp(260px, 42vh, 380px); border-radius: 16px; overflow: hidden; border: 1px solid rgba(125, 211, 252, .22); background: radial-gradient(ellipse at 50% 45%, #13233f 0%, #0a1222 60%, #060a14 100%); }
.gl-ed-tip { position: absolute; left: .6rem; top: .6rem; z-index: 2; max-width: calc(100% - 4.5rem); padding: .35rem .65rem; border-radius: 10px; font-size: .78rem; pointer-events: none; }
.gl-ed-tip.is-active { border-color: rgba(250, 204, 21, .6); color: #fde68a; }
.gl-seg { display: inline-flex; padding: 3px; border-radius: 10px; border: 1px solid rgb(var(--ink-border-rgb, 51 65 85)); }
.gl-seg button { padding: .3rem .7rem; border-radius: 8px; font-size: .8rem; font-weight: 600; color: inherit; opacity: .7; }
.gl-seg button.is-on { opacity: 1; background: rgba(20, 184, 166, .18); color: #2dd4bf; }
.gl-ed-country { position: relative; flex: 1; min-width: 12rem; }
.gl-ed-chip { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .88rem; }
.gl-ed-chip img, .gl-ed-opt img { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(148, 163, 184, .35); background: #fff; }
.gl-ed-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 16rem; overflow: auto; padding: .25rem; border-radius: 12px; }
.gl-ed-opt { display: flex; width: 100%; align-items: center; gap: .55rem; padding: .4rem .55rem; border-radius: 8px; text-align: left; font-size: .88rem; color: #f8fafc; }
.gl-ed-opt:hover, .gl-ed-opt.is-on { background: rgba(45, 212, 191, .16); }
.gl-ed-coords { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.gl-ed-coords input[type="number"] { width: 7.5rem; }
.gl-ed-radius { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; }
.gl-ed-radius output { min-width: 4.5rem; font-family: ui-monospace, monospace; }

@media (prefers-reduced-motion: reduce) {
    .gl-card, .gl-toast, .gl-spin { animation: none; }
}
html[data-motion-level="minimal"] .gl-card, html[data-motion-level="minimal"] .gl-toast { animation: none; }
