/* ==========================================================================
   Davra Books — O'yinlar (Games) dizayni
   Sayt tokenlari (--ink-*, --paper-*, --mist-*) ustiga quriladi: dark va light
   rejimlar avtomatik ishlaydi. Animatsiyalar faqat transform/opacity — telefonda silliq.
   ========================================================================== */

/* ── Mavzular (theme) ───────────────────────────────────────────────────── */
.gm-theme-aurora { --gm-1: 20 184 166; --gm-2: 99 102 241; --gm-3: 34 211 238; }
.gm-theme-sunset { --gm-1: 249 115 22; --gm-2: 225 29 72; --gm-3: 245 158 11; }
.gm-theme-ocean  { --gm-1: 14 165 233; --gm-2: 37 99 235; --gm-3: 45 212 191; }
.gm-theme-galaxy { --gm-1: 139 92 246; --gm-2: 236 72 153; --gm-3: 99 102 241; }
.gm-theme-forest { --gm-1: 34 197 94; --gm-2: 13 148 136; --gm-3: 132 204 22; }
.gm-theme-paper  { --gm-1: 217 119 6; --gm-2: 180 83 9; --gm-3: 245 158 11; }

.gm-accent-text { color: rgb(var(--gm-1)); }
html.light:not(.force-dark) .gm-accent-text { filter: brightness(.8) saturate(1.2); }

/* ── Umumiy ─────────────────────────────────────────────────────────────── */
.gm-root { --gm-radius: 14px; --gm-ease: cubic-bezier(.16, 1, .3, 1); --gm-spring: cubic-bezier(.34, 1.56, .64, 1); }
.gm-root > * + * { margin-top: 2rem !important; }
.gm-root *, .gm-root *::before, .gm-root *::after { -webkit-tap-highlight-color: transparent; }
.gm-hidden { display: none !important; }
@media (max-width: 479px) { .gm-hide-xs { display: none !important; } }
.gm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Hero va fon bezaklari ──────────────────────────────────────────────── */
.gm-hero {
    position: relative; overflow: hidden; isolation: isolate;
    border: 1px solid rgb(var(--ink-border-rgb)); border-radius: 20px;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(20, 184, 166, .18), transparent 55%),
        radial-gradient(120% 140% at 100% 100%, rgba(139, 92, 246, .2), transparent 55%),
        rgb(var(--ink-900-rgb));
    padding: clamp(2.25rem, 4.5vw, 3.25rem) clamp(1.5rem, 3.5vw, 2.75rem) !important;
    min-height: 330px;
    box-sizing: border-box;
}
.gm-hero-shapes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.gm-shape {
    position: absolute; display: grid; place-items: center; border-radius: 14px;
    background: rgb(var(--ink-800-rgb) / .85); border: 1px solid rgb(var(--ink-border-rgb));
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55);
    animation: gm-float 7s ease-in-out infinite; will-change: transform;
}
.gm-shape svg { width: 55%; height: 55%; }
.gm-shape:nth-child(2) { animation-duration: 8.5s; animation-delay: -2s; }
.gm-shape:nth-child(3) { animation-duration: 6.5s; animation-delay: -4s; }
.gm-shape:nth-child(4) { animation-duration: 9s; animation-delay: -1s; }
.gm-shape:nth-child(5) { animation-duration: 7.5s; animation-delay: -3s; }

.gm-hero-intro {
    position: relative;
    width: 100%;
    max-width: 620px;
}

.gm-hero-team {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 2.25rem;
}
@media (min-width: 960px) {
    .gm-hero-team {
        grid-template-columns: minmax(0, 1.35fr) minmax(320px, 390px);
        gap: clamp(2rem, 3.5vw, 3.5rem);
        justify-content: space-between;
        align-items: center;
    }
}

.gm-hero-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.25rem 2.75rem;
    margin-top: 2rem;
}
.gm-hero-stat {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-width: 80px;
}
.gm-hero-stat dt {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgb(var(--mist-rgb));
    margin: 0;
}
.gm-hero-stat dd {
    font-family: "DM Mono", monospace;
    font-size: 1.65rem;
    font-weight: 700;
    color: rgb(var(--paper-rgb));
    line-height: 1;
    margin: 0;
}

