/* ==========================================================================
   O'yin fonlarining jonli kichik ko'rinishi (AI ustaxonasi va muharrir).
   Faqat transform va opacity animatsiyalanadi — rang/soya har kadrda qayta chizilmaydi.
   Animatsiya faqat tanlangan, ustiga kelingan yoki fokusdagi kartochkada ishlaydi; qolganlari tinch turadi.
   ========================================================================== */

.gs-tile {
    --gs-r: 12px;
    position: relative; display: block; overflow: hidden; isolation: isolate;
    inline-size: 100%; block-size: 4.25rem; border-radius: var(--gs-r);
    background: #111827;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08), 0 6px 16px -10px rgb(0 0 0 / .8);
    contain: layout paint;
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease;
}
.gs-tile > i { position: absolute; display: block; pointer-events: none; }
/* Yuqoridan tushadigan yengil yaltiroq — hamma sahnaga chuqurlik beradi */
.gs-tile::after {
    content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none;
    background: linear-gradient(180deg, rgb(255 255 255 / .16), transparent 42%), radial-gradient(120% 90% at 50% 120%, rgb(0 0 0 / .35), transparent 60%);
}

/* ── Holatlar ──
   !important: quyidagi `animation:` qisqa yozuvlari play-state'ni qayta "running" qilib qo'yadi */
