/* ============================================================
   PIIMACHEMIST — Kurs va interaktiv daftar uslublari
   theme.css ustiga qo'shimcha qatlam
   ============================================================ */

/* ---------- Kurs bosh sahifasi ---------- */
.course-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.course-search {
    flex: 1 1 260px;
    max-width: 360px;
    padding: 12px 20px;
    border-radius: 40px;
    border: 1px solid var(--stroke);
    background: rgba(10, 8, 28, 0.6);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: border-color .25s, box-shadow .25s;
}

.course-search::placeholder { color: rgba(238, 240, 255, 0.4); }

.course-search:focus {
    border-color: var(--stroke-bright);
    box-shadow: 0 0 18px rgba(56, 232, 255, 0.18);
}

/* Umumiy o'zlashtirish paneli */
.mastery-panel {
    max-width: 760px;
    margin: 0 auto 46px;
    padding: 22px 26px;
    border-radius: var(--radius);
    background: var(--glass);
    border: 1px solid var(--stroke);
    backdrop-filter: blur(14px);
}

.mastery-panel .top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.mastery-panel .top strong {
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: .5px;
}

.mastery-panel .top span { color: var(--ink-dim); font-size: 14px; }

.bar {
    height: 10px;
    border-radius: 20px;
    background: rgba(148, 130, 255, 0.12);
    overflow: hidden;
    position: relative;
}

.bar > i {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 20px;
    background: var(--grad-magic);
    background-size: 250% 100%;
    animation: shimmer 6s linear infinite;
    transition: width .8s cubic-bezier(.2,.8,.3,1);
}

.mastery-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.mini-btn {
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid var(--stroke);
    background: var(--glass);
    color: var(--ink-dim);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all .25s;
}

.mini-btn:hover {
    color: #fff;
    border-color: var(--stroke-bright);
    transform: translateY(-2px);
}

/* Mavzu kartasi */
.topic-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px 22px;
    min-height: 190px;
}

.topic-card .tnum {
    position: absolute;
    top: 16px;
    right: 20px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 34px;
    line-height: 1;
    color: rgba(167, 139, 250, 0.16);
}

.topic-card .tlevel {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.tlevel.as {
    color: var(--cyan);
    background: rgba(56, 232, 255, 0.09);
    border: 1px solid rgba(56, 232, 255, 0.32);
}

.tlevel.a2 {
    color: var(--gold);
    background: rgba(252, 211, 77, 0.09);
    border: 1px solid rgba(252, 211, 77, 0.32);
}

.topic-card h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.35;
    margin-bottom: 8px;
    color: #fff;
    padding-right: 34px;
}

.topic-card p {
    color: var(--ink-dim);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 14px;
}

.topic-card .tfoot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    color: var(--ink-dim);
}

.topic-card .tprog {
    flex: 1;
    height: 6px;
    border-radius: 10px;
    background: rgba(148, 130, 255, 0.14);
    overflow: hidden;
}

.topic-card .tprog > i {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--grad-cool);
    transition: width .6s ease;
}

.topic-card.done { border-color: rgba(74, 222, 157, 0.42); }
.topic-card.done .tprog > i { background: linear-gradient(90deg, var(--emerald), var(--cyan)); }

.topic-card.soon { opacity: .5; pointer-events: none; }
.topic-card.soon::after {
    content: 'TEZ KUNDA';
    position: absolute;
    bottom: 18px;
    right: 20px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--ink-dim);
}

/* ---------- Dars sahifasi ---------- */
.lesson-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 980px) {
    .lesson-layout { grid-template-columns: 1fr; gap: 24px; }
    .lesson-toc { position: static !important; max-height: none !important; }
}

.lesson-toc {
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding: 20px 18px;
    border-radius: var(--radius);
    background: var(--glass);
    border: 1px solid var(--stroke);
    backdrop-filter: blur(14px);
}

.lesson-toc h4 {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 14px;
}

.lesson-toc a {
    display: block;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--ink-dim);
    border-left: 2px solid transparent;
    transition: all .25s;
}

.lesson-toc a:hover,
.lesson-toc a.active {
    color: #fff;
    background: rgba(56, 232, 255, 0.07);
    border-left-color: var(--cyan);
}

.lesson-body { max-width: 820px; }