/* Jonli o'yin: katalogdagi "Xona kodi bilan kiring" kartasi */
.gm-entry-ticket {
    position: relative; display: grid; gap: .65rem; align-content: center; min-width: 0; overflow: hidden;
    padding: 1.6rem 1.6rem; border-radius: 20px;
    background: rgba(15, 23, 42, 0.9); color: #F0EDE6;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    width: 100%; max-width: 400px; box-sizing: border-box; justify-self: center; align-self: center;
}
@media (min-width: 960px) {
    .gm-entry-ticket {
        justify-self: end;
    }
}
.gm-entry-tiles { position: absolute; top: 1rem; right: 1rem; display: grid; grid-template-columns: repeat(2, 20px); gap: 4px; transform: rotate(8deg); }
.gm-entry-tiles span { display: grid; place-items: center; height: 20px; border-radius: 6px; color: #fff; font: 800 .62rem/1 "DM Mono", monospace; }
.gm-entry-tiles span:nth-child(1) { background: #0d9488; } .gm-entry-tiles span:nth-child(2) { background: #d97706; }
.gm-entry-tiles span:nth-child(3) { background: #e11d48; } .gm-entry-tiles span:nth-child(4) { background: #7c3aed; }
.gm-live-badge { display: inline-flex; align-items: center; gap: .45rem; width: fit-content; padding: .25rem .6rem; border-radius: 999px; background: rgba(20, 184, 166, .18); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, .3); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.gm-live-badge i { width: .5rem; height: .5rem; border-radius: 50%; background: #ef4444; animation: gm-live-pulse 1.6s infinite; }
@keyframes gm-live-pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); } 70% { box-shadow: 0 0 0 .45rem rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
.gm-entry-label { font: 700 clamp(1.3rem, 2.6vw, 1.75rem)/1.15 Spectral, Georgia, serif; color: #F0EDE6; }
.gm-entry-hint { margin: 0; color: #94A3B8; font-size: .875rem; }
.gm-entry-action { display: flex; align-items: stretch; gap: .5rem; min-width: 0; margin-top: .35rem; }
/* :not(#gm-x) — layoutdagi umumiy "input:not(...)" qorong‘i uslubidan ustun turishi uchun */
.gm-entry-action input:not(#gm-x) {
    flex: 1 1 auto; width: 100%; min-width: 0; min-height: 52px; padding: .4rem .6rem;
    border: 2px solid rgba(255, 255, 255, 0.14); border-radius: 12px;
    background: rgba(8, 12, 20, 0.85); color: #38bdf8; text-align: center; outline: none;
    font: 800 clamp(1.15rem, 2.4vw, 1.45rem)/1 "DM Mono", monospace; letter-spacing: .22em; text-indent: .22em;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.gm-entry-action input::placeholder { color: #64748B; opacity: 1; }
.gm-entry-action input:not(#gm-x):focus { border-color: #14b8a6; background: rgba(8, 12, 20, 1); box-shadow: 0 0 0 4px rgba(20, 184, 166, .25); }
.gm-entry-action button {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 52px; padding: 0 1.25rem;
    border-radius: 12px; color: #fff; font-weight: 800; background: linear-gradient(180deg, #14b8a6, #0d9488); box-shadow: 0 4px 0 #0b5f57;
    transition: transform .15s, box-shadow .15s, filter .2s;
}
.gm-entry-action button:hover { filter: brightness(1.08); }
.gm-entry-action button:active { transform: translateY(3px); box-shadow: 0 1px 0 #0b5f57; }
.gm-entry-action :focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
.gm-entry-host { margin: .3rem 0 0; padding-top: .75rem; border-top: 1px dashed rgba(255, 255, 255, 0.12); color: #94A3B8; font-size: .8125rem; }
.gm-entry-host a { color: #2DD4BF; font-weight: 800; transition: color .2s; }
.gm-entry-host a:hover { color: #5eead4; text-decoration: underline; }

/* Light rejim uchun moslashuv */
html.light:not(.force-dark) .gm-entry-ticket {
    background: #fff; color: #11252c; border: 1px solid #e2e8f0;
    box-shadow: 0 8px 0 rgba(0, 0, 0, .08), 0 24px 48px -24px rgba(0, 0, 0, .2);
}
html.light:not(.force-dark) .gm-live-badge {
    background: rgba(20, 184, 166, .14); color: #0f766e; border: none;
}
html.light:not(.force-dark) .gm-entry-label { color: #11252c; }
html.light:not(.force-dark) .gm-entry-hint { color: #4b6168; }
html.light:not(.force-dark) .gm-entry-action input:not(#gm-x) {
    background: #f4f8f7; color: #11252c; border: 2px solid #cfdcd9;
}
html.light:not(.force-dark) .gm-entry-action input::placeholder { color: #9bb0ad; }
html.light:not(.force-dark) .gm-entry-action input:not(#gm-x):focus {
    background: #fff; border-color: #14b8a6; box-shadow: 0 0 0 4px rgba(20, 184, 166, .2);
}
html.light:not(.force-dark) .gm-entry-host { border-top-color: #cfdcd9; color: #4b6168; }
html.light:not(.force-dark) .gm-entry-host a { color: #0f766e; }

/* O'yin sahifasi: jonli xona ochish */
.gm-host-setup {
    display: grid; gap: 1rem; scroll-margin-top: 6rem; padding: clamp(1rem, 3vw, 1.4rem); border-radius: 16px;
    border: 1px solid rgb(var(--ink-border-rgb));
    background: radial-gradient(120% 140% at 0% 0%, rgba(20, 184, 166, .12), transparent 60%), rgb(var(--ink-900-rgb));
}
.gm-host-head { display: grid; gap: .35rem; }
.gm-host-setup .gm-live-badge { color: #2dd4bf; }
html.light:not(.force-dark) .gm-host-setup .gm-live-badge { color: #0f766e; }
.gm-host-form { display: grid; gap: .9rem; }
.gm-host-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.gm-host-legend { margin-bottom: .45rem; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgb(var(--mist-rgb)); }
.gm-host-options { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); }
.gm-host-options.is-time { grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); }
.gm-host-option { position: relative; cursor: pointer; }
.gm-host-option input { position: absolute; opacity: 0; pointer-events: none; }
.gm-host-option > span {
    display: grid; align-content: center; gap: .1rem; min-height: 48px; padding: .5rem .75rem; border-radius: 12px;
    border: 2px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-950-rgb)); transition: border-color .2s, background-color .2s, transform .15s;
}
.gm-host-option:hover > span { transform: translateY(-2px); }
.gm-host-option b { font-size: .9rem; }
.gm-host-option small { font-size: .72rem; color: rgb(var(--mist-rgb)); }
.gm-host-options.is-time .gm-host-option > span { text-align: center; }
.gm-host-option input:checked + span { border-color: #14b8a6; background: rgba(20, 184, 166, .12); box-shadow: 0 0 0 3px rgba(20, 184, 166, .18); }
.gm-host-option input:focus-visible + span { outline: 3px solid #fbbf24; outline-offset: 2px; }
.gm-host-names { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.gm-host-name { --tc: 245 158 11; display: flex; align-items: center; gap: .5rem; min-width: 0; }
.gm-host-name[data-team="2"] { --tc: 14 165 233; } .gm-host-name[data-team="3"] { --tc: 244 63 94; } .gm-host-name[data-team="4"] { --tc: 139 92 246; }
.gm-host-name-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgb(var(--tc)); color: #fff; }
.gm-host-name-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gm-host-name .ks-input:not(#gm-x) { flex: 1; min-width: 0; min-height: 42px; border-color: rgb(var(--tc) / .45); }
.gm-host-name .ks-input:not(#gm-x):focus { border-color: rgb(var(--tc)); box-shadow: 0 0 0 3px rgb(var(--tc) / .2); }
.gm-host-names-hint { margin: .35rem 0 0; font-size: .75rem; color: rgb(var(--mist-rgb)); }
.gm-host-form .gm-btn { justify-self: start; }
.gm-hosted-room { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; min-height: 44px; padding: .65rem .8rem; border: 1px solid rgb(var(--ink-border-rgb)); border-radius: 8px; }
.gm-hosted-room strong { flex: 1 1 12rem; overflow-wrap: anywhere; }
.gm-hosted-room:hover, .gm-hosted-room:focus-visible { border-color: #279d91; }
.gm-team-label { font-size: .73rem; font-weight: 650; color: rgb(var(--paper-rgb)); }
.gm-team-label::before { content: ''; display: inline-block; width: .55em; height: .55em; border: 2px solid #279d91; margin-inline-end: .4em; transform: rotate(45deg); }


@keyframes gm-float {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--r, -6deg)); }
    50% { transform: translate3d(0, -14px, 0) rotate(calc(var(--r, -6deg) * -1)); }
}

/* ── Katalog qidiruvi ──────────────────────────────────────────────────────── */
.gm-search-form {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
@media (min-width: 640px) {
    .gm-search-form {
        flex-direction: row;
        align-items: center;
    }
}
.gm-search-label {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    width: 100%;
}
.gm-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.15rem;
    height: 1.15rem;
    color: rgb(var(--mist-rgb));
    pointer-events: none;
    z-index: 2;
    transition: color .2s;
}
.gm-search-input {
    width: 100%;
    min-height: 48px;
    padding: .65rem 1rem .65rem 2.85rem !important;
    font-size: .9375rem;
    line-height: 1.4;
    border-radius: 12px;
    border: 1px solid rgb(var(--ink-border-rgb));
    background: rgb(var(--ink-950-rgb));
    color: rgb(var(--paper-rgb));
    outline: none;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
    box-sizing: border-box;
}
.gm-search-input::placeholder {
    color: rgb(var(--mist-rgb) / .7);
}
.gm-search-input:focus {
    border-color: #14b8a6;
    background: rgb(var(--ink-900-rgb));
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .2);
}
.gm-search-label:focus-within .gm-search-icon {
    color: #14b8a6;
}
html.light:not(.force-dark) .gm-search-input {
    background: #fff;
    border-color: #cbd5e1;
    color: #0f172a;
}
html.light:not(.force-dark) .gm-search-input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .15);
}

/* Qidiruv tozalash tugmasi (✕) */
.gm-search-clear {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgb(var(--mist-rgb));
    border: none;
    cursor: pointer;
    transition: background-color .2s, color .2s, transform .2s var(--gm-spring, ease);
    z-index: 3;
}
.gm-search-clear:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: translateY(-50%) scale(1.12);
}
.gm-search-clear:active {
    transform: translateY(-50%) scale(0.95);
}
.gm-search-clear svg {
    width: 14px;
    height: 14px;
}
.gm-search-clear.gm-hidden {
    display: none !important;
}

/* Qidiruv indikatori (spinner) */
.gm-search-spinner {
    position: absolute;
    right: 2.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(20, 184, 166, 0.25);
    border-top-color: #14b8a6;
    border-radius: 50%;
    animation: gm-search-spin .6s linear infinite;
    pointer-events: none;
    z-index: 3;
}
@keyframes gm-search-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}
.gm-search-spinner.gm-hidden {
    display: none !important;
}

/* Jonli qidiruvda topilmadi holati */
.gm-search-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 3.5rem 1.5rem;
    border-radius: 16px;
    border: 1px dashed rgb(var(--ink-border-rgb));
    background: rgb(var(--ink-900-rgb) / .5);
    text-align: center;
    animation: gm-card-enter .35s var(--gm-ease) backwards;
}
.gm-search-empty-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(20, 184, 166, .12);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, .25);
}
.gm-search-empty-icon svg {
    width: 30px;
    height: 30px;
}
.gm-search-empty h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: rgb(var(--paper-rgb));
    margin: 0;
}
.gm-search-empty p {
    font-size: .875rem;
    color: rgb(var(--mist-rgb));
    max-width: 24rem;
    margin: 0;
}

/* ── Filtr chiplari ─────────────────────────────────────────────────────── */
.gm-chips-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.gm-chips {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: .2rem .25rem .35rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-y pan-x;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    scroll-behavior: smooth;
    width: 100%;
}
.gm-chips::-webkit-scrollbar { display: none; }
.gm-chips.is-dragging {
    cursor: grabbing !important;
    scroll-behavior: auto !important;
}
.gm-chips.is-dragging .gm-chip {
    pointer-events: none;
}
.gm-chips-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgb(var(--ink-900-rgb) / .92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgb(var(--ink-border-rgb));
    color: rgb(var(--paper-rgb));
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
    cursor: pointer;
    transition: opacity .2s, transform .15s, background-color .15s, color .15s;
    opacity: 0;
    pointer-events: none;
}
.gm-chips-arrow:hover {
    background: rgb(var(--ink-800-rgb));
    transform: translateY(-50%) scale(1.1);
    color: #22d3ee;
}
.gm-chips-arrow:active {
    transform: translateY(-50%) scale(.96);
}
.gm-chips-arrow.is-visible {
    display: inline-flex;
    opacity: 1;
    pointer-events: auto;
}
.gm-chips-arrow--left {
    left: -10px;
}
.gm-chips-arrow--right {
    right: -10px;
}
html.light:not(.force-dark) .gm-chips-arrow:hover {
    color: #0891b2;
}
@media (pointer: coarse) {
    .gm-chips-arrow { display: none !important; }
}
.gm-chip {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: 0 .85rem;
    border-radius: 999px; border: 1px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-900-rgb));
    color: rgb(var(--mist-rgb)); font-size: .8125rem; font-weight: 500; white-space: nowrap;
    user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
    transition: background-color .2s var(--gm-ease, ease), color .2s, border-color .2s, transform .15s;
}
.gm-chip:hover { color: rgb(var(--paper-rgb)); border-color: rgb(var(--ink-600-rgb)); }
.gm-chip:active { transform: scale(.97); }
.gm-chip.is-active { color: rgb(var(--paper-rgb)); background: rgb(var(--ink-800-rgb)); border-color: rgba(34, 211, 238, .55); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .25); }
.gm-chip svg { width: 15px; height: 15px; }

/* ── O'yin kartasi (katalog) ────────────────────────────────────────────── */
.gm-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.gm-card {
    position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px;
    border: 1px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-900-rgb));
    transition: transform .35s var(--gm-ease, ease), box-shadow .35s, border-color .25s, opacity .22s ease, filter .22s ease;
    will-change: transform, opacity;
}
.gm-card.is-leaving {
    opacity: 0 !important;
    transform: scale(0.92) translateY(6px) !important;
    pointer-events: none !important;
}
.gm-card.is-hidden {
    display: none !important;
}
.gm-card.is-entering {
    animation: gm-card-enter .32s cubic-bezier(.34, 1.56, .64, 1) backwards;
}
@keyframes gm-card-enter {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Qidiruv mosligi (highlight) nishoni */
.gm-hl {
    background: rgba(20, 184, 166, 0.28);
    color: #2dd4bf;
    border-radius: 4px;
    padding: 0.05em 0.25em;
    font-weight: 700;
    box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.4);
}
html.light:not(.force-dark) .gm-hl {
    background: rgba(13, 148, 136, 0.16);
    color: #0f766e;
    box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.3);
}
.gm-card:hover { transform: translateY(-4px); border-color: rgb(var(--gm-1) / .55); box-shadow: 0 22px 44px -22px rgb(var(--gm-1) / .55); }
.gm-card:focus-within { border-color: rgb(var(--gm-1) / .7); }
.gm-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.gm-card .gm-card-body { padding: .85rem .95rem 1rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }

.gm-cover {
    position: relative; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate;
    background:
        radial-gradient(90% 120% at 15% 10%, rgb(var(--gm-3) / .9), transparent 60%),
        radial-gradient(90% 120% at 90% 90%, rgb(var(--gm-2) / .95), transparent 60%),
        linear-gradient(135deg, rgb(var(--gm-1)), rgb(var(--gm-2)));
}
.gm-cover::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .22;
    background-image: radial-gradient(rgba(255, 255, 255, .9) 1.2px, transparent 1.3px); background-size: 18px 18px;
}
.gm-cover img.gm-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gm-cover .gm-cover-book { position: absolute; right: 10%; bottom: -12%; width: 30%; aspect-ratio: 2 / 3; border-radius: 4px; object-fit: cover; box-shadow: 0 14px 28px rgba(0, 0, 0, .45); transform: rotate(8deg); transition: transform .45s var(--gm-ease, ease); }
.gm-card:hover .gm-cover-book { transform: rotate(3deg) translateY(-6px); }
.gm-cover-icon { position: absolute; left: 1rem; top: 50%; width: 30%; max-width: 76px; aspect-ratio: 1; transform: translateY(-50%); color: rgba(255, 255, 255, .95); filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .25)); transition: transform .45s var(--gm-spring, ease); }
.gm-card:hover .gm-cover-icon { transform: translateY(-50%) rotate(-8deg) scale(1.08); }
.gm-cover-title { position: absolute; left: 1rem; right: 1rem; bottom: .75rem; color: #fff; font-family: Spectral, Georgia, serif; font-weight: 700; font-size: 1.05rem; line-height: 1.25; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gm-cover-badge { position: absolute; left: .7rem; top: .7rem; display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border-radius: 999px; background: rgba(7, 9, 14, .55); color: #fff; font-size: .6875rem; font-weight: 600; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gm-cover-badge svg { width: 12px; height: 12px; }
.gm-cover-plays { left: auto; right: .7rem; font-family: "DM Mono", monospace; }

.gm-line-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Rang yorliqlari (kategoriya) ───────────────────────────────────────── */
.gm-tone-amber { --tone: 245 158 11; } .gm-tone-sky { --tone: 14 165 233; } .gm-tone-emerald { --tone: 16 185 129; }
.gm-tone-orange { --tone: 249 115 22; } .gm-tone-violet { --tone: 139 92 246; } .gm-tone-teal { --tone: 20 184 166; }
.gm-tone-rose { --tone: 244 63 94; } .gm-tone-cyan { --tone: 6 182 212; } .gm-tone-indigo { --tone: 99 102 241; } .gm-tone-lime { --tone: 132 204 22; }
.gm-tag { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .5rem; border-radius: 6px; font-size: .6875rem; font-weight: 600; color: rgb(var(--tone, 139 155 173)); background: rgb(var(--tone, 139 155 173) / .12); border: 1px solid rgb(var(--tone, 139 155 173) / .25); }
html.light:not(.force-dark) .gm-tag { filter: brightness(.78) saturate(1.3); }
.gm-tag svg { width: 12px; height: 12px; }

/* ── O'yin sahnasi (stage) ──────────────────────────────────────────────── */
.gm-stage {
    position: relative; overflow: hidden; isolation: isolate; border-radius: 16px;
    border: 1px solid rgb(var(--ink-border-rgb));
    background:
        radial-gradient(100% 80% at 0% 0%, rgb(var(--gm-1) / .22), transparent 60%),
        radial-gradient(100% 80% at 100% 100%, rgb(var(--gm-2) / .24), transparent 60%),
        rgb(var(--ink-950-rgb));
    min-height: 440px; display: flex; flex-direction: column; color: rgb(var(--paper-rgb));
}
@media (min-width: 768px) { .gm-stage { min-height: 540px; } }
.gm-stage:fullscreen { border-radius: 0; min-height: 100vh; }
.gm-stage:-webkit-full-screen { border-radius: 0; min-height: 100vh; }
.gm-stage-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.gm-orb { position: absolute; border-radius: 50%; will-change: transform; animation: gm-orb 16s ease-in-out infinite; }
.gm-orb-1 { width: 55%; aspect-ratio: 1; left: -15%; top: -25%; background: radial-gradient(circle, rgb(var(--gm-1) / .32), transparent 68%); }
.gm-orb-2 { width: 50%; aspect-ratio: 1; right: -15%; bottom: -30%; background: radial-gradient(circle, rgb(var(--gm-2) / .3), transparent 68%); animation-duration: 19s; animation-delay: -6s; }
.gm-orb-3 { width: 30%; aspect-ratio: 1; right: 20%; top: 10%; background: radial-gradient(circle, rgb(var(--gm-3) / .18), transparent 68%); animation-duration: 13s; animation-delay: -3s; }
@keyframes gm-orb { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 33% { transform: translate3d(6%, 8%, 0) scale(1.08); } 66% { transform: translate3d(-5%, 4%, 0) scale(.95); } }
.gm-stage-grid { position: absolute; inset: 0; opacity: .06; background-image: linear-gradient(rgb(var(--paper-rgb)) 1px, transparent 1px), linear-gradient(90deg, rgb(var(--paper-rgb)) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }

.gm-hud { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem .9rem; border-bottom: 1px solid rgb(var(--ink-border-rgb) / .7); background: rgb(var(--ink-900-rgb) / .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.gm-hud-left, .gm-hud-right { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.gm-pill { display: inline-flex; align-items: center; gap: .35rem; min-height: 32px; padding: 0 .7rem; border-radius: 999px; background: rgb(var(--ink-800-rgb) / .9); border: 1px solid rgb(var(--ink-border-rgb)); font-family: "DM Mono", monospace; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.gm-pill svg { width: 15px; height: 15px; }
.gm-pill-score { color: rgb(var(--gm-3)); }
html.light:not(.force-dark) .gm-pill-score { color: rgb(var(--gm-2)); }
.gm-icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-800-rgb) / .9); color: rgb(var(--mist-rgb)); transition: color .2s, background-color .2s, transform .15s; }
.gm-icon-btn:hover { color: rgb(var(--paper-rgb)); }
.gm-icon-btn:active { transform: scale(.94); }
.gm-icon-btn svg { width: 18px; height: 18px; }

.gm-progress { height: 4px; background: rgb(var(--ink-border-rgb) / .6); overflow: hidden; }
.gm-progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, rgb(var(--gm-1)), rgb(var(--gm-3))); transition: width .5s var(--gm-ease, ease); }

.gm-body { position: relative; flex: 1; display: flex; flex-direction: column; padding: 1rem; }
@media (min-width: 640px) { .gm-body { padding: 1.5rem; } }
.gm-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1rem; }

/* ── Tugmalar ───────────────────────────────────────────────────────────── */
.gm-btn {
    --b: var(--gm-1); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 48px; padding: 0 1.4rem; border-radius: 12px; border: 0; font-weight: 700; font-size: 1rem; color: #fff;
    text-decoration: none;
    background: linear-gradient(180deg, rgb(var(--b) / 1), rgb(var(--b) / .85)); box-shadow: 0 4px 0 rgb(var(--b) / .45), 0 12px 24px -10px rgb(var(--b) / .7);
    transition: transform .12s ease, box-shadow .12s ease, filter .2s; cursor: pointer; user-select: none;
}
.gm-btn:hover { filter: brightness(1.08); }
.gm-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgb(var(--b) / .45), 0 6px 14px -8px rgb(var(--b) / .7); }
.gm-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.gm-btn svg { width: 20px; height: 20px; }
.gm-btn-lg { min-height: 56px; padding: 0 2rem; font-size: 1.125rem; border-radius: 14px; }
.gm-btn-ghost { color: rgb(var(--paper-rgb)); background: rgb(var(--ink-800-rgb)); box-shadow: 0 3px 0 rgb(var(--ink-border-rgb)); border: 1px solid rgb(var(--ink-border-rgb)); }
.gm-btn-ghost:active { box-shadow: 0 0 0 rgb(var(--ink-border-rgb)); }
.gm-btn-ok { --b: 16 185 129; }
.gm-btn-bad { --b: 244 63 94; }
.gm-btn-gold { --b: 245 158 11; color: #1a1205; }

/* ── Intro / countdown / natija ─────────────────────────────────────────── */
.gm-intro-icon { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 26px; color: #fff; background: linear-gradient(135deg, rgb(var(--gm-1)), rgb(var(--gm-2))); box-shadow: 0 20px 50px -18px rgb(var(--gm-2) / .9); animation: gm-bob 3.2s ease-in-out infinite; }
.gm-intro-icon svg { width: 52px; height: 52px; }
@keyframes gm-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
.gm-title { font-family: Spectral, Georgia, serif; font-weight: 700; font-size: clamp(1.5rem, 4.5vw, 2.25rem); line-height: 1.2; letter-spacing: -.01em; }
.gm-count { font-family: "DM Mono", monospace; font-weight: 700; font-size: clamp(5rem, 22vw, 9rem); line-height: 1; color: rgb(var(--gm-3)); text-shadow: 0 10px 40px rgb(var(--gm-2) / .6); animation: gm-count .9s var(--gm-spring) both; }
@keyframes gm-count { 0% { transform: scale(2.2); opacity: 0; } 35% { transform: scale(.9); opacity: 1; } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(.6); opacity: 0; } }

.gm-mode-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.gm-mode-switch button { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 .8rem; border-radius: 999px; border: 1px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-900-rgb) / .8); color: rgb(var(--mist-rgb)); font-size: .8125rem; font-weight: 600; transition: all .2s; }
.gm-mode-switch button.is-active, .gm-mode-switch button:hover { color: rgb(var(--paper-rgb)); border-color: rgb(var(--gm-1) / .7); background: rgb(var(--gm-1) / .14); }
.gm-mode-switch svg { width: 16px; height: 16px; }