.gs-tile * { animation-play-state: paused !important; }
:is(button:hover, button:focus-visible, button[aria-pressed="true"]) > .gs-tile * { animation-play-state: running !important; }
:is(button:hover, button:focus-visible, button[aria-pressed="true"]) > .gs-tile :is(.gs-a, .gs-b, .gs-c, .gs-arm, .gs-pin) { will-change: transform; }
button:hover > .gs-tile { transform: translateY(-3px); }
button[aria-pressed="true"] > .gs-tile {
    box-shadow: 0 0 0 2px var(--gs-ring, #5eead4), 0 0 0 5px rgb(94 234 212 / .18), 0 12px 26px -12px var(--gs-glow, rgb(94 234 212 / .7));
}
.gs-check {
    inset: .3rem .3rem auto auto; z-index: 5; display: grid !important; place-items: center;
    inline-size: 1.25rem; block-size: 1.25rem; border-radius: 50%;
    background: var(--gs-ring, #5eead4); color: #052e2b; box-shadow: 0 2px 8px rgb(0 0 0 / .45);
    transform: scale(0); opacity: 0; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .2s;
}
.gs-check svg { inline-size: .8rem; block-size: .8rem; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
button[aria-pressed="true"] > .gs-tile .gs-check { transform: scale(1); opacity: 1; }

/* ── AI tanlaydi: aylanayotgan rangli "nebula" va uchqunlar ── */
.gs-tile[data-look="auto"] { background: #0b1020; --gs-ring: #c4b5fd; --gs-glow: rgb(167 139 250 / .75); }
.gs-tile[data-look="auto"] .gs-a {
    inset: -60%; border-radius: 50%; opacity: .95;
    background: conic-gradient(from 0deg, #2dd4bf, #818cf8, #f472b6, #f59e0b, #2dd4bf);
    filter: blur(12px);
    animation: gs-spin 9s linear infinite;
}
.gs-tile[data-look="auto"] .gs-b {
    inset: 0; z-index: 1; opacity: .7;
    background: radial-gradient(circle, #fff 0 1px, transparent 1.6px) 6px 8px / 22px 18px, radial-gradient(circle, #fff9 0 1px, transparent 1.4px) 15px 3px / 31px 25px;
    animation: gs-twinkle 2.4s ease-in-out infinite alternate;
}
.gs-badge {
    position: absolute; inset: 50% auto auto 50%; z-index: 3; transform: translate(-50%, -50%);
    display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px;
    background: rgb(10 14 30 / .62); color: #fff; font: 800 .82rem/1 "DM Sans", system-ui, sans-serif; letter-spacing: .04em;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22), 0 4px 14px rgb(0 0 0 / .35);
    backdrop-filter: none;
}
.gs-badge em { font-style: normal; color: #fde68a; display: inline-block; animation: gs-sparkle 1.6s ease-in-out infinite; }

/* ── Mavzu rangi: yumshoq nafas oladigan yorug'lik dog'lari ── */
.gs-tile[data-look="theme"] { background: linear-gradient(135deg, #262b55, #3b3f72); --gs-ring: #5eead4; }
.gs-tile[data-look="theme"] .gs-a {
    inset: -40% 30% 10% -30%; border-radius: 50%;
    background: radial-gradient(circle, rgb(117 215 199 / .85), transparent 65%);
    animation: gs-float-a 7s ease-in-out infinite alternate;
}
.gs-tile[data-look="theme"] .gs-b {
    inset: 20% -30% -50% 35%; border-radius: 50%;
    background: radial-gradient(circle, rgb(167 139 250 / .7), transparent 65%);
    animation: gs-float-b 8s ease-in-out infinite alternate;
}
.gs-tile[data-look="theme"] .gs-c {
    inset: 0; background: radial-gradient(circle, #ffffff55 0 1px, transparent 1.5px) 0 0 / 18px 16px; opacity: .35;
    animation: gs-twinkle 3s ease-in-out infinite alternate;
}

/* ── Topografik xarita: suzib yuradigan relyef chiziqlari va sakraydigan belgi ── */
.gs-tile[data-look="atlas"] { background: linear-gradient(145deg, #0f3640, #2f6e5e 60%, #94905d); --gs-ring: #a7f3d0; --gs-glow: rgb(110 231 183 / .6); }
.gs-tile[data-look="atlas"] .gs-a {
    inset: -60% -40%;
    background: repeating-radial-gradient(ellipse at 30% 70%, transparent 0 9px, #b4f1da55 10px 11px, transparent 12px 18px);
    animation: gs-drift-a 16s ease-in-out infinite alternate;
}
.gs-tile[data-look="atlas"] .gs-b {
    inset: -60% -40%;
    background: repeating-radial-gradient(ellipse at 78% 25%, transparent 0 13px, #f7dd9a50 14px 15px, transparent 16px 24px);
    animation: gs-drift-b 19s ease-in-out infinite alternate;
}
.gs-pin {
    inset: 22% auto auto 58%; z-index: 3; inline-size: .8rem; block-size: .8rem;
    border-radius: 50% 50% 50% 0; background: #f43f5e; transform: rotate(-45deg);
    box-shadow: inset 0 0 0 3px #ffe4e6aa, 0 3px 6px rgb(0 0 0 / .45);
    animation: gs-pin 1.8s cubic-bezier(.3, 0, .3, 1) infinite;
}
.gs-pin::after { content: ""; position: absolute; inset: 120% -40% -60% 60%; border-radius: 50%; background: rgb(0 0 0 / .35); transform: rotate(45deg) scaleY(.4); }

/* ── Rasadxona: aylanayotgan sayyoralar, yonib-o'chayotgan yulduzlar ── */
.gs-tile[data-look="orbit"] { background: radial-gradient(120% 140% at 70% 40%, #2b2a63, #0d1430 70%); --gs-ring: #c7d2fe; --gs-glow: rgb(165 180 252 / .7); }
.gs-tile[data-look="orbit"] .gs-a {
    inset: 0; opacity: .9;
    background: radial-gradient(circle, #fff 0 .8px, transparent 1.4px) 4px 6px / 19px 17px, radial-gradient(circle, #c4b5fd 0 1px, transparent 1.6px) 11px 2px / 27px 23px;
    animation: gs-twinkle 2.8s ease-in-out infinite alternate;
}
.gs-tile[data-look="orbit"] .gs-b {
    inset: 50% auto auto 64%; inline-size: 4.6rem; block-size: 1.9rem; margin: -.95rem 0 0 -2.3rem; border-radius: 50%;
    box-shadow: inset 0 0 0 1px #c1b4ff66, 0 0 0 .7rem rgb(193 180 255 / 0), 0 0 0 calc(.7rem + 1px) #c1b4ff2a;
}
.gs-sun {
    inset: 50% auto auto 64%; z-index: 2; inline-size: .95rem; block-size: .95rem; margin: -.475rem 0 0 -.475rem; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff7d1, #fbbf24 55%, #f97316);
    box-shadow: 0 0 14px 4px rgb(251 191 36 / .55);
    animation: gs-pulse 2.6s ease-in-out infinite alternate;
}
.gs-arm {
    inset: 50% auto auto 64%; z-index: 3; inline-size: 0; block-size: 0;
    animation: gs-orbit 5s linear infinite;
}
.gs-arm.is-far { animation-duration: 9s; animation-direction: reverse; }
.gs-planet, .gs-moon { position: absolute; display: block; border-radius: 50%; }
.gs-planet { inline-size: .5rem; block-size: .5rem; margin: -.25rem; transform: translateX(2.15rem) scaleY(1); background: radial-gradient(circle at 35% 35%, #a5f3fc, #0ea5e9); box-shadow: 0 0 6px #38bdf8; }
.gs-moon { inline-size: .32rem; block-size: .32rem; margin: -.16rem; transform: translateX(1.35rem); background: #f0abfc; box-shadow: 0 0 5px #f0abfc; }

/* ── Atlas naqshi: bir-biriga qarama-qarshi oqadigan iplar va yaltiroq ── */
.gs-tile[data-look="weave"] { background: linear-gradient(105deg, #4a2a3c, #a3604f); --gs-ring: #fecaca; --gs-glow: rgb(251 113 133 / .6); }
.gs-tile[data-look="weave"] .gs-a {
    inset: -10% -100% -10% 0;
    background: repeating-linear-gradient(55deg, transparent 0 10px, #f5c18666 10px 15px, transparent 15px 28px);
    animation: gs-slide 11s linear infinite;
}
.gs-tile[data-look="weave"] .gs-b {
    inset: -10% 0 -10% -100%;
    background: repeating-linear-gradient(-55deg, transparent 0 10px, #ef8d9670 10px 15px, transparent 15px 28px);
    animation: gs-slide-back 13s linear infinite;
}
.gs-tile[data-look="weave"] .gs-c {
    inset: -20% auto -20% -40%; inline-size: 35%; z-index: 2; transform: translateX(0) skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgb(255 236 210 / .45), transparent);
    animation: gs-sheen 3.6s ease-in-out infinite;
}

/* ── Dengiz to'lqini: ikki qatlamli to'lqinlar (parallaks) va quyosh jilosi ── */
.gs-tile[data-look="tides"] { background: linear-gradient(180deg, #3b8ea5 0%, #1d6a82 45%, #0f4a63 100%); --gs-ring: #a5f3fc; --gs-glow: rgb(103 232 249 / .6); }
.gs-tile[data-look="tides"] .gs-c {
    inset: 8% auto auto 16%; inline-size: 1.4rem; block-size: 1.4rem; border-radius: 50%;
    background: radial-gradient(circle, #fff8dc, #fde68a 45%, transparent 70%); opacity: .9;
    animation: gs-pulse 3s ease-in-out infinite alternate;
}
.gs-tile[data-look="tides"] .gs-a, .gs-tile[data-look="tides"] .gs-b { inset: auto -100% 0 0; }
/* To'lqin cho'qqilari: tepasi yarim doira, ostidan yaxlit suv; oq ko'pik chizig'i bilan */
.gs-tile[data-look="tides"] .gs-a {
    z-index: 1; block-size: 58%;
    background:
        radial-gradient(ellipse 50% 100% at 50% 100%, #2a8aa3 0 97%, transparent 100%) 0 2px / 34px 9px repeat-x,
        radial-gradient(ellipse 50% 100% at 50% 100%, #bdf4fb 0 92%, transparent 97%) 0 0 / 34px 9px repeat-x,
        linear-gradient(#2a8aa3, #1c6d86) 0 10px / 100% 100% no-repeat;
    animation: gs-slide 7s linear infinite;
}
.gs-tile[data-look="tides"] .gs-b {
    z-index: 2; block-size: 36%;
    background:
        radial-gradient(ellipse 50% 100% at 50% 100%, #0f5872 0 97%, transparent 100%) 0 2px / 46px 11px repeat-x,
        radial-gradient(ellipse 50% 100% at 50% 100%, #e6fdff 0 92%, transparent 97%) 0 0 / 46px 11px repeat-x,
        linear-gradient(#0f5872, #0a3f55) 0 12px / 100% 100% no-repeat;
    animation: gs-slide-back 10s linear infinite;
}

/* ── O'z ranglarim (muharrir): tanlangan ikki rang ustida yaltiroq ── */
.gs-tile[data-look="gradient"] { background: linear-gradient(128deg, var(--scene-a, #265577), var(--scene-b, #674672)); }
.gs-tile[data-look="gradient"] .gs-a, .gs-tile[data-look="gradient"] .gs-b { display: none; }
.gs-tile[data-look="gradient"] .gs-c {
    inset: -20% auto -20% -40%; inline-size: 35%; transform: skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / .35), transparent);
    animation: gs-sheen 3.4s ease-in-out infinite;
}

/* ── Kalit kadrlar: faqat transform/opacity ── */
@keyframes gs-spin { to { transform: rotate(1turn); } }
@keyframes gs-twinkle { from { opacity: .25; } to { opacity: .95; } }
@keyframes gs-sparkle { 0%, 100% { transform: scale(.8) rotate(0deg); opacity: .7; } 50% { transform: scale(1.25) rotate(45deg); opacity: 1; } }
@keyframes gs-float-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(18%, 14%) scale(1.15); } }
@keyframes gs-float-b { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-16%, -12%) scale(.95); } }
@keyframes gs-drift-a { from { transform: translate(-6%, 4%) rotate(-3deg); } to { transform: translate(6%, -4%) rotate(3deg); } }
@keyframes gs-drift-b { from { transform: translate(5%, -3%) rotate(2deg); } to { transform: translate(-5%, 5%) rotate(-2deg); } }
@keyframes gs-pin { 0%, 100% { transform: translateY(0) rotate(-45deg); } 45% { transform: translateY(-.45rem) rotate(-45deg); } 60% { transform: translateY(0) rotate(-45deg); } 70% { transform: translateY(-.12rem) rotate(-45deg); } }
@keyframes gs-pulse { from { transform: scale(.92); opacity: .85; } to { transform: scale(1.08); opacity: 1; } }
@keyframes gs-orbit { from { transform: rotate(0deg) scaleY(.42); } to { transform: rotate(1turn) scaleY(.42); } }
@keyframes gs-slide { to { transform: translateX(-50%); } }
@keyframes gs-slide-back { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes gs-sheen { 0%, 35% { transform: translateX(0) skewX(-18deg); } 100% { transform: translateX(520%) skewX(-18deg); } }

/* Tinch rejim: hammasi bir holatda turadi */
html[data-motion-level="minimal"] .gs-tile *, html[data-motion-level="minimal"] .gs-tile { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
    .gs-tile, .gs-tile * { animation: none !important; transition: none !important; }
}

/* Yorug' mavzu: kartochka atrofidagi soya yumshoqroq */
html.light:not(.force-dark) .gs-tile { box-shadow: inset 0 0 0 1px rgb(15 23 42 / .08), 0 6px 14px -10px rgb(15 23 42 / .5); }

/* ── Muharrirdagi tanlagich: ixchamroq kartochkalar ── */
.gp-bg-options { grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); gap: .7rem .55rem; }
.gp-bg-options button { display: grid; gap: .4rem; padding: 0; border: 0; background: none; cursor: pointer; font-size: .76rem; line-height: 1.2; }
.gp-bg-options button[aria-pressed="true"] { color: #5eead4; }
.gp-bg-options .gs-tile { --gs-r: 10px; block-size: 3.4rem; }
.gp-bg-options button > i[data-scene] { block-size: 3.4rem; border-radius: 10px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s; }
.gp-bg-options button:hover > i[data-scene] { transform: translateY(-3px); }
.gp-bg-options button[aria-pressed="true"] > i[data-scene] { box-shadow: 0 0 0 2px #5eead4, 0 0 0 5px rgb(94 234 212 / .18); }
.gp-bg-options .gs-badge { font-size: .72rem; }
/* Muharrir: musiqa va ovozlar tanlovi */
.ga-picker { min-width: 0; margin: 0 0 1.3rem; padding: 0; border: 0; }
.ga-picker > .gm-help { margin: .1rem 0 .6rem; }
.ga-row { display: grid; gap: .45rem; margin-bottom: .9rem; }
.ga-row-title { font-size: .8rem; font-weight: 700; opacity: .8; }
.ga-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.4rem, 1fr)); gap: .5rem; }
.ga-options.is-packs { grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); }
.ga-card { display: grid; gap: .15rem; align-content: start; text-align: start; padding: .6rem .7rem; border-radius: 12px; border: 1px solid rgb(255 255 255 / .1); background: rgb(255 255 255 / .04); color: inherit; cursor: pointer; transition: border-color .2s, background-color .2s, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.ga-card:hover { transform: translateY(-2px); border-color: rgb(94 234 212 / .45); }
.ga-card[aria-pressed="true"] { border-color: #5eead4; background: rgb(94 234 212 / .1); box-shadow: 0 0 0 3px rgb(94 234 212 / .14); }
.ga-card:focus-visible, .ga-listen:focus-visible { outline: 3px solid #f4bd68; outline-offset: 2px; }
.ga-name { font-size: .84rem; font-weight: 700; line-height: 1.2; }
.ga-card small { font-size: .7rem; line-height: 1.3; opacity: .68; }
.ga-icon { display: flex; align-items: flex-end; gap: 3px; block-size: 1.3rem; margin-bottom: .2rem; color: var(--ga-c, #5eead4); }
.ga-icon b { inline-size: 4px; border-radius: 2px; background: currentColor; block-size: 35%; opacity: .85; }
.ga-icon b:nth-child(2) { block-size: 70%; } .ga-icon b:nth-child(3) { block-size: 50%; } .ga-icon b:nth-child(4) { block-size: 85%; }
.ga-icon svg { inline-size: 1.2rem; block-size: 1.2rem; opacity: .7; }
.ga-icon.is-playing b { animation: ga-eq .9s ease-in-out infinite alternate; }
.ga-icon.is-playing b:nth-child(2) { animation-delay: -.3s; } .ga-icon.is-playing b:nth-child(3) { animation-delay: -.6s; } .ga-icon.is-playing b:nth-child(4) { animation-delay: -.15s; }
@keyframes ga-eq { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.ga-icon b { transform-origin: bottom; }
.ga-icon[data-track="lofi"] { --ga-c: #fbbf24; } .ga-icon[data-track="calm"] { --ga-c: #93c5fd; } .ga-icon[data-track="adventure"] { --ga-c: #f97316; }
.ga-icon[data-track="space"] { --ga-c: #a78bfa; } .ga-icon[data-track="arcade"] { --ga-c: #f472b6; } .ga-icon[data-track="oriental"] { --ga-c: #34d399; }
.ga-listen { justify-self: start; padding: .4rem .85rem; border-radius: 999px; border: 1px solid rgb(94 234 212 / .5); background: rgb(94 234 212 / .08); color: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.ga-listen:hover { background: rgb(94 234 212 / .18); }
html.light:not(.force-dark) .ga-card { border-color: rgb(15 23 42 / .12); background: rgb(15 23 42 / .025); }
html.light:not(.force-dark) .ga-card[aria-pressed="true"] { border-color: #0d9488; background: rgb(13 148 136 / .08); box-shadow: 0 0 0 3px rgb(13 148 136 / .14); }
html.light:not(.force-dark) .ga-listen { border-color: #0d9488; }
@media (prefers-reduced-motion: reduce) { .ga-icon.is-playing b { animation: none; } .ga-card { transition: none; } }
.ga-cues { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .55rem; font-size: .76rem; }
.ga-cues > span { opacity: .7; margin-inline-end: .15rem; }
.ga-cue { display: inline-flex; align-items: center; gap: .3rem; padding: .32rem .7rem; border-radius: 999px; border: 1px solid rgb(255 255 255 / .12); background: rgb(255 255 255 / .04); color: inherit; font-weight: 600; cursor: pointer; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), border-color .2s; }
.ga-cue:hover { transform: translateY(-1px); }
.ga-cue:active { transform: scale(.95); }
.ga-cue:focus-visible { outline: 3px solid #f4bd68; outline-offset: 2px; }
.ga-cue.is-correct:hover { border-color: #34d399; } .ga-cue.is-wrong:hover { border-color: #fb7185; }
.ga-cue.is-win:hover { border-color: #fbbf24; } .ga-cue.is-lose:hover { border-color: #94a3b8; }
html.light:not(.force-dark) .ga-cue { border-color: rgb(15 23 42 / .14); background: rgb(15 23 42 / .03); }