.lesson-body h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(21px, 3vw, 30px);
    margin: 54px 0 18px;
    scroll-margin-top: 120px;
    background: var(--grad-cool);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lesson-body h2:first-child { margin-top: 0; }

.lesson-body h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(17px, 2.2vw, 21px);
    color: #fff;
    margin: 32px 0 12px;
    scroll-margin-top: 120px;
}

.lesson-body h4 {
    font-weight: 800;
    font-size: 16px;
    color: var(--violet);
    margin: 22px 0 8px;
}

.lesson-body p {
    color: var(--ink-dim);
    font-size: 16px;
    line-height: 1.78;
    margin-bottom: 16px;
}

.lesson-body ul,
.lesson-body ol {
    color: var(--ink-dim);
    font-size: 16px;
    line-height: 1.78;
    margin: 0 0 18px 22px;
}

.lesson-body li { margin-bottom: 8px; }
.lesson-body li::marker { color: var(--cyan); }

.lesson-body strong { color: #fff; font-weight: 700; }
.lesson-body em { color: var(--gold); font-style: normal; font-weight: 600; }

.lesson-body a.ref {
    color: var(--cyan);
    border-bottom: 1px dashed rgba(56, 232, 255, .5);
}

/* Kimyoviy formula/ifoda */
.chem, .lesson-body code {
    font-family: 'Consolas', 'SF Mono', monospace;
    font-size: .95em;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(56, 232, 255, 0.08);
    border: 1px solid rgba(56, 232, 255, 0.16);
    color: #bff4ff;
    white-space: nowrap;
}

.eq {
    display: block;
    margin: 20px 0;
    padding: 18px 22px;
    border-radius: 14px;
    background: rgba(10, 8, 28, 0.55);
    border: 1px solid var(--stroke);
    border-left: 3px solid var(--cyan);
    font-family: 'Consolas', 'SF Mono', monospace;
    font-size: 16px;
    color: #d8f6ff;
    overflow-x: auto;
    line-height: 1.9;
}

.eq .lbl {
    display: block;
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 8px;
}

/* Ta'rif / eslatma / ogohlantirish bloklari */
.note {
    position: relative;
    margin: 22px 0;
    padding: 20px 22px 20px 24px;
    border-radius: 14px;
    background: var(--glass);
    border: 1px solid var(--stroke);
    border-left: 3px solid var(--violet);
}

.note .note-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .6px;
    margin-bottom: 8px;
    color: var(--violet);
}

.note p:last-child, .note ul:last-child, .note ol:last-child { margin-bottom: 0; }

.note.def { border-left-color: var(--cyan); }
.note.def .note-title { color: var(--cyan); }

.note.tip { border-left-color: var(--emerald); }
.note.tip .note-title { color: var(--emerald); }

.note.warn { border-left-color: var(--gold); }
.note.warn .note-title { color: var(--gold); }

.note.exam { border-left-color: var(--magenta); }
.note.exam .note-title { color: var(--magenta); }

/* Ishlangan misol */
.worked {
    margin: 26px 0;
    border-radius: 16px;
    background: linear-gradient(150deg, rgba(56, 232, 255, .05), rgba(167, 139, 250, .05));
    border: 1px solid var(--stroke);
    overflow: hidden;
}

.worked > .wh {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: rgba(56, 232, 255, 0.06);
    border-bottom: 1px solid var(--stroke);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .5px;
    color: var(--cyan);
}

.worked > .wbody { padding: 20px 22px; }
.worked .wbody p:last-child { margin-bottom: 0; }

.worked .step {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.worked .step > b {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(56, 232, 255, .12);
    border: 1px solid rgba(56, 232, 255, .3);
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
}

.worked .step > div { color: var(--ink-dim); font-size: 15.5px; line-height: 1.7; }
.worked .ans {
    margin-top: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(74, 222, 157, .08);
    border: 1px solid rgba(74, 222, 157, .28);
    color: #b7f5d8;
    font-weight: 700;
}

/* Jadval */
.lesson-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-size: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(10, 8, 28, .4);
}

.lesson-body th {
    background: rgba(56, 232, 255, .09);
    color: #fff;
    font-weight: 700;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--stroke);
    font-size: 14px;
}