.gm-result-score { font-family: "DM Mono", monospace; font-weight: 700; font-size: clamp(3rem, 12vw, 4.5rem); line-height: 1; background: linear-gradient(135deg, rgb(var(--gm-3)), rgb(var(--gm-1))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gm-stars { display: flex; gap: .5rem; justify-content: center; }
.gm-star { width: 46px; height: 46px; color: rgb(var(--ink-600-rgb)); transform: scale(0); animation: gm-star .6s var(--gm-spring) forwards; }
.gm-star.is-on { color: #f59e0b; filter: drop-shadow(0 6px 14px rgba(245, 158, 11, .55)); }
.gm-star:nth-child(2) { animation-delay: .15s; width: 58px; height: 58px; margin-top: -8px; }
.gm-star:nth-child(3) { animation-delay: .3s; }
@keyframes gm-star { 0% { transform: scale(0) rotate(-90deg); } 100% { transform: scale(1) rotate(0); } }
.gm-stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; width: 100%; max-width: 420px; }
.gm-stat { padding: .65rem .5rem; border-radius: 12px; background: rgb(var(--ink-900-rgb) / .8); border: 1px solid rgb(var(--ink-border-rgb)); }
.gm-stat dt { font-size: .6875rem; color: rgb(var(--mist-rgb)); }
.gm-stat dd { margin-top: .15rem; font-family: "DM Mono", monospace; font-weight: 700; font-size: 1.05rem; }
.gm-reward { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 999px; background: rgba(245, 158, 11, .14); border: 1px solid rgba(245, 158, 11, .4); color: #f59e0b; font-weight: 700; animation: gm-pop .6s var(--gm-spring) .5s backwards; }
html.light:not(.force-dark) .gm-reward { color: #b45309; }
.gm-reward svg { width: 18px; height: 18px; animation: gm-coin 1.4s ease-in-out .9s 2; }
@keyframes gm-coin { 0%, 100% { transform: rotateY(0); } 50% { transform: rotateY(180deg); } }
.gm-mini-board { width: 100%; max-width: 420px; text-align: left; }
.gm-mini-board li { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 10px; font-size: .875rem; }
.gm-mini-board li:nth-child(odd) { background: rgb(var(--ink-900-rgb) / .7); }
.gm-mini-board li.is-me { background: rgb(var(--gm-1) / .16); outline: 1px solid rgb(var(--gm-1) / .45); }

/* ── Viktorina ──────────────────────────────────────────────────────────── */
.gm-q-wrap { width: 100%; max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.gm-q-card { position: relative; padding: 1.25rem 1.1rem 1.1rem; border-radius: 16px; background: rgb(var(--ink-900-rgb) / .92); border: 1px solid rgb(var(--ink-border-rgb)); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .6); text-align: center; animation: gm-pop .45s var(--gm-spring) backwards; }
.gm-q-num { font-family: "DM Mono", monospace; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--mist-rgb)); }
.gm-q-text { margin-top: .35rem; font-family: Spectral, Georgia, serif; font-weight: 700; font-size: clamp(1.2rem, 3.6vw, 1.8rem); line-height: 1.3; }
.gm-timer { position: relative; width: 58px; height: 58px; margin: -2.4rem auto .25rem; }
.gm-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gm-timer circle { fill: none; stroke-width: 6; }
.gm-timer .gm-timer-bg { stroke: rgb(var(--ink-800-rgb)); fill: rgb(var(--ink-900-rgb)); }
.gm-timer .gm-timer-fg { stroke: rgb(var(--gm-3)); stroke-linecap: round; transition: stroke .3s; }
.gm-timer.is-low .gm-timer-fg { stroke: #f43f5e; }
.gm-timer span { position: absolute; inset: 0; display: grid; place-items: center; font-family: "DM Mono", monospace; font-weight: 700; font-size: 1.05rem; }
.gm-timer.is-low span { color: #fda4af; animation: gm-tick .5s ease-in-out infinite alternate; }
@keyframes gm-tick { to { transform: scale(1.15); } }

.gm-options { display: grid; gap: .65rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .gm-options { grid-template-columns: 1fr 1fr; gap: .85rem; } }
.gm-option {
    --o: 245 158 11; position: relative; display: flex; align-items: center; gap: .8rem; min-height: 64px; padding: .8rem 1rem;
    border-radius: 14px; border: 0; text-align: left; color: #fff; font-weight: 600; font-size: 1rem; line-height: 1.35;
    background: linear-gradient(180deg, rgb(var(--o)), rgb(var(--o) / .82)); box-shadow: 0 5px 0 rgb(var(--o) / .45);
    transition: transform .14s ease, box-shadow .14s ease, opacity .3s, filter .3s; animation: gm-rise .45s var(--gm-ease) backwards;
}
@media (min-width: 640px) { .gm-option { min-height: 84px; font-size: 1.075rem; } }
.gm-option:nth-child(2) { animation-delay: .06s; } .gm-option:nth-child(3) { animation-delay: .12s; } .gm-option:nth-child(4) { animation-delay: .18s; }
.gm-option:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 7px 0 rgb(var(--o) / .45); }
.gm-option:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 rgb(var(--o) / .45); }
.gm-option:disabled { cursor: default; }
.gm-option-key { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .22); font-family: "DM Mono", monospace; font-weight: 700; }
.gm-option-mark { margin-left: auto; width: 28px; height: 28px; flex: 0 0 auto; }
.gm-opt-0 { --o: 245 158 11; } .gm-opt-1 { --o: 14 165 233; } .gm-opt-2 { --o: 244 63 94; } .gm-opt-3 { --o: 16 185 129; }
.gm-opt-0, .gm-opt-0 .gm-option-key { color: #1c1404; }
.gm-option.is-dim { animation: none; opacity: .35; filter: grayscale(.6); }
.gm-option.is-correct { --o: 16 185 129; color: #fff; animation: gm-correct .6s var(--gm-spring); opacity: 1; filter: none; }
.gm-option.is-correct .gm-option-key { color: #fff; }
.gm-option.is-wrong { --o: 244 63 94; color: #fff; animation: gm-shake .45s ease; opacity: 1; filter: none; }
.gm-option.is-wrong .gm-option-key { color: #fff; }
.gm-tf { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.gm-tf .gm-option { justify-content: center; flex-direction: column; min-height: 110px; text-align: center; font-size: 1.15rem; }
.gm-tf .gm-option svg { width: 34px; height: 34px; }

.gm-feedback { min-height: 2.25rem; display: flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 700; }
.gm-feedback.is-ok { color: #34d399; } .gm-feedback.is-bad { color: #fda4af; }
html.light:not(.force-dark) .gm-feedback.is-ok { color: #047857; }
html.light:not(.force-dark) .gm-feedback.is-bad { color: #be123c; }
.gm-points-fly { position: absolute; left: 50%; top: 30%; font-family: "DM Mono", monospace; font-weight: 800; font-size: 2rem; color: rgb(var(--gm-3)); text-shadow: 0 6px 24px rgb(var(--gm-2) / .7); pointer-events: none; animation: gm-fly 1.1s var(--gm-ease) forwards; }
@keyframes gm-fly { 0% { transform: translate(-50%, 20px) scale(.6); opacity: 0; } 25% { transform: translate(-50%, 0) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -60px) scale(1); opacity: 0; } }
.gm-explain { max-width: 640px; margin: 0 auto; padding: .65rem .9rem; border-radius: 12px; background: rgb(var(--ink-900-rgb) / .85); border: 1px dashed rgb(var(--ink-border-rgb)); font-size: .9rem; color: rgb(var(--mist-rgb)); animation: gm-pop .4s var(--gm-ease) backwards; }
.gm-streak { position: absolute; right: 1rem; top: .75rem; padding: .25rem .65rem; border-radius: 999px; background: linear-gradient(90deg, #f59e0b, #f43f5e); color: #fff; font-weight: 800; font-size: .8125rem; animation: gm-pop .5s var(--gm-spring) backwards; }

/* ── Moslashtirish (match) ──────────────────────────────────────────────── */
.gm-match { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; width: 100%; max-width: 860px; margin: 0 auto; }
@media (min-width: 640px) { .gm-match { gap: 1rem 2.5rem; } }
.gm-match-col { display: flex; flex-direction: column; gap: .6rem; }
.gm-tile {
    position: relative; display: flex; align-items: center; justify-content: center; min-height: 64px; padding: .6rem .7rem;
    border-radius: 12px; border: 2px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-900-rgb) / .95); color: rgb(var(--paper-rgb));
    font-weight: 600; font-size: .9rem; line-height: 1.3; text-align: center; box-shadow: 0 4px 0 rgb(var(--ink-border-rgb));
    transition: transform .18s var(--gm-ease), border-color .18s, background-color .18s, box-shadow .18s, opacity .35s; animation: gm-rise .4s var(--gm-ease) backwards;
}
@media (min-width: 640px) { .gm-tile { font-size: 1rem; min-height: 72px; } }
.gm-tile:hover:not(:disabled) { border-color: rgb(var(--gm-1) / .6); transform: translateY(-2px); }
.gm-tile.is-selected { border-color: rgb(var(--gm-3)); background: rgb(var(--gm-1) / .2); transform: translateY(-3px) scale(1.02); box-shadow: 0 0 0 4px rgb(var(--gm-3) / .2), 0 6px 0 rgb(var(--gm-1) / .6); }
.gm-tile.is-wrong { border-color: #f43f5e; animation: gm-shake .45s ease; }
.gm-tile.is-matched { border-color: #10b981; background: rgba(16, 185, 129, .16); animation: gm-matched .55s var(--gm-spring) forwards; pointer-events: none; }
@keyframes gm-matched { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(.94); opacity: .45; } }
.gm-tile-term { font-family: Spectral, Georgia, serif; font-weight: 700; font-size: 1rem; }
@media (min-width: 640px) { .gm-tile-term { font-size: 1.1rem; } }

/* ── Kartalar (xotira va flesh) ─────────────────────────────────────────── */
.gm-memory { display: grid; gap: .5rem; width: 100%; max-width: 820px; margin: 0 auto; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
@media (min-width: 640px) { .gm-memory { gap: .8rem; } }
.gm-flip { position: relative; perspective: 900px; aspect-ratio: 1 / 1.05; border: 0; padding: 0; background: none; animation: gm-rise .45s var(--gm-ease) backwards; }
.gm-flip-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .55s var(--gm-ease); }
.gm-flip.is-open .gm-flip-inner, .gm-flip.is-done .gm-flip-inner { transform: rotateY(180deg); }
.gm-face { position: absolute; inset: 0; display: grid; place-items: center; padding: .4rem; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.gm-face-back { background: linear-gradient(135deg, rgb(var(--gm-1)), rgb(var(--gm-2))); box-shadow: 0 4px 0 rgb(var(--gm-2) / .5); color: rgba(255, 255, 255, .9); }
.gm-face-back::after { content: ""; position: absolute; inset: 6px; border-radius: 8px; border: 2px dashed rgba(255, 255, 255, .3); }
.gm-face-back svg { width: 40%; height: 40%; }
.gm-face-front { transform: rotateY(180deg); background: rgb(var(--ink-900-rgb)); border: 2px solid rgb(var(--gm-1) / .6); color: rgb(var(--paper-rgb)); font-weight: 600; font-size: clamp(.7rem, 2.4vw, .95rem); line-height: 1.25; text-align: center; word-break: break-word; }
.gm-flip.is-done .gm-face-front { border-color: #10b981; background: rgba(16, 185, 129, .14); animation: gm-glow .6s ease; }
.gm-flip.is-miss .gm-face-front { border-color: #f43f5e; }
.gm-flip:not(.is-open):not(.is-done):hover .gm-flip-inner { transform: rotateY(12deg); }
@keyframes gm-glow { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); } 100% { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); } }

.gm-flash-stage { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 4 / 3; perspective: 1200px; touch-action: pan-y; }
@media (max-width: 480px) { .gm-flash-stage { aspect-ratio: 4 / 3.6; } }
.gm-flash { position: absolute; inset: 0; cursor: pointer; transform-style: preserve-3d; transition: transform .6s var(--gm-ease); animation: gm-card-in .5s var(--gm-ease) backwards; }
.gm-flash.is-flipped { transform: rotateY(180deg); }
.gm-flash .gm-face { padding: 1.5rem; border-radius: 18px; font-size: clamp(1.15rem, 4vw, 1.6rem); font-weight: 700; text-align: center; line-height: 1.35; }
.gm-flash .gm-face-back-side { transform: rotateY(180deg); background: rgb(var(--ink-900-rgb)); border: 2px solid rgb(var(--gm-1) / .55); color: rgb(var(--paper-rgb)); font-family: "DM Sans", sans-serif; font-weight: 600; }
.gm-flash .gm-face-front-side { background: linear-gradient(145deg, rgb(var(--gm-1)), rgb(var(--gm-2))); color: #fff; font-family: Spectral, Georgia, serif; box-shadow: 0 24px 50px -24px rgb(var(--gm-2) / .9); }
.gm-flash-hint { position: absolute; bottom: .8rem; left: 0; right: 0; font-family: "DM Sans", sans-serif; font-size: .75rem; font-weight: 500; opacity: .75; }
.gm-flash-wrap { transition: transform .35s var(--gm-ease), opacity .35s; position: absolute; inset: 0; transform-style: preserve-3d; }
@keyframes gm-card-in { 0% { transform: translateY(24px) scale(.94); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ── Anagramma ──────────────────────────────────────────────────────────── */
.gm-slots, .gm-letters { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
@media (min-width: 640px) { .gm-slots, .gm-letters { gap: .55rem; } }
.gm-slot, .gm-letter { width: clamp(38px, 10vw, 54px); height: clamp(44px, 11.5vw, 60px); border-radius: 10px; display: grid; place-items: center; font-family: "DM Mono", monospace; font-weight: 700; font-size: clamp(1.1rem, 4vw, 1.5rem); text-transform: uppercase; }
.gm-slot { border: 2px dashed rgb(var(--ink-600-rgb)); background: rgb(var(--ink-900-rgb) / .6); color: rgb(var(--paper-rgb)); transition: border-color .2s, background-color .2s, transform .2s; }
.gm-slot.is-filled { border-style: solid; border-color: rgb(var(--gm-1)); background: rgb(var(--gm-1) / .18); animation: gm-pop .3s var(--gm-spring); }
.gm-slot.is-gap { width: .8rem; border: 0; background: none; }
.gm-slots.is-ok .gm-slot.is-filled { border-color: #10b981; background: rgba(16, 185, 129, .2); animation: gm-wave .5s var(--gm-spring) backwards; }
.gm-slots.is-ok .gm-slot:nth-child(2) { animation-delay: .04s; } .gm-slots.is-ok .gm-slot:nth-child(3) { animation-delay: .08s; } .gm-slots.is-ok .gm-slot:nth-child(4) { animation-delay: .12s; } .gm-slots.is-ok .gm-slot:nth-child(5) { animation-delay: .16s; } .gm-slots.is-ok .gm-slot:nth-child(6) { animation-delay: .2s; }
.gm-slots.is-bad { animation: gm-shake .45s ease; }
.gm-slots.is-bad .gm-slot.is-filled { border-color: #f43f5e; background: rgba(244, 63, 94, .16); }
.gm-letter { border: 0; color: #fff; background: linear-gradient(180deg, rgb(var(--gm-1)), rgb(var(--gm-2))); box-shadow: 0 4px 0 rgb(var(--gm-2) / .6); transition: transform .14s, box-shadow .14s, opacity .2s; animation: gm-rise .4s var(--gm-spring) backwards; }
.gm-letter:active { transform: translateY(3px); box-shadow: 0 1px 0 rgb(var(--gm-2) / .6); }
.gm-letter.is-used { animation: none; opacity: 0; pointer-events: none; transform: scale(.5); }
@keyframes gm-wave { 0% { transform: translateY(0); } 40% { transform: translateY(-10px); } 100% { transform: translateY(0); } }
.gm-hint-box { max-width: 520px; margin: 0 auto; padding: .7rem 1rem; border-radius: 12px; background: rgb(var(--ink-900-rgb) / .85); border: 1px solid rgb(var(--ink-border-rgb)); font-size: .95rem; }

/* ── Gapni to'ldirish ───────────────────────────────────────────────────── */
.gm-sentence { max-width: 760px; margin: 0 auto; padding: 1.2rem 1.1rem; border-radius: 16px; background: rgb(var(--ink-900-rgb) / .92); border: 1px solid rgb(var(--ink-border-rgb)); font-family: Spectral, Georgia, serif; font-size: clamp(1.15rem, 3.6vw, 1.6rem); line-height: 1.9; text-align: center; animation: gm-pop .45s var(--gm-spring) backwards; }
.gm-blank { display: inline-flex; align-items: center; justify-content: center; min-width: 5.5rem; min-height: 2.2rem; margin: 0 .2rem; padding: 0 .6rem; vertical-align: middle; border-radius: 10px; border: 2px dashed rgb(var(--gm-1) / .7); background: rgb(var(--gm-1) / .1); font-family: "DM Sans", sans-serif; font-size: .9em; font-weight: 700; color: rgb(var(--paper-rgb)); transition: all .2s var(--gm-ease); }
.gm-blank.is-filled { border-style: solid; background: rgb(var(--gm-1) / .22); animation: gm-pop .3s var(--gm-spring); }
.gm-blank.is-active { box-shadow: 0 0 0 4px rgb(var(--gm-3) / .25); }
.gm-blank.is-ok { border-color: #10b981; background: rgba(16, 185, 129, .2); }
.gm-blank.is-bad { border-color: #f43f5e; background: rgba(244, 63, 94, .16); animation: gm-shake .45s ease; }
.gm-blank input { width: 8rem; max-width: 46vw; border: 0 !important; background: transparent !important; text-align: center; font: inherit; color: inherit; padding: 0; box-shadow: none !important; outline: none; }
.gm-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; max-width: 760px; margin: 0 auto; }
.gm-word { min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 0; color: #fff; font-weight: 700; background: linear-gradient(180deg, rgb(var(--gm-1)), rgb(var(--gm-2))); box-shadow: 0 4px 0 rgb(var(--gm-2) / .6); transition: transform .14s, box-shadow .14s, opacity .25s; animation: gm-rise .4s var(--gm-spring) backwards; }
.gm-word:active { transform: translateY(3px); box-shadow: 0 1px 0 rgb(var(--gm-2) / .6); }
.gm-word.is-used { animation: none; opacity: .25; pointer-events: none; }
.gm-correction { font-size: .9rem; color: rgb(var(--mist-rgb)); }
.gm-correction b { color: #34d399; }
html.light:not(.force-dark) .gm-correction b { color: #047857; }

/* ── Guruhlarga ajratish ────────────────────────────────────────────────── */
.gm-buckets { display: grid; gap: .6rem; width: 100%; max-width: 900px; margin: 0 auto; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
@media (max-width: 520px) { .gm-buckets.is-4 { grid-template-columns: 1fr 1fr; } }
.gm-bucket { --t: var(--gm-1); position: relative; display: flex; flex-direction: column; gap: .4rem; min-height: 120px; padding: .75rem; border-radius: 14px; border: 2px solid rgb(var(--t) / .45); background: rgb(var(--t) / .1); text-align: left; transition: transform .2s var(--gm-ease), border-color .2s, background-color .2s; }
.gm-bucket:hover:not(:disabled) { transform: translateY(-3px); border-color: rgb(var(--t) / .85); background: rgb(var(--t) / .18); }
.gm-bucket.is-hit { animation: gm-bucket .5s var(--gm-spring); border-color: #10b981; }
.gm-bucket.is-miss { animation: gm-shake .45s ease; border-color: #f43f5e; }
@keyframes gm-bucket { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }
.gm-bucket-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-weight: 800; font-size: .95rem; }
.gm-bucket-title span:last-child { font-family: "DM Mono", monospace; font-size: .75rem; opacity: .8; }
.gm-bucket-items { display: flex; flex-wrap: wrap; gap: .3rem; }
.gm-bucket-items span { padding: .15rem .5rem; border-radius: 6px; background: rgb(var(--ink-900-rgb) / .85); font-size: .75rem; font-weight: 600; animation: gm-pop .35s var(--gm-spring) backwards; }
.gm-b-0 { --t: 245 158 11; } .gm-b-1 { --t: 14 165 233; } .gm-b-2 { --t: 244 63 94; } .gm-b-3 { --t: 16 185 129; }
.gm-deck { display: grid; place-items: center; min-height: 120px; }
.gm-deck-card { min-width: min(320px, 80vw); padding: 1.1rem 1.4rem; border-radius: 16px; background: rgb(var(--ink-900-rgb)); border: 2px solid rgb(var(--gm-1) / .6); box-shadow: 0 6px 0 rgb(var(--gm-1) / .35), 0 24px 50px -24px rgba(0, 0, 0, .7); font-family: Spectral, Georgia, serif; font-weight: 700; font-size: clamp(1.25rem, 4vw, 1.7rem); text-align: center; animation: gm-deal .45s var(--gm-spring) backwards; }
.gm-deck-card.is-miss { animation: gm-shake .45s ease; border-color: #f43f5e; }
@keyframes gm-deal { 0% { transform: translateY(-30px) rotate(-6deg) scale(.85); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ── Umumiy animatsiyalar ───────────────────────────────────────────────── */
@keyframes gm-pop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes gm-rise { 0% { transform: translateY(14px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes gm-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@keyframes gm-correct { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
.gm-anim-in { animation: gm-rise .45s var(--gm-ease, ease) backwards; }

/* Konfetti */
.gm-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 20; }
.gm-confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: gm-fall var(--d, 2.4s) cubic-bezier(.2, .6, .4, 1) var(--delay, 0s) forwards; will-change: transform, opacity; }
@keyframes gm-fall { 0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 1; } 100% { transform: translate3d(var(--x, 0), 105vh, 0) rotate(var(--rot, 540deg)); opacity: 0; } }

/* ── Muharrir (wizard) ──────────────────────────────────────────────────── */
.gm-steps { display: flex; gap: .4rem; }
.gm-step { flex: 1; display: flex; flex-direction: column; gap: .4rem; min-width: 0; text-align: left; }
.gm-step-bar { height: 5px; border-radius: 999px; background: rgb(var(--ink-border-rgb)); overflow: hidden; }
.gm-step-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #14b8a6, #22d3ee); transition: width .45s var(--gm-ease, ease); }
.gm-step.is-done .gm-step-bar span, .gm-step.is-current .gm-step-bar span { width: 100%; }
.gm-step-label { font-size: .75rem; font-weight: 600; color: rgb(var(--mist-rgb)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-step.is-current .gm-step-label { color: rgb(var(--paper-rgb)); }

.gm-template-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.gm-template { position: relative; display: flex; flex-direction: column; gap: .55rem; padding: .9rem; border-radius: 14px; border: 2px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-900-rgb)); text-align: left; transition: transform .25s var(--gm-ease, ease), border-color .2s, box-shadow .25s; }
.gm-template:hover { transform: translateY(-3px); border-color: rgb(var(--gm-1) / .6); }
.gm-template.is-active { border-color: rgb(var(--gm-1)); box-shadow: 0 0 0 4px rgb(var(--gm-1) / .18); }
.gm-template-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg, rgb(var(--gm-1)), rgb(var(--gm-2))); transition: transform .4s var(--gm-spring, ease); }
.gm-template:hover .gm-template-icon { transform: rotate(-8deg) scale(1.06); }
.gm-template-icon svg { width: 28px; height: 28px; }
.gm-template-check { position: absolute; right: .7rem; top: .7rem; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 999px; background: rgb(var(--gm-1)); color: #fff; transform: scale(0); transition: transform .3s var(--gm-spring, ease); }
.gm-template.is-active .gm-template-check { transform: scale(1); }
.gm-template-check svg { width: 14px; height: 14px; }

.gm-theme-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 640px) { .gm-theme-pick { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.gm-theme-swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .5rem; border-radius: 12px; border: 2px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-900-rgb)); font-size: .75rem; font-weight: 600; transition: border-color .2s, transform .2s; }
.gm-theme-swatch:hover { transform: translateY(-2px); }
.gm-theme-swatch.is-active { border-color: rgb(var(--gm-1)); }
.gm-theme-swatch i { display: block; width: 100%; height: 34px; border-radius: 8px; background: linear-gradient(135deg, rgb(var(--gm-1)), rgb(var(--gm-2)) 60%, rgb(var(--gm-3))); }

.gm-item { position: relative; border-radius: 12px; border: 1px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-900-rgb)); padding: .75rem; animation: gm-rise .3s var(--gm-ease, ease) backwards; }
.gm-item.has-error { border-color: rgba(244, 63, 94, .65); box-shadow: 0 0 0 3px rgba(244, 63, 94, .12); }
.gm-item-num { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 .35rem; border-radius: 8px; background: rgb(var(--ink-800-rgb)); font-family: "DM Mono", monospace; font-size: .75rem; font-weight: 700; color: rgb(var(--mist-rgb)); }
.gm-item-tools { display: flex; align-items: center; gap: .15rem; }
.gm-item-tools button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: rgb(var(--mist-rgb)); transition: color .2s, background-color .2s; }
.gm-item-tools button:hover { color: rgb(var(--paper-rgb)); background: rgb(var(--ink-800-rgb)); }
.gm-item-tools button.is-danger:hover { color: #fda4af; background: rgba(244, 63, 94, .12); }
.gm-item-tools svg { width: 16px; height: 16px; }
.gm-field { width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-950-rgb)); color: rgb(var(--paper-rgb)); padding: .55rem .75rem; font-size: .9375rem; transition: border-color .15s, box-shadow .15s; }
.gm-field:focus { outline: none; border-color: #14b8a6; box-shadow: 0 0 0 3px rgba(20, 184, 166, .2); }
textarea.gm-field { resize: vertical; line-height: 1.5; }
.gm-label { display: block; margin-bottom: .35rem; font-size: .8125rem; font-weight: 600; color: rgb(var(--paper-rgb)); }
.gm-help { margin-top: .3rem; font-size: .75rem; color: rgb(var(--mist-rgb)); }
.gm-opt-row { display: flex; align-items: center; gap: .5rem; }
.gm-opt-radio { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 2px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-950-rgb)); color: transparent; transition: all .2s var(--gm-spring, ease); }
.gm-opt-radio.is-on { border-color: #10b981; background: #10b981; color: #fff; transform: scale(1.05); }
.gm-opt-radio svg { width: 20px; height: 20px; }
.gm-toggle { display: inline-flex; padding: 3px; border-radius: 10px; background: rgb(var(--ink-950-rgb)); border: 1px solid rgb(var(--ink-border-rgb)); }
.gm-toggle button { min-height: 36px; padding: 0 .85rem; border-radius: 8px; font-size: .8125rem; font-weight: 700; color: rgb(var(--mist-rgb)); transition: all .2s; }
.gm-toggle button.is-on-true { background: #10b981; color: #fff; }
.gm-toggle button.is-on-false { background: #f43f5e; color: #fff; }
.gm-toggle button.is-on { background: rgb(var(--ink-800-rgb)); color: rgb(var(--paper-rgb)); box-shadow: 0 1px 0 rgb(var(--ink-border-rgb)); }
.gm-sticky-bar { position: sticky; bottom: 0; z-index: 30; margin: 0 -.75rem; padding: .75rem; background: linear-gradient(180deg, transparent, rgb(var(--ink-950-rgb)) 30%); }
@media (max-width: 640px) { .gm-sticky-bar { bottom: 64px; } }
.gm-modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1rem; background: rgba(4, 6, 10, .7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.gm-modal { width: 100%; max-width: 640px; max-height: calc(100vh - 2rem); overflow-y: auto; border-radius: 16px; border: 1px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-900-rgb)); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); animation: gm-pop .3s var(--gm-ease, ease) backwards; }
.gm-example { white-space: pre-wrap; font-family: "DM Mono", monospace; font-size: .75rem; line-height: 1.55; padding: .75rem; border-radius: 10px; background: rgb(var(--ink-950-rgb)); border: 1px dashed rgb(var(--ink-border-rgb)); color: rgb(var(--mist-rgb)); }

/* ── Status nishonlari ──────────────────────────────────────────────────── */
.gm-status { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .6875rem; font-weight: 700; border: 1px solid; }
.gm-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.gm-status-draft { color: rgb(var(--mist-rgb)); border-color: rgb(var(--ink-border-rgb)); background: rgb(var(--ink-800-rgb)); }
.gm-status-pending { color: #fbbf24; border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .1); }
.gm-status-pending::before { animation: gm-blink 1.4s ease-in-out infinite; }
.gm-status-approved { color: #34d399; border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .1); }
.gm-status-rejected { color: #fda4af; border-color: rgba(253, 164, 175, .35); background: rgba(244, 63, 94, .1); }
.gm-status-hidden { color: #c4b5fd; border-color: rgba(196, 181, 253, .35); background: rgba(139, 92, 246, .1); }
html.light:not(.force-dark) .gm-status-pending { color: #b45309; }
html.light:not(.force-dark) .gm-status-approved { color: #047857; }
html.light:not(.force-dark) .gm-status-rejected { color: #be123c; }
html.light:not(.force-dark) .gm-status-hidden { color: #6d28d9; }
@keyframes gm-blink { 50% { opacity: .3; } }

/* ── Kamaytirilgan harakat ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .gm-root *, .gm-root *::before, .gm-root *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .gm-confetti { display: none; }
}
html[data-motion-level="minimal"] .gm-root *, html[data-motion-level="minimal"] .gm-root *::before, html[data-motion-level="minimal"] .gm-root *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
html[data-motion-level="minimal"] .gm-confetti { display: none; }
html[data-motion-level="minimal"] .gm-flip-inner, html[data-motion-level="minimal"] .gm-flash { transition-duration: .01ms !important; }

/* ── Tor ekranlar ───────────────────────────────────────────────────────── */
@media (max-width: 479px) {
    .gm-hud { padding: .6rem .65rem; gap: .4rem; }
    .gm-hud-left, .gm-hud-right { gap: .35rem; }
    .gm-pill { padding: 0 .55rem; }
    .gm-body { padding: .85rem; }
    .gm-q-card { padding: 1.1rem .85rem .9rem; }
}

/* ── Anagramma: har bir harf darhol tekshiriladi ─────────────────────────── */
.gm-slot { position: relative; }
.gm-slot.is-wrong { border-style: solid; border-color: #f43f5e; background: rgba(244, 63, 94, .16); color: #fda4af; animation: gm-shake .45s ease; }
html.light:not(.force-dark) .gm-slot.is-wrong { color: #be123c; }
.gm-slot-x { position: absolute; top: -9px; right: -9px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: #f43f5e; color: #fff; box-shadow: 0 4px 12px rgba(244, 63, 94, .5); animation: gm-pop .3s var(--gm-spring, ease) backwards; }
.gm-slot-x svg { width: 12px; height: 12px; }
.gm-letter.is-bad { animation: gm-shake .45s ease; background: linear-gradient(180deg, #fb7185, #e11d48); box-shadow: 0 4px 0 rgba(225, 29, 72, .6); }

/* ── Reyting: yon panel qatorlari va natija ekranidagi podium ────────────── */
.gm-lb-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 10px; background: rgb(var(--ink-950-rgb)); border: 1px solid rgb(var(--ink-border-rgb)); }
.gm-lb-tabs button { min-height: 32px; border-radius: 8px; font-size: .75rem; font-weight: 700; color: rgb(var(--mist-rgb)); transition: background-color .2s, color .2s; }
.gm-lb-tabs button.is-on { background: rgb(var(--ink-800-rgb)); color: rgb(var(--paper-rgb)); box-shadow: 0 1px 0 rgb(var(--ink-border-rgb)); }
.gm-lb-row { display: flex; align-items: center; gap: .6rem; padding: .45rem .55rem; border-radius: 10px; background: rgb(var(--ink-950-rgb) / .7); border: 1px solid transparent; animation: gm-rise .35s var(--gm-ease, ease) backwards; transition: background-color .3s, border-color .3s; }
.gm-lb-row:nth-child(2) { animation-delay: .04s; } .gm-lb-row:nth-child(3) { animation-delay: .08s; } .gm-lb-row:nth-child(4) { animation-delay: .12s; } .gm-lb-row:nth-child(5) { animation-delay: .16s; }
.gm-lb-row.is-me { background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .4); }
.gm-lb-row.is-flash { animation: gm-lb-flash 2s ease; }
@keyframes gm-lb-flash { 0%, 40% { box-shadow: 0 0 0 0 rgba(34, 211, 238, .6); background: rgba(34, 211, 238, .22); } 100% { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); } }
.gm-lb-rank { position: relative; flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; font-family: "DM Mono", monospace; font-size: .8125rem; font-weight: 800; color: rgb(var(--mist-rgb)); }
.gm-lb-rank svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gm-lb-rank span { position: relative; top: 2px; left: -1px; }
.gm-lb-rank.is-r1 { color: #f59e0b; } .gm-lb-rank.is-r2 { color: #94a3b8; } .gm-lb-rank.is-r3 { color: #c2703d; }
.gm-lb-rank.is-r1 span, .gm-lb-rank.is-r2 span, .gm-lb-rank.is-r3 span { color: #fff; font-size: .75rem; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.gm-lb-avatar { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; overflow: hidden; border-radius: 999px; background: linear-gradient(135deg, rgb(var(--gm-1, 20 184 166)), rgb(var(--gm-2, 99 102 241))); color: #fff; font-weight: 800; font-size: .8125rem; }
.gm-lb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gm-lb-you { margin-left: .3rem; padding: .05rem .4rem; border-radius: 999px; background: rgba(34, 211, 238, .18); color: #22d3ee; font-size: .625rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }
html.light:not(.force-dark) .gm-lb-you { color: #0e7490; }
.gm-lb-meta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .1rem; font-family: "DM Mono", monospace; font-size: .6875rem; color: rgb(var(--mist-rgb)); }
.gm-lb-meta svg { width: 11px; height: 11px; }
.gm-lb-score { flex: 0 0 auto; text-align: right; font-family: "DM Mono", monospace; font-weight: 800; font-size: .9375rem; line-height: 1; }
.gm-lb-score small { display: block; margin-top: .2rem; font-size: .625rem; font-weight: 600; color: rgb(var(--mist-rgb)); }
.gm-lb-gap { text-align: center; letter-spacing: .3em; color: rgb(var(--mist-rgb)); font-size: .7rem; padding: .25rem 0; }

.gm-board-result { width: 100%; max-width: 460px; text-align: left; }
.gm-board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .75rem; margin-bottom: .5rem; }
.gm-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: .5rem; padding-top: .5rem; }
.gm-podium-col { display: flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 0; text-align: center; animation: gm-podium-in .6s var(--gm-spring, ease) backwards; }
.gm-podium-col:only-child { grid-column: 2; }
@keyframes gm-podium-in { 0% { transform: translateY(30px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.gm-podium-avatar { position: relative; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 999px; background: linear-gradient(135deg, rgb(var(--gm-1)), rgb(var(--gm-2))); color: #fff; font-weight: 800; font-size: 1.1rem; box-shadow: 0 0 0 3px var(--medal), 0 10px 24px -10px var(--medal); }
.gm-podium-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px; }
.gm-podium-avatar i { position: absolute; bottom: -6px; right: -6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: var(--medal); color: #1a1205; font-style: normal; font-family: "DM Mono", monospace; font-size: .75rem; font-weight: 800; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.gm-podium-col.is-r1 { --medal: #f59e0b; } .gm-podium-col.is-r2 { --medal: #cbd5e1; } .gm-podium-col.is-r3 { --medal: #d08a52; }
.gm-podium-col.is-r1 .gm-podium-avatar { width: 60px; height: 60px; font-size: 1.35rem; }
.gm-podium-name { display: flex; flex-direction: column; align-items: center; max-width: 100%; margin-top: .35rem; font-size: .8125rem; font-weight: 700; line-height: 1.2; }
.gm-podium-name span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-podium-name b { margin-top: .15rem; padding: 0 .4rem; border-radius: 999px; background: rgba(34, 211, 238, .18); color: #22d3ee; font-size: .6rem; text-transform: uppercase; }
.gm-podium-score { font-family: "DM Mono", monospace; font-weight: 800; font-size: 1rem; }
.gm-podium-time { display: inline-flex; align-items: center; gap: .25rem; font-family: "DM Mono", monospace; font-size: .6875rem; color: rgb(var(--mist-rgb)); }
.gm-podium-time svg { width: 11px; height: 11px; }
.gm-podium-block { width: 100%; margin-top: .35rem; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--medal), transparent 140%); opacity: .55; transform-origin: bottom; animation: gm-podium-grow .7s var(--gm-ease, ease) backwards; animation-delay: inherit; }
.gm-podium-col.is-r1 .gm-podium-block { height: 64px; opacity: .7; } .gm-podium-col.is-r2 .gm-podium-block { height: 44px; } .gm-podium-col.is-r3 .gm-podium-block { height: 30px; }
.gm-podium-col.is-me .gm-podium-name span { color: #22d3ee; }
html.light:not(.force-dark) .gm-podium-col.is-me .gm-podium-name span { color: #0e7490; }
@keyframes gm-podium-grow { 0% { transform: scaleY(0); } 100% { transform: scaleY(1); } }

/* ── O'yin turlari: yopiq o'yin qulfi, sovrin banneri, tur kartasi ───────── */
.gm-lock-box { display: flex; flex-direction: column; align-items: center; gap: .45rem; width: 100%; max-width: 380px; padding: 1rem; border-radius: 16px; background: rgb(var(--ink-900-rgb) / .9); border: 1px solid rgba(245, 158, 11, .35); box-shadow: 0 18px 40px -24px rgba(245, 158, 11, .5); animation: gm-pop .4s var(--gm-spring, ease) backwards; }
.gm-lock-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1205; box-shadow: 0 10px 24px -10px rgba(245, 158, 11, .8); }
.gm-lock-icon svg { width: 24px; height: 24px; }
.gm-prize-banner { display: flex; align-items: center; gap: .6rem; max-width: 460px; padding: .6rem .9rem; border-radius: 14px; text-align: left; background: linear-gradient(135deg, rgba(245, 158, 11, .18), rgba(244, 63, 94, .12)); border: 1px solid rgba(245, 158, 11, .45); color: rgb(var(--paper-rgb)); font-size: .875rem; }
.gm-prize-banner > svg { flex: 0 0 auto; width: 26px; height: 26px; color: #f59e0b; }
.gm-access-card { display: flex; flex-direction: column; gap: .45rem; padding: .7rem .8rem; border-radius: 12px; border: 1px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-950-rgb)); }
.gm-access-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.gm-access-badge svg { width: 13px; height: 13px; }
.gm-access-open .gm-access-badge { background: rgba(16, 185, 129, .14); color: #10b981; }
.gm-access-paid .gm-access-badge { background: rgba(245, 158, 11, .16); color: #f59e0b; }
.gm-access-private .gm-access-badge { background: rgba(139, 92, 246, .16); color: #a78bfa; }
html.light:not(.force-dark) .gm-access-open .gm-access-badge { color: #047857; }
html.light:not(.force-dark) .gm-access-paid .gm-access-badge { color: #b45309; }
html.light:not(.force-dark) .gm-access-private .gm-access-badge { color: #6d28d9; }
.gm-access-paid { border-color: rgba(245, 158, 11, .35); }
.gm-access-prize { display: flex; gap: .55rem; padding: .55rem .6rem; border-radius: 10px; background: rgba(245, 158, 11, .08); border: 1px dashed rgba(245, 158, 11, .45); }
.gm-access-prize > svg { flex: 0 0 auto; width: 20px; height: 20px; color: #f59e0b; margin-top: .1rem; }
.gm-cover-badge.gm-badge-paid { left: auto; right: .7rem; top: auto; bottom: .7rem; background: rgba(217, 119, 6, .92); }
.gm-cover-badge.gm-badge-private { left: auto; right: .7rem; top: auto; bottom: .7rem; background: rgba(109, 40, 217, .9); }
.gm-access-pick { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .gm-access-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gm-access-option { display: flex; flex-direction: column; gap: .3rem; padding: .75rem; border-radius: 12px; border: 2px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-950-rgb)); text-align: left; transition: border-color .2s, transform .2s; }
.gm-access-option:hover { transform: translateY(-2px); }
.gm-access-option.is-on { border-color: #14b8a6; box-shadow: 0 0 0 3px rgba(20, 184, 166, .18); }
.gm-access-option b { font-size: .9rem; }
.gm-access-option span { font-size: .75rem; line-height: 1.4; color: rgb(var(--mist-rgb)); }

/* ── So'z qidiruv: harflar jadvali, topilgan so'z chiziqlari, ✕ belgisi ──── */
.gm-ws-wrap { justify-content: flex-start; gap: .75rem; container: gmws / inline-size; }
.gm-ws { display: grid; gap: 1rem; width: 100%; max-width: 1060px; margin: 0 auto; align-items: start; }
/* Tor sahnada: ro'yxat jadval ustida, yordam tugmalari pastda; keng sahnada (to'liq ekran) ro'yxat yonda */
.gm-ws-side { display: contents; }
.gm-ws-side-title { order: -2; } .gm-ws-list { order: -1; } .gm-ws-feedback { order: 1; } .gm-ws-actions { order: 2; }
.gm-ws-board {
    justify-self: center; width: min(100%, 36rem); padding: clamp(.35rem, 1.6vw, .8rem); border-radius: 18px;
    background: rgb(var(--ink-900-rgb) / .94); border: 1px solid rgb(var(--ink-border-rgb));
    box-shadow: 0 26px 50px -32px rgb(var(--gm-2) / .75), inset 0 1px 0 rgb(255 255 255 / .04);
    animation: gm-pop .45s var(--gm-spring) backwards;
}
.gm-stage:fullscreen .gm-ws-board { width: min(100%, 40rem, calc(100vh - 11rem)); }
.gm-ws-cells {
    position: relative; display: grid; grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); aspect-ratio: 1;
    container-type: inline-size; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer;
    border-radius: 12px; outline: none;
}
.gm-ws-cells:focus-visible { box-shadow: 0 0 0 3px rgb(var(--gm-3) / .45); }
.gm-ws-cell {
    position: relative; z-index: 1; display: grid; place-items: center; aspect-ratio: 1; line-height: 1;
    font-family: "DM Sans", sans-serif; font-weight: 700; color: rgb(var(--paper-rgb));
    font-size: clamp(.75rem, 3.6vw, 1.45rem); font-size: calc(54cqw / var(--n, 10)); letter-spacing: -.02em;
}
.gm-ws-svg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gm-ws-svg line { fill: none; stroke-linecap: round; }
.gm-ws-hl { stroke: rgb(var(--hl) / .5); stroke-width: .78; }
html.light:not(.force-dark) .gm-ws-hl { stroke: rgb(var(--hl) / .58); }
.gm-ws-hl.is-new { animation: gm-ws-hl .5s var(--gm-spring) backwards; }
@keyframes gm-ws-hl { 0% { stroke-width: .15; opacity: 0; } 100% { stroke-width: .78; opacity: 1; } }
.gm-ws-sel { stroke: rgb(var(--gm-1) / .42); stroke-width: .78; }
.gm-ws-sel.is-bad { stroke: rgb(244 63 94 / .5); animation: gm-ws-fade .8s ease forwards; }
@keyframes gm-ws-fade { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }
.gm-ws-anchor { fill: rgb(var(--gm-1) / .38); stroke: rgb(var(--gm-1)); stroke-width: .06; animation: gm-pop .25s var(--gm-spring); transform-box: fill-box; transform-origin: center; }
.gm-ws-glow { fill: rgb(245 158 11 / .22); stroke: #f59e0b; stroke-width: .07; transform-box: fill-box; transform-origin: center; animation: gm-ws-glow 1.2s ease-in-out infinite; }
@keyframes gm-ws-glow { 0%, 100% { transform: scale(.86); opacity: .6; } 50% { transform: scale(1.12); opacity: 1; } }
.gm-ws-cursor { fill: none; stroke: rgb(var(--gm-3)); stroke-width: .07; }
.gm-ws-x { position: absolute; z-index: 3; width: calc(100% / var(--n, 10) * 1.9); aspect-ratio: 1; pointer-events: none; transform: translate(-50%, -50%); filter: drop-shadow(0 6px 10px rgb(0 0 0 / .35)); animation: gm-ws-x .8s var(--gm-ease) forwards; }
.gm-ws-x svg { display: block; width: 100%; height: 100%; }
@keyframes gm-ws-x {
    0% { transform: translate(-50%, -50%) scale(.3) rotate(-30deg); opacity: 0; }
    22% { transform: translate(-50%, -50%) scale(1.1) rotate(0); opacity: 1; }
    35% { transform: translate(-50%, -50%) scale(1); }
    75% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(.85); opacity: 0; }
}

.gm-ws-side { flex-direction: column; gap: .6rem; min-width: 0; }
.gm-ws-side-title {
    width: min(100%, 36rem); justify-self: center; display: flex; align-items: baseline; justify-content: space-between;
    gap: .5rem; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: rgb(var(--mist-rgb));
}
.gm-ws-list {
    display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem;
    max-height: 12rem; overflow-y: auto; padding: 6px 4px; scroll-padding: 6px;
    overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgb(var(--ink-border-rgb) / .6) transparent;
}
.gm-ws-list::-webkit-scrollbar { width: 5px; }
.gm-ws-list::-webkit-scrollbar-track { background: transparent; }
.gm-ws-list::-webkit-scrollbar-thumb { background: rgb(var(--ink-border-rgb) / .6); border-radius: 999px; }
.gm-ws-list::-webkit-scrollbar-thumb:hover { background: rgb(var(--mist-rgb) / .8); }
.gm-ws-word {
    --hl: var(--gm-1); display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .25rem .5rem;
    min-height: 32px; padding: .25rem .75rem; border-radius: 999px; text-align: center;
    border: 1px solid rgb(var(--ink-border-rgb)); background: rgb(var(--ink-900-rgb) / .9);
    font-size: .8125rem; font-weight: 700; letter-spacing: .05em; color: rgb(var(--paper-rgb));
    transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.gm-ws-word.is-found { border-color: rgb(var(--hl) / .75); background: rgb(var(--hl) / .2); animation: gm-pop .4s var(--gm-spring); }
.gm-ws-word.is-found .gm-ws-word-text { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgb(var(--hl)); }
.gm-ws-word.is-hinted { border-color: rgb(245 158 11 / .65); box-shadow: 0 0 0 3px rgb(245 158 11 / .15); }
.gm-ws-word-hint { font-weight: 500; letter-spacing: 0; line-height: 1.35; }
.gm-ws-dots { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.gm-ws-dots i { width: 7px; height: 7px; border-radius: 2px; background: rgb(var(--mist-rgb) / .55); }

@container gmws (min-width: 760px) {
    .gm-ws { grid-template-columns: minmax(0, 1fr) clamp(18.5rem, 28vw, 22.5rem); }
    .gm-ws .gm-ws-board { grid-column: 1; grid-row: 1; }
    .gm-ws .gm-ws-side {
        display: flex; flex-direction: column; gap: .65rem; min-width: 0;
        grid-column: 2; grid-row: 1; position: sticky; top: .5rem;
    }
    .gm-ws .gm-ws-side-title { width: 100%; order: 0; }
    .gm-ws .gm-ws-list {
        order: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .35rem .45rem; max-height: min(38rem, calc(100vh - 12rem));
        overflow-y: auto; padding: 6px 4px; scroll-padding: 8px;
    }
    .gm-ws .gm-ws-word {
        justify-content: center; text-align: center; border-radius: 9px;
        min-height: 32px; padding: .25rem .45rem; font-size: .8rem;
    }
    .gm-ws .gm-ws-word.is-secret { grid-column: 1 / -1; justify-content: space-between; text-align: left; }
    .gm-ws .gm-ws-feedback { order: 2; }
    .gm-ws .gm-ws-actions { order: 3; }
}

.gm-feedback.is-hint { color: #f59e0b; font-size: .875rem; }
html.light:not(.force-dark) .gm-feedback.is-hint { color: #b45309; }
html.light:not(.force-dark) .gm-feedback.is-bad { color: #be123c; }
@media (prefers-reduced-motion: reduce) {
    .gm-ws-board, .gm-ws-hl.is-new, .gm-ws-glow, .gm-ws-anchor, .gm-ws-word.is-found { animation: none; }
}

/* ── O'yin elementlari va javoblardagi rasmlar ── */
.gm-item-img-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid rgb(var(--ink-border-rgb, 255 255 255 / .15));
    background: rgb(var(--ink-900-rgb, 15 23 42));
    color: rgb(var(--mist-rgb, 148 163 184));
    cursor: pointer;
    transition: all .15s ease;
    flex-shrink: 0;
}
.gm-item-img-btn:hover {
    color: #38bdf8;
    border-color: #38bdf8;
    background: rgba(56, 189, 248, .1);
}
.gm-item-img-btn.is-active {
    color: #10b981;
    border-color: #10b981;
    background: rgba(16, 185, 129, .15);
}
.gm-q-img-box {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.gm-q-img-box img {
    max-height: 180px;
    max-width: 100%;
    border-radius: 12px;
    object-fit: contain;
}
@media (min-width: 640px) {
    .gm-q-img-box img {
        max-height: 250px;
    }
}
.gm-option.has-opt-img {
    padding: .6rem .8rem;
    gap: .65rem;
}
.gm-option-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, .35);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
@media (min-width: 640px) {
    .gm-option-img {
        width: 60px;
        height: 60px;
        border-radius: 10px;
    }
}
.gm-flash-image {
    max-height: 120px;
    max-width: 100%;
    border-radius: 10px;
    object-fit: contain;
    margin-bottom: .5rem;
}
@media (min-width: 640px) {
    .gm-flash-image {
        max-height: 160px;
    }
}
