/* ===== Premium mavzu (v1.5): «oqshomdagi shaxmat zali» =====
 * Indigo osmon, yong'oq-zarang taxta, jez-oltin urg'u, chinni fon. Sarlavhalar — Unbounded, matn — Nunito.
 * Asosiy urg'u bitta: bosh sahifadagi indigo sahna (Toychoq perspektivali taxta ustida). Qolgani — sokin va toza.
 * app.css dan keyin ulanadi va faqat ko'rinishni o'zgartiradi (tuzilma va JS bir xil). */
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url(../fonts/unbounded-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url(../fonts/unbounded-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url(../fonts/unbounded-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url(../fonts/unbounded-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url(../fonts/unbounded-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url(../fonts/unbounded-cyrillic-800-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --night: #1c2050;        /* indigo osmon: yuqori panel, sahna */
  --night-2: #2b2f78;
  --porcelain: #eef1f8;    /* fon */
  --ivory: #fffdf8;        /* kartalar */
  --brass: #f0b13a;        /* oltin urg'u: yulduz, asosiy tugma */
  --brass-dark: #c98a12;
  --walnut: #7a4a2c;       /* taxta: to'q katak */
  --maple: #f0d6a8;        /* taxta: och katak */
  --ink: #1d2142;
  --ink-soft: #5b6185;
  --line: #e2e5f0;
  --sq-light: #f0d9b0;
  --sq-dark: #b07a4f;
  --t1: #3f7bf0;
  --t2: #14a876;
  --t3: #8457e8;
  --t4: #d9631c;
  --t5: #b8326a;
  --radius: 20px;
  --shadow: 0 18px 40px -18px rgba(28, 32, 80, .45);
  --shadow-sm: 0 6px 16px -8px rgba(28, 32, 80, .35);
  --display: "Unbounded", "Nunito", system-ui, sans-serif;
}

body {
  background:
    radial-gradient(1100px 520px at 50% -180px, rgba(43, 47, 120, .16), transparent 70%),
    var(--porcelain);
}

/* sarlavhalar — Unbounded (o'lchami biroz kichikroq: shrift keng) */
h1, h2, .brand-text b, .tier-tab b, .celebrate-card h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; }
.hero-bubble h1 { font-size: 27px; }
.page-head h1 { font-size: 25px; }
.lesson-head h2 { font-size: 19px; }

/* ---- yuqori panel: indigo ---- */
.topbar { background: linear-gradient(180deg, var(--night-2), var(--night)); border-bottom: 0; color: #fff;
  box-shadow: 0 10px 24px -16px rgba(28, 32, 80, .8); backdrop-filter: none; }
.brand-text b { font-size: 17px; color: #fff; }
.brand-text small { color: #b9bde8; }
.pill { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.pill-star .ico { color: var(--brass); }
.pill-done .ico { color: #5be3a6; }
.nav-btn { background: rgba(255, 255, 255, .08); color: #e9eaff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.nav-btn:hover { background: rgba(255, 255, 255, .16); }
.nav-btn.on { background: var(--brass); color: var(--night); box-shadow: none; }
.lang-toggle { background: rgba(255, 255, 255, .1); }
.lang-toggle button { color: #c9ccf2; }
.lang-toggle button.on { background: #fff; color: var(--night); }
.icon-btn { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.topbar button:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

/* ---- bosh sahifa: indigo sahna, Toychoq taxta ustida ---- */
.hero { position: relative; max-width: 1180px; margin: 22px auto 10px; padding: 26px 30px 26px 24px; border-radius: 30px;
  background:
    radial-gradient(2px 2px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 28% 12%, #ffe9b8 50%, transparent 51%),
    radial-gradient(1px 1px at 41% 30%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 63% 9%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 26%, #ffe9b8 50%, transparent 51%),
    radial-gradient(2px 2px at 92% 14%, #fff 50%, transparent 51%),
    radial-gradient(600px 300px at 18% 120%, rgba(240, 177, 58, .22), transparent 70%),
    linear-gradient(160deg, var(--night-2) 0%, var(--night) 65%, #15183d 100%);
  box-shadow: var(--shadow); overflow: hidden; isolation: isolate; }
/* perspektivali taxta «pol» — Toychoq shu yerda turadi */
.hero::after { content: ""; position: absolute; left: -8%; width: 48%; bottom: -8px; height: 66%; z-index: -1;
  background: repeating-conic-gradient(var(--walnut) 0 25%, var(--maple) 0 50%) 50% 100% / 56px 56px;
  transform: perspective(300px) rotateX(58deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent 100%), linear-gradient(to right, transparent, #000 25%, #000 75%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to top, #000 30%, transparent 100%), linear-gradient(to right, transparent, #000 25%, #000 75%, transparent);
  mask-composite: intersect; opacity: .85; }
.hero-mascot img, .hero-mascot svg { width: 190px; height: 190px; animation: bob 3s ease-in-out infinite; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .45)); }
.hero-bubble { background: var(--ivory); border-radius: 24px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }
.hero-bubble::before { background: var(--ivory); }
.hero-bubble p { color: var(--ink-soft); }

/* tugmalar: bitta oltin asosiy, qolganlari — sokin, rangli belgi bilan */
.btn { box-shadow: var(--shadow-sm); }
.btn-primary { background: linear-gradient(180deg, #ffc95c, var(--brass)); color: var(--night); box-shadow: 0 4px 0 var(--brass-dark), var(--shadow-sm); }
.btn-primary:active { box-shadow: 0 1px 0 var(--brass-dark); }
.hero-buttons .btn-play, .hero-buttons .btn-daily, .hero-buttons .btn-two, .hero-buttons .btn-review {
  background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line), 0 4px 0 #d9ddeb; }
.hero-buttons .btn-play span:first-child { color: var(--t1); }
.hero-buttons .btn-daily span:first-child { color: var(--t3); }
.hero-buttons .btn-two span:first-child { color: var(--t4); }
.hero-buttons .btn-daily.done { box-shadow: inset 0 0 0 2px #14a876, 0 4px 0 #b9e8d6; }
.btn-play { background: linear-gradient(180deg, #4b55c9, var(--night-2)); box-shadow: 0 4px 0 var(--night), var(--shadow-sm); }
.btn-soft { background: #eceff8; }

/* bosqich tablari: yupqa chiziqli, faol — indigo */
.tier-tab { background: var(--ivory); box-shadow: inset 0 0 0 1.5px var(--line); min-width: 230px; }
.tier-tab b { font-size: 14.5px; }
.tier-tab.on { outline: 0; background: var(--night); box-shadow: 0 12px 26px -14px rgba(28, 32, 80, .9); }
.tier-tab.on b { color: #fff; }
.tier-tab.on small { color: #b9bde8; }
.tier-tab.on .bar { background: rgba(255, 255, 255, .15); }

/* dars kartalari: fil suyagi rang, raqam — taxta katagi */
.lesson-card { background: var(--ivory); box-shadow: inset 0 0 0 1.5px var(--line); }
.lesson-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1.5px var(--tc), var(--shadow); }
.lesson-card .num { border-radius: 12px; font-family: var(--display); font-size: 16px; box-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.lesson-card .stars .on { color: var(--brass); text-shadow: 0 1px 0 var(--brass-dark); }
.lesson-card.current { outline: 0; box-shadow: inset 0 0 0 2.5px var(--brass), 0 0 0 6px rgba(240, 177, 58, .22); }

.card, .dialog { background: var(--ivory); }
.dialog h2 { font-size: 21px; }

@media (prefers-reduced-motion: reduce) {
  .hero-mascot img, .hero-mascot svg, .lesson-card { animation: none !important; transition: none !important; }
}
@media (max-width: 820px) {
  .hero { padding: 18px; border-radius: 22px; }
  .hero::after { right: 30%; }
  .hero-mascot img, .hero-mascot svg { width: 130px; height: 130px; }
}

/* inline Toychoq: img bilan bir xil o'lcham va harakat */
svg.brand-mascot { width: 48px; height: 48px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
svg.coach-mascot { overflow: visible; }

/* ===== Onlayn kabinet (v2.0, online.js) ===== */
.av-btn { padding: 0; overflow: hidden; display: grid; place-items: center; }
.av-btn.has-av { box-shadow: 0 0 0 2px var(--brass); }
.av-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-btn.on { box-shadow: 0 0 0 3px var(--brass); }
.cab-auth { max-width: 520px; margin: 0 auto; padding: 22px 24px; }
.cab-tabs { margin-bottom: 16px; }
.cab-form { display: flex; flex-direction: column; gap: 12px; }
.cab-field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; color: var(--ink-soft); }
.cab-field input { font: inherit; font-size: 18px; color: var(--ink); padding: 11px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; }
.cab-field input:focus { outline: 0; border-color: var(--brass); box-shadow: 0 0 0 4px rgba(240, 177, 58, .2); }
.cab-reg-av { display: flex; align-items: center; gap: 14px; }
.cab-reg-av img { width: 84px; height: 84px; border-radius: 50%; box-shadow: var(--shadow-sm); }
.cab-err { color: #d6334a; font-weight: 800; min-height: 1.3em; margin: 0; }
.cab-msg { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.cab-offline { background: #fff4d6; color: #7a5200; border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; font-weight: 800; }
.cab-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
/* 2×2: profil | amallar, darajalar | statistika — oldin profil 2 qatorni egallab, darajalar ostida bo'sh joy qolardi */
.cab-hero { display: flex; gap: 22px; align-items: flex-start; padding: 52px 24px 24px; position: relative; overflow: hidden; }      /* tepada toj uchun joy */
.cab-ladder { grid-column: 1; } .cab-stats { grid-column: 2; grid-row: 2; }
.cab-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--tc, var(--brass)); }
.cab-av { position: relative; border: 0; background: none; padding: 0; flex: none; cursor: pointer; }
.cab-av > img { width: 140px; height: 140px; border-radius: 50%; box-shadow: 0 0 0 5px #fff, 0 0 0 8px var(--tc, var(--brass)), var(--shadow); display: block; }
.cab-av > span:not(.avx) { position: absolute; right: 4px; bottom: 4px; width: 36px; height: 36px; border-radius: 50%; background: var(--night); color: #fff; display: grid; place-items: center; font-size: 17px; box-shadow: var(--shadow-sm); }
.cab-who { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.cab-who h2 { margin: 0; font-size: 24px; overflow-wrap: anywhere; display: flex; align-items: center; gap: 4px; }
.cab-pen { font-size: 18px; padding: 4px 8px; }
.cab-id { font-weight: 800; color: var(--ink-soft); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cab-id b { font-family: var(--display); color: var(--ink); letter-spacing: .06em; font-size: 18px; }
.cab-copy { padding: 6px 12px; font-size: 14px; }
.cab-tier { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.cab-tier b { font-family: var(--display); font-size: 20px; }
.cab-stars { color: var(--brass-dark); font-weight: 900; }
.cab-bar { height: 12px; border-radius: 99px; background: #e7eaf4; overflow: hidden; }
.cab-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brass), #ffd77e); transition: width .6s; }
.cab-protect { color: #14a876; font-weight: 800; }
.cab-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cab-stat { background: #f3f5fb; border-radius: 14px; padding: 12px; text-align: center; }
.cab-stat b { display: block; font-family: var(--display); font-size: 22px; }
.cab-stat span { font-size: 13px; color: var(--ink-soft); font-weight: 800; }
.cab-ladder ol { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column-reverse; gap: 6px; }
.cab-ladder li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; opacity: .55; }
.cab-ladder li.done { opacity: .85; }
.cab-ladder li.cur { opacity: 1; background: #fff6df; box-shadow: inset 0 0 0 2px var(--brass); }
.cab-ladder li small { margin-left: auto; color: var(--ink-soft); font-weight: 800; }
.cab-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
/* daraja belgisi: zaxira CSS (online.css Blender 3D rasmini qo'yadi) */
.tier-badge { --tc: #b07a4f; width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 21px; color: #fff;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 45%), var(--tc); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.18);
  text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.tier-badge.big { width: 58px; height: 58px; font-size: 36px; }
.t0 { --tc: #b07a4f; } .t1 { --tc: #9aa6b8; } .t2 { --tc: #e2a72e; } .t3 { --tc: #1fae7a; } .t4 { --tc: #d93a55; } .t5 { --tc: #4cc3f0; }
.tier-badge.t5 { animation: tier-shine 2.6s ease-in-out infinite; }
@keyframes tier-shine { 50% { box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 0 18px 4px rgba(76, 195, 240, .65); } }
.code-dialog { width: min(520px, 94vw); }
.code-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #f3f5fb; border-radius: 16px; padding: 12px 16px; margin: 10px 0; }
.code-box small { width: 100%; color: var(--ink-soft); font-weight: 800; }
.code-box b { font-family: var(--display); font-size: clamp(18px, 3.6vw, 24px); letter-spacing: .06em; flex: 1; white-space: nowrap; }
.avatar-dialog { width: min(760px, 96vw); }
.av-tabs { margin-bottom: 12px; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; max-height: min(56vh, 520px); overflow: auto; padding: 4px; }
.av-cell { position: relative; border: 0; background: none; padding: 4px; border-radius: 50%; cursor: pointer; transition: transform .15s; }
.av-cell img { width: 100%; aspect-ratio: 1; border-radius: 50%; display: block; }
.av-cell:hover { transform: scale(1.06); }
.av-cell.on img { box-shadow: 0 0 0 4px var(--brass); }
.av-cell.locked img { filter: grayscale(.85) brightness(.85); }
.av-lock { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); background: var(--night); color: #fff; border-radius: 99px; padding: 1px 8px; font-size: 13px; white-space: nowrap; }
@media (max-width: 860px) { .cab-grid { grid-template-columns: 1fr; } .cab-ladder, .cab-stats { grid-column: auto; grid-row: auto; } .cab-hero { flex-direction: column; align-items: center; text-align: center; } .cab-id, .cab-tier, .cab-who h2 { justify-content: center; } }