.lesson-body td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(167, 139, 250, .1);
    color: var(--ink-dim);
}

.lesson-body tr:last-child td { border-bottom: none; }
.lesson-body tbody tr:hover td { background: rgba(56, 232, 255, .04); color: #fff; }

/* Dars boshi va oxiri navigatsiyasi */
.lesson-head {
    padding: 150px 0 30px;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--ink-dim);
    margin-bottom: 16px;
}

.crumbs a:hover { color: var(--cyan); }
.crumbs span.sep { opacity: .4; }

.lesson-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(26px, 4.6vw, 44px);
    line-height: 1.15;
    background: var(--grad-magic);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 8s linear infinite;
    margin-bottom: 14px;
}

.lesson-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.lesson-meta span {
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-dim);
    background: var(--glass);
    border: 1px solid var(--stroke);
}

.objectives {
    margin: 26px 0 10px;
    padding: 22px 26px;
    border-radius: 16px;
    background: linear-gradient(140deg, rgba(252, 211, 77, .06), rgba(244, 114, 208, .05));
    border: 1px solid rgba(252, 211, 77, .25);
}

.objectives h4 {
    color: var(--gold) !important;
    margin: 0 0 10px !important;
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 1px;
}

.objectives ul { margin-bottom: 0 !important; }

.lesson-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--stroke);
}

.lesson-nav a {
    flex: 1 1 240px;
    padding: 16px 22px;
    border-radius: 14px;
    background: var(--glass);
    border: 1px solid var(--stroke);
    transition: all .3s;
}

.lesson-nav a:hover {
    border-color: var(--stroke-bright);
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(4, 2, 16, .5);
}

.lesson-nav small {
    display: block;
    font-size: 11.5px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 5px;
}

.lesson-nav b { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: #fff; }
.lesson-nav a.next { text-align: right; }

/* ============================================================
   INTERAKTIV DAFTAR (workbook)
   ============================================================ */
.wb {
    margin: 34px 0;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(148, 130, 255, .06), rgba(56, 232, 255, .04));
    border: 1px solid var(--stroke-bright);
    box-shadow: var(--shadow-glow);
    overflow: hidden;
}

.wb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 24px;
    background: rgba(10, 8, 28, .5);
    border-bottom: 1px solid var(--stroke);
}

.wb-head h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: .5px;
    color: #fff;
    margin: 0;
}

.wb-head .wb-score {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13.5px;
    color: var(--ink-dim);
    font-weight: 600;
}

.wb-head .wb-score b { color: var(--cyan); font-size: 15px; }

.wb-progress { height: 4px; background: rgba(148, 130, 255, .12); }
.wb-progress > i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--grad-cool);
    transition: width .5s ease;
}

.wb-body { padding: 8px 24px 24px; }

.q {
    padding: 24px 0;
    border-bottom: 1px solid rgba(167, 139, 250, .12);
}

.q:last-child { border-bottom: none; }

.q-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.q-num {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(56, 232, 255, .1);
    border: 1px solid rgba(56, 232, 255, .28);
    color: var(--cyan);
    font-weight: 800;
    font-size: 13px;
    transition: all .3s;
}

.q.correct .q-num {
    background: rgba(74, 222, 157, .14);
    border-color: rgba(74, 222, 157, .45);
    color: var(--emerald);
}

.q.wrong .q-num {
    background: rgba(244, 114, 208, .12);
    border-color: rgba(244, 114, 208, .45);
    color: var(--magenta);
}

.q-text {
    flex: 1;
    color: #fff;
    font-size: 16px;
    line-height: 1.7;
}

.q-text .chem { white-space: nowrap; }

.q-marks {
    flex: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-dim);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--stroke);
}

.q-field { margin-left: 44px; }
@media (max-width: 620px) { .q-field { margin-left: 0; } }

/* Variantlar */
.opt {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 9px;
    border-radius: 12px;
    background: rgba(10, 8, 28, .45);
    border: 1px solid var(--stroke);
    cursor: pointer;
    transition: all .22s;
    color: var(--ink-dim);
    font-size: 15.5px;
    line-height: 1.6;
}

.opt:hover { border-color: var(--stroke-bright); color: #fff; transform: translateX(4px); }

.opt .mark {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    border: 1px solid var(--stroke);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--ink-dim);
    transition: all .22s;
}

