/* =========================================================
   PET-EDU — o'quvchi kabineti
   ========================================================= */

/* ---------- Hero ---------- */
.st-hero { position: relative; overflow: hidden; border-radius: 28px; padding: 2rem 2.2rem; color: #fff;
  background: radial-gradient(700px 360px at 100% 0%, rgba(236, 72, 153, .42), transparent 60%), radial-gradient(600px 320px at 0% 100%, rgba(14, 165, 233, .35), transparent 60%), var(--ink-2); }
.st-hero::before { content: ''; position: absolute; inset: 0; opacity: .6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.05'%3E%3Cpath d='M40 8l9.4 22.6L72 40l-22.6 9.4L40 72l-9.4-22.6L8 40l22.6-9.4z'/%3E%3C/g%3E%3C/svg%3E"); }
.st-hello { font-weight: 700; color: rgba(255, 255, 255, .7); margin-bottom: .4rem; }
.st-hero-title { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.15; margin-bottom: .6rem; }
.st-hero-sub { color: rgba(255, 255, 255, .7); max-width: 560px; margin-bottom: 1.4rem; }
.text-grad-light { background: linear-gradient(90deg, #a5f3fc, #c4b5fd, #f9a8d4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.st-ring-wrap { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.st-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 12; }
.ring-fg { fill: none; stroke-width: 12; stroke-linecap: round; stroke-dasharray: 427.3; stroke-dashoffset: 427.3; animation: ring 1.6s cubic-bezier(.3, .8, .3, 1) .2s forwards; }
@keyframes ring { to { stroke-dashoffset: calc(427.3 - 427.3 * var(--p) / 100); } }
.st-ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.st-ring-val { font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.st-ring-lbl { font-size: .75rem; color: rgba(255, 255, 255, .6); font-weight: 600; }

/* ---------- Yo'l xaritasi ---------- */
.jmap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; position: relative; }
.jmap::before { content: ''; position: absolute; left: 10%; right: 10%; top: 32px; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, #d9dcef 0 10px, transparent 10px 18px); }
.jstop { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; color: inherit; padding: 0 .2rem; }
.jstop:hover .jpin { transform: translateY(-3px); }
.jpin { position: relative; width: 66px; height: 66px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: #fff; border: 2px solid var(--line); color: #98a2b3; transition: transform .2s; z-index: 1; margin-bottom: .8rem; }
.jnum { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; font-size: .72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--line); color: var(--muted); }
.jstop.done .jpin { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.jstop.done .jnum { background: #16a34a; border-color: #fff; color: #fff; }
.jstop.now .jpin { border-color: var(--brand); color: var(--brand); animation: pulse-ring 1.8s infinite; }
.jstop.now .jnum { background: var(--brand); border-color: #fff; color: #fff; }
.jstop.locked { opacity: .55; pointer-events: none; }
.jbody { width: 100%; }
.jname { font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.jsci { font-size: .72rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.jhint { font-size: .74rem; color: var(--muted); font-weight: 600; margin-top: .35rem; }
.jstop .bar { height: 6px; }

/* ---------- Mezon kartalari ---------- */
.crit { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.1rem; height: 100%; }
.crit-val { font-size: 1.35rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.chart-box { position: relative; height: 320px; }
.chart-box.sm { height: 240px; }

.next-list { display: grid; gap: .5rem; }
.next-item { display: flex; align-items: center; gap: .9rem; padding: .7rem .8rem; border-radius: 14px; background: var(--bg); color: var(--text); transition: background .15s, transform .15s; }
.next-item:hover { background: var(--brand-50); transform: translateX(2px); color: var(--text); }
.next-item > span:nth-child(2) { flex: 1; min-width: 0; }
.next-item b { display: block; color: var(--ink); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-item small { display: block; color: var(--muted); font-weight: 600; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-item > i { color: var(--muted); }

/* ---------- Nishonlar ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .8rem; }
.bdg { text-align: center; }
.bdg-ico { width: 60px; height: 60px; margin: 0 auto .45rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.5rem; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .35); position: relative; }
.bdg-ico::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px dashed rgba(0, 0, 0, .08); }
.bdg.locked .bdg-ico { background: var(--line-2); color: #b7bbd0; box-shadow: none; }
.bdg-name { font-size: .74rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.bdg.locked .bdg-name { color: var(--muted); }
.act-list { display: grid; gap: .5rem; }
.act-item { display: flex; align-items: center; gap: .7rem; font-size: .88rem; font-weight: 600; padding: .55rem .7rem; border-radius: 12px; background: var(--bg); }
.act-pts { font-weight: 800; color: #16a34a; background: #dcfce7; border-radius: 8px; padding: .1rem .45rem; font-size: .8rem; }

/* ---------- Nishon modali ---------- */
.badge-modal .modal-content { border: 0; border-radius: 28px; overflow: hidden; text-align: center; }
.badge-modal .bm-top { padding: 2.2rem 1.5rem 1.2rem; background: radial-gradient(400px 200px at 50% 0%, rgba(139, 92, 246, .25), transparent 70%); position: relative; }
.bm-ico { width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: #fff; animation: bm-pop .8s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .35); }
@keyframes bm-pop { from { transform: scale(.2) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall 2.4s linear forwards; }
@keyframes fall { to { transform: translateY(420px) rotate(540deg); opacity: 0; } }

/* ---------- Diagnostika / testlar ---------- */
.test-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 1.4rem; transition: transform .2s, box-shadow .2s; }
.test-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.test-card.done { border-color: #bbf7d0; background: linear-gradient(180deg, #f0fdf4, #fff 40%); }
.q-wrap { max-width: 760px; margin: 0 auto; }
.q-progress { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.q-progress .bar { flex: 1; height: 10px; }
.q-count { font-weight: 800; color: var(--ink); white-space: nowrap; }
.q-card { background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 2rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.js .q-card { display: none; }
.js .q-card.cur { display: block; animation: qin .35s ease; }
@keyframes qin { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.q-num { font-size: .78rem; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .6rem; }
.q-body { font-size: 1.35rem; font-weight: 800; color: var(--ink); line-height: 1.35; letter-spacing: -.02em; margin-bottom: 1.6rem; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
.likert input, .opts input { position: absolute; opacity: 0; pointer-events: none; }
.likert label { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem .4rem; border-radius: 18px; border: 2px solid var(--line); cursor: pointer; text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); transition: all .15s; background: #fff; }
.likert label .lk-dot { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; color: #fff; }
.likert label:hover { border-color: #c9c5ff; transform: translateY(-2px); }
.likert input:checked + label { border-color: var(--brand); background: var(--brand-50); color: var(--ink); box-shadow: 0 0 0 4px rgba(99, 102, 241, .12); }
.opts { display: grid; gap: .6rem; }
.opts label { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border-radius: 16px; border: 2px solid var(--line); cursor: pointer; font-weight: 700; color: var(--ink); transition: all .15s; background: #fff; }
.opts label::before { content: ''; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfd3e3; flex-shrink: 0; transition: all .15s; }
.opts label:hover { border-color: #c9c5ff; }
.opts input:checked + label { border-color: var(--brand); background: var(--brand-50); }
.opts input:checked + label::before { border: 7px solid var(--brand); }
.opts label.right { border-color: #22c55e; background: #f0fdf4; }
.opts label.wrong { border-color: #ef4444; background: #fef2f2; }
.q-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

.res-hero { text-align: center; padding: 2rem 1rem 1rem; }
.res-hero .icon-tile { margin: 0 auto 1rem; }
.top-card { border-radius: 22px; padding: 1.4rem; color: #fff; height: 100%; position: relative; overflow: hidden; }
.top-card .tc-rank { position: absolute; right: 1rem; top: .6rem; font-size: 3.2rem; font-weight: 800; opacity: .2; }
.top-card .tc-ico { font-size: 1.8rem; margin-bottom: .6rem; }
.top-card h4 { color: #fff; font-size: 1.15rem; margin-bottom: .3rem; }
.top-card p { color: rgba(255, 255, 255, .85); font-size: .88rem; margin-bottom: 0; }
.hbar { display: grid; grid-template-columns: 170px 1fr 44px; align-items: center; gap: .8rem; padding: .45rem 0; font-weight: 700; font-size: .88rem; }
.hbar .bar { height: 10px; }
.hbar-val { text-align: right; font-weight: 800; color: var(--ink); }

/* ---------- Darslar ---------- */
.filter-pills { display: flex; gap: .5rem; flex-wrap: wrap; }
.filter-pills a { padding: .5rem 1rem; border-radius: 999px; font-weight: 700; font-size: .86rem; color: var(--muted); background: #fff; border: 1px solid var(--line); }
.filter-pills a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.lesson-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; color: inherit; transition: transform .2s, box-shadow .2s; }
.lesson-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.lc-cover { height: 118px; position: relative; display: flex; align-items: flex-end; padding: 1rem 1.2rem; color: #fff; overflow: hidden; }
.lc-cover::after { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.14'%3E%3Cpath d='M40 8l9.4 22.6L72 40l-22.6 9.4L40 72l-9.4-22.6L8 40l22.6-9.4z'/%3E%3C/g%3E%3C/svg%3E"); }
.lc-cover .lc-ico { position: absolute; right: 1rem; top: .8rem; font-size: 2.6rem; opacity: .9; z-index: 1; }
.lc-cover .chip { position: relative; z-index: 1; background: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(4px); }
.lc-body { padding: 1.1rem 1.2rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.lc-title { font-weight: 800; color: var(--ink); font-size: 1.05rem; line-height: 1.3; margin-bottom: .4rem; }
.lc-sum { font-size: .86rem; color: var(--muted); flex: 1; }
.lc-meta { display: flex; justify-content: space-between; align-items: center; margin-top: .9rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
.lc-done { color: #16a34a; }

/* Dars o'qish */
.lesson-head { border-radius: 26px; padding: 2rem; color: #fff; position: relative; overflow: hidden; margin-bottom: 1.5rem; }
.lesson-head h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.lesson-head .lh-ico { position: absolute; right: -10px; bottom: -30px; font-size: 10rem; opacity: .15; }
.steps-nav { display: flex; gap: .4rem; margin-bottom: 1.5rem; overflow-x: auto; padding-bottom: .2rem; }
.steps-nav button { flex: 1; min-width: 118px; border: 0; background: #fff; border-radius: 14px; padding: .65rem .8rem; display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .82rem; color: var(--muted); border: 1.5px solid var(--line); white-space: nowrap; }
.steps-nav button .sn { width: 24px; height: 24px; border-radius: 8px; background: var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; }
.steps-nav button.active { border-color: var(--brand); color: var(--ink); }
.steps-nav button.active .sn { background: var(--brand); color: #fff; }
.steps-nav button.seen .sn { background: #dcfce7; color: #16a34a; }
.lstep { display: none; }
.lstep.active { display: block; animation: qin .35s ease; }
.prose { font-size: 1.04rem; line-height: 1.75; color: #2b3148; }
.prose h3 { font-size: 1.2rem; margin: 1.6rem 0 .6rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .35rem; }
.callout { border-radius: 18px; padding: 1.2rem 1.3rem; background: var(--brand-50); border: 1px solid #e0ddff; margin: 1.2rem 0; }
.callout.warm { background: #fff7ed; border-color: #fed7aa; }
.callout.green { background: #f0fdf4; border-color: #bbf7d0; }
.big-quote { position: relative; border-radius: 22px; padding: 1.6rem 1.6rem 1.4rem 4.2rem; background: var(--ink-2); color: #fff; margin: 1.4rem 0; }
.big-quote::before { content: '“'; position: absolute; left: 1.2rem; top: .2rem; font-size: 5rem; line-height: 1; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.big-quote p { font-size: 1.12rem; font-weight: 700; margin-bottom: .5rem; }
.big-quote cite { color: rgba(255, 255, 255, .6); font-style: normal; font-weight: 600; font-size: .88rem; }

/* ---------- Kazuys o'yinchisi ---------- */
.case-card { display: flex; flex-direction: column; height: 100%; border-radius: 22px; overflow: hidden; background: #fff; border: 1px solid var(--line); color: inherit; transition: transform .2s, box-shadow .2s; }
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.player { max-width: 780px; margin: 0 auto; }
.story { background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 2rem; box-shadow: var(--shadow); }
.story-speaker { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: .85rem; color: var(--brand); background: var(--brand-50); border-radius: 999px; padding: .3rem .8rem; margin-bottom: 1rem; }
.story-text { font-size: 1.12rem; line-height: 1.75; color: #232a44; }
.story-text p:last-child { margin-bottom: 0; }
.choices { display: grid; gap: .7rem; margin-top: 1.6rem; }
.choice { text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 1rem 1.2rem; font-weight: 700; color: var(--ink); display: flex; gap: .9rem; align-items: center; transition: all .15s; }
.choice .ch-l { width: 34px; height: 34px; border-radius: 11px; background: var(--line-2); display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; color: var(--muted); }
.choice:hover { border-color: var(--brand); transform: translateX(3px); }
.choice:hover .ch-l { background: var(--brand); color: #fff; }
.feedback { border-radius: 16px; padding: .9rem 1.1rem; background: #fffbeb; border: 1px solid #fde68a; font-weight: 600; color: #92400e; margin-bottom: 1rem; animation: qin .3s ease; }
.path-trail { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.path-trail span { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); opacity: .35; }
.path-trail span:last-child { opacity: 1; box-shadow: 0 0 0 4px rgba(99, 102, 241, .2); }
.ending { text-align: center; }
.ending-ico { width: 96px; height: 96px; border-radius: 30px; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; color: #fff; }
.ending.good .ending-ico { background: var(--grad-fresh); }
.ending.mixed .ending-ico { background: var(--grad-warm); }
.ending.bad .ending-ico { background: linear-gradient(135deg, #64748b, #334155); }
.value-chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

/* ---------- Kundalik ---------- */
.mood-pick { display: flex; gap: .5rem; }
.mood-pick input { position: absolute; opacity: 0; pointer-events: none; }
.mood-pick label { width: 54px; height: 54px; border-radius: 16px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; cursor: pointer; transition: all .15s; background: #fff; }
.mood-pick input:checked + label { border-color: var(--brand); background: var(--brand-50); transform: scale(1.08); }
.entry { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.2rem 1.3rem; }
.entry-mood { font-size: 1.6rem; }
.entry-prompt { font-size: .82rem; font-weight: 700; color: var(--brand); }
.entry-body { white-space: pre-line; color: #2b3148; }
.teacher-reply { margin-top: .9rem; border-radius: 14px; background: #f0fdf4; border: 1px solid #bbf7d0; padding: .75rem .9rem; font-size: .9rem; }

/* ---------- Maqsadlar ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.kcol { background: #eef0f8; border-radius: 22px; padding: 1rem; min-height: 200px; }
.kcol-h { display: flex; align-items: center; justify-content: space-between; font-weight: 800; color: var(--ink); margin-bottom: .8rem; padding: 0 .2rem; }
.goal { background: #fff; border-radius: 16px; padding: 1rem; margin-bottom: .7rem; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.goal-title { font-weight: 800; color: var(--ink); line-height: 1.3; }
.goal-smart { display: grid; gap: .25rem; margin: .6rem 0; font-size: .8rem; color: var(--muted); }
.goal-smart b { color: var(--ink); display: inline-block; width: 18px; }
.goal .bar { height: 7px; }
.horizon-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.hz { border-radius: 22px; padding: 1.3rem; color: #fff; position: relative; overflow: hidden; min-height: 150px; }
.hz h4 { color: #fff; font-size: 1.05rem; }
.hz ul { padding-left: 1.1rem; margin: 0; font-size: .88rem; }
.hz .hz-ico { position: absolute; right: .8rem; top: .8rem; font-size: 2rem; opacity: .35; }
.smart-steps .ss { display: flex; gap: .8rem; margin-bottom: 1rem; }
.smart-steps .ss-l { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem; }

/* ---------- Portfolio ---------- */
.pf-cat { border-radius: 22px; background: #fff; border: 1px solid var(--line); padding: 1.2rem; height: 100%; }
.pf-item { border-radius: 14px; background: var(--bg); padding: .85rem 1rem; margin-bottom: .6rem; }
.pf-item-t { font-weight: 800; color: var(--ink); }
.pf-item-b { font-size: .88rem; color: #3d4461; white-space: pre-line; }
.share-box { border-radius: 22px; background: var(--ink-2); color: #fff; padding: 1.4rem; }
.share-box #qrBox { background: #fff; padding: 10px; border-radius: 14px; display: inline-block; }
.share-box #qrBox img, .share-box #qrBox canvas { display: block; }

/* ---------- Natija ---------- */
.lvl-card { border-radius: 20px; padding: 1.2rem; border: 1px solid var(--line); background: #fff; height: 100%; }
.lvl-scale { display: flex; gap: 4px; margin-top: .7rem; }
.lvl-scale span { flex: 1; height: 8px; border-radius: 4px; background: var(--line-2); }
.cert-cta { border-radius: 26px; padding: 1.8rem; background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.cert-cta h3 { color: #fff; }

/* ---------- Moslashuvchanlik ---------- */
@media (max-width: 991.98px) {
  .jmap { grid-template-columns: 1fr; gap: .7rem; }
  .jmap::before { left: 32px; right: auto; top: 20px; bottom: 20px; width: 4px; height: auto; background: repeating-linear-gradient(180deg, #d9dcef 0 10px, transparent 10px 18px); }
  .jstop { flex-direction: row; text-align: left; gap: 1rem; }
  .jpin { margin-bottom: 0; flex-shrink: 0; }
  .kanban, .horizon-map { grid-template-columns: 1fr; }
  .st-hero { padding: 1.5rem; }
}
@media (max-width: 575.98px) {
  .likert { grid-template-columns: 1fr; }
  .likert label { flex-direction: row; justify-content: flex-start; padding: .7rem .9rem; text-align: left; }
  .likert label .lk-dot { width: 32px; height: 32px; }
  .q-card, .story { padding: 1.3rem; border-radius: 20px; }
  .q-body { font-size: 1.12rem; }
  .hbar { grid-template-columns: 110px 1fr 38px; font-size: .8rem; }
}