.opt.sel { border-color: var(--stroke-bright); background: rgba(56, 232, 255, .07); color: #fff; }
.opt.sel .mark { background: var(--grad-cool); color: #071019; border-color: transparent; }

.opt.ok { border-color: rgba(74, 222, 157, .5); background: rgba(74, 222, 157, .08); color: #d6ffe9; }
.opt.ok .mark { background: var(--emerald); color: #04180f; border-color: transparent; }

.opt.no { border-color: rgba(244, 114, 208, .45); background: rgba(244, 114, 208, .06); }
.opt.no .mark { background: var(--magenta); color: #2a0620; border-color: transparent; }

.opt.locked { pointer-events: none; }

/* Kiritish maydonlari */
.inp {
    padding: 11px 16px;
    border-radius: 11px;
    border: 1px solid var(--stroke);
    background: rgba(10, 8, 28, .55);
    color: #fff;
    font-family: var(--font-body);
    font-size: 15.5px;
    outline: none;
    transition: all .22s;
    min-width: 0;
}

.inp:focus { border-color: var(--stroke-bright); box-shadow: 0 0 16px rgba(56, 232, 255, .15); }
.inp.ok { border-color: rgba(74, 222, 157, .6); background: rgba(74, 222, 157, .07); }
.inp.no { border-color: rgba(244, 114, 208, .55); background: rgba(244, 114, 208, .06); }

.num-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.num-row .inp { width: 190px; }
.num-row .unit { color: var(--cyan); font-family: 'Consolas', monospace; font-size: 15px; }

/* Tenglama tenglashtirish */
.bal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(10, 8, 28, .5);
    border: 1px solid var(--stroke);
    font-family: 'Consolas', 'SF Mono', monospace;
    font-size: 16.5px;
    color: #d8f6ff;
    line-height: 2;
}

.bal .coef {
    width: 46px;
    text-align: center;
    padding: 5px 4px;
    border-radius: 8px;
    border: 1px solid rgba(56, 232, 255, .35);
    background: rgba(56, 232, 255, .07);
    color: #fff;
    font-family: 'Consolas', monospace;
    font-size: 15px;
    font-weight: 700;
    outline: none;
    -moz-appearance: textfield;
}

.bal .coef::-webkit-outer-spin-button,
.bal .coef::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bal .coef:focus { border-color: var(--cyan); box-shadow: 0 0 14px rgba(56, 232, 255, .25); }
.bal .coef.ok { border-color: rgba(74, 222, 157, .65); background: rgba(74, 222, 157, .1); }
.bal .coef.no { border-color: rgba(244, 114, 208, .6); background: rgba(244, 114, 208, .08); }
.bal .arrow { color: var(--cyan); padding: 0 6px; }

/* Moslashtirish */
.match-grid { display: grid; gap: 10px; }
.match-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    border-radius: 11px;
    background: rgba(10, 8, 28, .45);
    border: 1px solid var(--stroke);
}
@media (max-width: 620px) { .match-row { grid-template-columns: 1fr; } }

.match-row > span { color: var(--ink-dim); font-size: 15px; }
.match-row.ok { border-color: rgba(74, 222, 157, .45); }
.match-row.no { border-color: rgba(244, 114, 208, .45); }

.sel-inp {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid var(--stroke);
    background: #0b0820;
    color: #fff;
    font-family: var(--font-body);
    font-size: 14.5px;
    outline: none;
    cursor: pointer;
}

.sel-inp:focus { border-color: var(--stroke-bright); }

/* Tartiblash */
.order-list { display: grid; gap: 9px; counter-reset: ord; }

.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 11px;
    background: rgba(10, 8, 28, .5);
    border: 1px solid var(--stroke);
    color: var(--ink-dim);
    font-size: 15px;
    cursor: grab;
    transition: all .2s;
}

.order-item:hover { border-color: var(--stroke-bright); color: #fff; }
.order-item.dragging { opacity: .45; cursor: grabbing; }
.order-item.ok { border-color: rgba(74, 222, 157, .45); }
.order-item.no { border-color: rgba(244, 114, 208, .45); }

.order-item .grip { color: var(--violet); font-size: 16px; flex: none; }
.order-item .pos {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: rgba(167, 139, 250, .14);
    border: 1px solid var(--stroke);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--violet);
}

/* Bo'sh joyni to'ldirish */
.gap-inp {
    display: inline-block;
    width: 130px;
    padding: 4px 10px;
    margin: 0 3px;
    border-radius: 8px;
    border: 1px solid rgba(56, 232, 255, .35);
    background: rgba(56, 232, 255, .06);
    color: #fff;
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    text-align: center;
}

.gap-inp:focus { border-color: var(--cyan); box-shadow: 0 0 12px rgba(56, 232, 255, .22); }
.gap-inp.ok { border-color: rgba(74, 222, 157, .6); background: rgba(74, 222, 157, .08); }
.gap-inp.no { border-color: rgba(244, 114, 208, .55); background: rgba(244, 114, 208, .07); }

/* Savol tugmalari */
.q-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.q-btn {
    padding: 9px 20px;
    border-radius: 30px;
    border: 1px solid var(--stroke);
    background: var(--glass);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: all .25s;
}

.q-btn:hover { border-color: var(--stroke-bright); transform: translateY(-2px); }
.q-btn.primary { background: var(--grad-cool); border-color: transparent; color: #071019; }
.q-btn.ghost { color: var(--ink-dim); }
.q-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Fikr-mulohaza va yechim */
.fb {
    display: none;
    margin-top: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.7;
    animation: fbIn .3s ease;
}

@keyframes fbIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

.fb.show { display: block; }
.fb.good { background: rgba(74, 222, 157, .08); border: 1px solid rgba(74, 222, 157, .32); color: #c6f7e0; }
.fb.bad { background: rgba(244, 114, 208, .07); border: 1px solid rgba(244, 114, 208, .3); color: #ffd9f2; }
.fb.hint { background: rgba(252, 211, 77, .07); border: 1px solid rgba(252, 211, 77, .3); color: #ffeeb8; }

.fb b { color: #fff; }

.sol {
    display: none;
    margin-top: 14px;
    padding: 18px 20px;
    border-radius: 12px;
    background: rgba(10, 8, 28, .55);
    border: 1px solid var(--stroke);
    border-left: 3px solid var(--violet);
    animation: fbIn .3s ease;
}

.sol.show { display: block; }

.sol h5 {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--violet);
    margin-bottom: 10px;
}

.sol p, .sol li { color: var(--ink-dim); font-size: 15px; line-height: 1.75; margin-bottom: 8px; }
.sol ol, .sol ul { margin: 0 0 6px 20px; }
.sol p:last-child { margin-bottom: 0; }
.sol .final {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 9px;
    background: rgba(74, 222, 157, .08);
    border: 1px solid rgba(74, 222, 157, .28);
    color: #b7f5d8;
    font-weight: 700;
}

/* Yakuniy natija */
.wb-result {
    display: none;
    margin: 4px 24px 24px;
    padding: 26px;
    border-radius: 16px;
    text-align: center;
    background: linear-gradient(150deg, rgba(56, 232, 255, .08), rgba(167, 139, 250, .08));
    border: 1px solid var(--stroke-bright);
    animation: fbIn .4s ease;
}

.wb-result.show { display: block; }

.wb-result .big {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 42px;
    background: var(--grad-magic);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 6s linear infinite;
}

.wb-result p { color: var(--ink-dim); margin: 8px 0 18px; }

.wb-foot {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 24px 24px;
}

/* Toast */
.toast-wrap {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    pointer-events: none;
}

.toast {
    padding: 12px 24px;
    border-radius: 40px;
    background: rgba(10, 8, 28, .92);
    border: 1px solid var(--stroke-bright);
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    box-shadow: 0 10px 34px rgba(0, 0, 0, .6), var(--shadow-glow);
    backdrop-filter: blur(12px);
    animation: toastIn .35s cubic-bezier(.2,.9,.3,1.3);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(18px) scale(.9); }
    to { opacity: 1; transform: none; }
}

.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* Chop etish */
@media print {
    .site-nav, .site-footer, .lesson-toc, .q-actions, .wb-foot, .magic-bg, .magic-grid, #magic-canvas { display: none !important; }
    body { background: #fff; color: #000; }
    .lesson-body p, .lesson-body li { color: #222; }
}
