/* Safar Live — jonli sinf viktorinasi: proyektor ekrani va o'quvchi telefoni. */
body.live-mode .topbar, body.live-mode .footer, body.live-mode .results-board, body.live-mode .xp-stack { display: none !important; }
body.live-mode main.container { max-width: none; padding: 0; }
body.live-mode::before, body.live-mode::after { display: none; }

.opt-c0 { --oc: #e2483d; --oink: #fff; } .opt-c1 { --oc: #1d6fd6; --oink: #fff; } .opt-c2 { --oc: #f2b416; --oink: #2a1d00; } .opt-c3 { --oc: #1f9d55; --oink: #fff; }

/* ---------- Panel: yaratish ---------- */
.live-promo { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 28px; border-radius: 22px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #3a1c7a, #1b1240 60%, #0d0a24); box-shadow: 0 24px 50px -28px rgba(30, 10, 80, 0.8); }
.live-promo h2 { margin: 0 0 6px; color: #fff; }
.live-promo p { margin: 0; color: rgba(255, 255, 255, 0.82); max-width: 640px; }
.live-promo-shapes { display: grid; grid-template-columns: repeat(2, 48px); gap: 8px; }
.live-promo-shapes span { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; color: var(--oink); background: var(--oc); animation: floatY 3s ease-in-out infinite; }
.live-promo-shapes span:nth-child(2) { animation-delay: -0.7s; } .live-promo-shapes span:nth-child(3) { animation-delay: -1.4s; } .live-promo-shapes span:nth-child(4) { animation-delay: -2.1s; }

/* ---------- O'quvchi: qo'shilish ---------- */
.live-join-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(120% 120% at 20% 0%, #4b2196, #241056 55%, #120a30); position: relative; overflow: hidden; }
.live-bg .float-shape { position: absolute; font-size: 8rem; color: var(--oc); opacity: 0.18; animation: drift 14s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -3s); }
.live-bg .float-shape:nth-child(1) { left: 6%; top: 10%; } .live-bg .float-shape:nth-child(2) { right: 8%; top: 18%; } .live-bg .float-shape:nth-child(3) { left: 12%; bottom: 8%; } .live-bg .float-shape:nth-child(4) { right: 14%; bottom: 12%; }
@keyframes drift { to { transform: translate(30px, -40px) rotate(25deg); } }
.live-join { position: relative; width: min(420px, 100%); display: grid; gap: 12px; padding: 26px; border-radius: 24px; animation: lvIn 0.6s var(--ease-out); }
.live-logo { display: flex; justify-content: center; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.6rem; }
.live-logo span { font-size: 2rem; animation: bounceIn 0.8s var(--ease-out); }
.pin-input { font-size: 2rem; text-align: center; letter-spacing: 0.4em; font-weight: 800; padding: 12px; border-radius: 14px; }
.name-input { font-size: 1.15rem; text-align: center; padding: 12px; border-radius: 14px; }
.avatar-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.avatar-grid .av { aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; background: var(--surface-2); font-size: 1.4rem; cursor: pointer; transition: transform 0.2s var(--ease-out); }
.avatar-grid .av:hover { transform: scale(1.12); }
.avatar-grid .av.active { border-color: var(--primary); background: var(--primary-soft); transform: scale(1.12); }
@media (max-width: 420px) { .avatar-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- O'quvchi: o'yin ---------- */
.live-play { min-height: 100vh; display: flex; flex-direction: column; color: #fff; background: radial-gradient(120% 120% at 20% 0%, #4b2196, #241056 55%, #120a30); transition: background 0.4s; }
.live-play.st-reveal.good { background: radial-gradient(120% 120% at 50% 20%, #2fbf71, #127a42 60%, #0a4426); }
.live-play.st-reveal.bad { background: radial-gradient(120% 120% at 50% 20%, #e2604f, #a12b20 60%, #5a120c); }
.live-play.st-final { background: radial-gradient(120% 120% at 50% 0%, #f2b416, #b9661a 50%, #4b2196); }
.lpl-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-weight: 700; background: rgba(0, 0, 0, 0.18); }
.lpl-me { font-size: 1.05rem; }
.lpl-timer { height: 8px; background: rgba(255, 255, 255, 0.15); }
.lpl-timer i { display: block; height: 100%; background: linear-gradient(90deg, #f2b416, #e2483d); transform-origin: left; animation: shrink linear forwards; }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.lpl-q { padding: 16px 18px 6px; margin: 0; font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
.lpl-opts { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
.lpl-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px 10px; border: 0; border-radius: 18px; background: var(--oc); color: var(--oink); font: inherit; font-weight: 700; font-size: 0.95rem; line-height: 1.3; cursor: pointer; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25); transition: transform 0.12s; animation: pop 0.4s var(--ease-out) both; }
.lpl-opt:active { transform: translateY(4px) scale(0.98); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.lpl-opt .shape { font-size: 2.2rem; line-height: 1; }
.lp-msg { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; }
.lp-msg h2 { color: #fff; margin: 0; font-size: 1.8rem; }
.lp-msg p { color: rgba(255, 255, 255, 0.85); margin: 0; }
.big-emoji { font-size: 5rem; line-height: 1; }
.big-emoji.bounce { animation: floatY 1.6s ease-in-out infinite; }
.big-emoji.pop { animation: bounceIn 0.7s var(--ease-out); }
.big-emoji.spin-slow { animation: spin 3s linear infinite; }
.dots { display: flex; gap: 8px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; } .dots i:nth-child(3) { animation-delay: 0.4s; }
.points-pop { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; padding: 6px 22px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); animation: bounceIn 0.6s var(--ease-out) 0.2s both; }
.streak-badge { padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); font-weight: 700; animation: pop 0.5s var(--ease-out) 0.4s both; }
.correct-was { max-width: 420px; }
.lpl-score { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; font-weight: 700; }
.lpl-score span { padding: 8px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); }
.mini-podium { display: grid; gap: 6px; margin: 10px 0; text-align: left; }
.mini-podium div { padding: 8px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); }

/* ---------- O'qituvchi: proyektor ---------- */
.live-host-wrap { position: relative; min-height: 100vh; color: #fff; background: radial-gradient(120% 120% at 15% 0%, #4b2196, #241056 55%, #120a30); overflow: hidden; }
.live-host-wrap::before { content: ""; position: absolute; inset: -30%; background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.05), transparent 25%, rgba(242, 180, 22, 0.06), transparent 50%); animation: spin 40s linear infinite; pointer-events: none; }
.lh-tools { position: absolute; right: 16px; top: 14px; z-index: 5; display: flex; gap: 6px; }
.lh-tool { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 1.1rem; cursor: pointer; }
.live-host { position: relative; min-height: 100vh; display: flex; flex-direction: column; padding: 24px 32px 28px; gap: 18px; }
.lh-lobby { flex: 1; display: grid; grid-template-columns: minmax(320px, 0.9fr) 1.1fr; gap: 32px; align-items: center; }
.lh-join { text-align: center; padding: 28px; border-radius: 28px; background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(10px); }
.lh-title { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 10px; }
.lh-join p { margin: 8px 0 4px; color: rgba(255, 255, 255, 0.75); }
.lh-url { font-size: 1.6rem; font-weight: 800; color: #f2b416; }
.lh-pin { display: flex; justify-content: center; gap: 8px; margin: 6px 0 14px; }
.lh-pin span { width: 58px; height: 76px; display: grid; place-items: center; border-radius: 14px; background: #fff; color: #241056; font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; box-shadow: 0 8px 0 rgba(0, 0, 0, 0.25); animation: bounceIn 0.6s var(--ease-out) calc(var(--i) * 0.08s) both; }
.lh-qr { display: inline-block; padding: 8px; border-radius: 16px; background: #fff; animation: pop 0.6s var(--ease-out) 0.6s both; }
.lh-lobby-right { display: flex; flex-direction: column; gap: 16px; min-height: 60vh; }
.lh-count-players { font-size: 1.3rem; } .lh-count-players b { font-family: var(--font-display); font-size: 2.6rem; color: #f2b416; }
.lh-players { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px; }
.lh-player { display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); font-size: 1.1rem; animation: bounceIn 0.6s var(--ease-out) both; }
.lh-player span { font-size: 1.5rem; }
.lh-wait { color: rgba(255, 255, 255, 0.7); font-size: 1.2rem; }
.lh-big { align-self: flex-start; font-size: 1.2rem; padding: 14px 28px; }
.lh-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-right: 100px; }
.lh-qnum { font-family: var(--font-display); font-size: 1.3rem; padding: 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); }
.lh-answered { font-size: 1.2rem; font-weight: 700; }
.lh-qwrap { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 10px 0; }
.lh-ring { --p: 100; width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#f2b416 calc(var(--p) * 1%), rgba(255, 255, 255, 0.12) 0); transition: background 0.9s linear; position: relative; }
.lh-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #241056; }
.lh-count { position: relative; font-family: var(--font-display); font-size: 3.2rem; font-weight: 800; }
.lh-q { margin: 0; color: #fff; font-size: clamp(1.4rem, 3vw, 2.4rem); line-height: 1.25; animation: wordIn 0.6s var(--ease-out); }
.lh-q.small { font-size: clamp(1.1rem, 2.2vw, 1.7rem); }
.lh-opts { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lh-opt { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 18px; background: var(--oc); color: var(--oink); font-size: clamp(1rem, 2vw, 1.5rem); font-weight: 700; box-shadow: 0 8px 0 rgba(0, 0, 0, 0.25); animation: pop 0.5s var(--ease-out) calc(0.2s + var(--i, 0) * 0.1s) both; }
.lh-opt .shape { font-size: 2rem; }
.lh-opt.small { padding: 10px 14px; font-size: 0.95rem; box-shadow: none; }
.lh-dist { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: end; }
.lh-dcol { display: flex; flex-direction: column; gap: 10px; transition: opacity 0.4s; }
.lh-dcol.dim { opacity: 0.45; }
.lh-dcol.correct .lh-opt { box-shadow: 0 0 0 4px #fff; }
.lh-dbar-wrap { height: 38vh; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.lh-dbar-wrap b { font-size: 1.8rem; }
.lh-dbar { width: 70%; height: var(--h); min-height: 6px; border-radius: 12px 12px 0 0; background: var(--oc); transform-origin: bottom; animation: growUp 0.9s var(--ease-out) both; }
@keyframes growUp { from { transform: scaleY(0); } }
.lh-board { list-style: none; padding: 0; margin: 0 auto; width: min(900px, 100%); display: grid; gap: 10px; }
.lh-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-radius: 16px; background: rgba(255, 255, 255, 0.12); font-size: 1.3rem; animation: rowIn 0.7s var(--ease-out) calc(var(--i) * 0.08s) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(var(--from, 30px)) scale(0.97); } }
.lh-row:first-child { background: linear-gradient(90deg, rgba(242, 180, 22, 0.45), rgba(255, 255, 255, 0.12)); }
.lh-rank { width: 40px; font-family: var(--font-display); font-weight: 800; }
.lh-av { font-size: 1.8rem; }
.lh-name { flex: 1; }
.lh-streak, .lh-up, .lh-last { font-size: 0.95rem; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); }
.lh-up { color: #7dffb0; }
.lh-last { color: #f2b416; }
.lh-total { font-family: var(--font-display); font-weight: 800; min-width: 80px; text-align: right; }
.lh-podium { flex: 1; display: flex; justify-content: center; align-items: flex-end; gap: 18px; padding-top: 20px; }
.lh-pod { display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(240px, 28vw); animation: page-in 0.8s var(--ease-out) var(--d) both; }
.lh-pod-av { font-size: 4rem; animation: bounceIn 0.8s var(--ease-out) calc(var(--d) + 0.4s) both; }
.lh-pod b { font-size: 1.4rem; }
.lh-pod-col { width: 100%; display: grid; place-items: start center; padding-top: 14px; font-size: 3rem; border-radius: 16px 16px 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.1)); transform-origin: bottom; animation: growUp 1s var(--ease-out) var(--d) both; }
.lh-pod.p1 .lh-pod-col { height: 34vh; background: linear-gradient(180deg, #f6d58a, #c8912a); }
.lh-pod.p2 .lh-pod-col { height: 25vh; background: linear-gradient(180deg, #e8eef2, #9aa7b4); }
.lh-pod.p3 .lh-pod-col { height: 18vh; background: linear-gradient(180deg, #f0c2a0, #b8743f); }
.lh-rest { columns: 2; max-width: 800px; margin: 0 auto; font-size: 1.1rem; }
.lh-rest li { padding: 4px 0; } .lh-rest b { margin-left: 8px; color: #f2b416; }
.btn.ghost.light { color: #fff; border-color: rgba(255, 255, 255, 0.45); }
@media (max-width: 860px) { .lh-lobby { grid-template-columns: 1fr; } .lh-opts, .lh-dist { grid-template-columns: 1fr 1fr; } .live-host { padding: 16px; } .lh-top { padding-right: 90px; flex-wrap: wrap; } .lh-pin span { width: 44px; height: 58px; font-size: 2rem; } }

/* ===== Test tahlili (item analysis) ===== */
.ia-hist { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 8px; }
.ia-hcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.ia-hcol span { font-size: 0.72rem; color: var(--muted); }
.ia-hcol i { display: block; width: 100%; height: var(--h, 0%); min-height: 2px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 55%, transparent)); transform-origin: bottom; animation: iaGrow 0.7s ease-out both; }
.ia-hcol small { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }
@keyframes iaGrow { from { transform: scaleY(0); } }
.ia-table td { vertical-align: top; }
.ia-q { min-width: 240px; max-width: 420px; }
.ia-q summary { cursor: pointer; font-weight: 600; }
.ia-q ol { margin: 6px 0 4px 1.2em; padding: 0; font-size: 0.86rem; }
.ia-flag { margin-top: 4px; font-size: 0.8rem; padding: 3px 8px; border-radius: 8px; }
.ia-flag.critical { background: var(--err-soft); color: var(--err); font-weight: 600; }
.ia-flag.warn { background: var(--warn-soft); color: var(--warn); }
.ia-flag.info { background: var(--surface-2); color: var(--muted); }
.ia-pbar { width: 90px; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 3px; }
.ia-pbar i { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.ia-d { display: inline-block; min-width: 3.2em; text-align: center; padding: 2px 8px; border-radius: 99px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--surface-2); }
.ia-d.lv-bad { background: var(--err-soft); color: var(--err); }
.ia-d.lv-warn { background: var(--warn-soft); color: var(--warn); }
.ia-d.lv-mid { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }
.ia-d.lv-good { background: var(--ok-soft); color: var(--ok); }
.ia-opts { display: flex; gap: 2px; min-width: 180px; }
.ia-opt { padding: 3px 4px; font-size: 0.74rem; text-align: center; white-space: nowrap; overflow: hidden; border-radius: 5px; background: var(--surface-2); color: var(--muted); }
.ia-opt.key { background: var(--ok-soft); color: var(--ok); font-weight: 700; }
tr.ia-critical > td { background: color-mix(in srgb, var(--err-soft) 60%, transparent); }

/* ===== So'z buluti ===== */
.wc-promo h3 { margin: 0 0 4px; }
.wc-mini { position: relative; width: 190px; height: 90px; }
.wc-mini span { position: absolute; font-weight: 800; color: var(--primary); animation: floatY 3s ease-in-out infinite; animation-delay: calc(var(--i) * -0.5s); }
.wc-mini span:nth-child(1) { left: 40%; top: 30%; font-size: 1.6rem; } .wc-mini span:nth-child(2) { left: 0; top: 4%; color: var(--accent); }
.wc-mini span:nth-child(3) { right: 0; top: 0; color: #e3524a; } .wc-mini span:nth-child(4) { left: 4%; bottom: 0; color: #7c5cff; font-size: 1.2rem; }
.wc-mini span:nth-child(5) { right: 8%; bottom: 4%; color: #3ecf8e; } .wc-mini span:nth-child(6) { left: 46%; bottom: -4%; font-size: 0.8rem; color: var(--muted); }
.st-cloud.live-host { background: radial-gradient(120% 120% at 10% 0%, #10414a, #0b1d33 55%, #070d1c); }
.wc-host { min-height: 100vh; display: flex; flex-direction: column; padding: 28px 36px 22px; gap: 16px; color: #fff; }
.wc-top { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.wc-prompt small { text-transform: uppercase; letter-spacing: 0.12em; color: #7fd8e0; font-weight: 700; }
.wc-prompt h1 { margin: 6px 0 0; color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.8rem); line-height: 1.15; max-width: 900px; }
.wc-join { display: flex; gap: 14px; align-items: center; text-align: right; }
.wc-join small { color: rgba(255, 255, 255, 0.7); }
.wc-pin { font-size: 2.6rem; font-weight: 900; letter-spacing: 0.12em; color: #ffd36b; font-variant-numeric: tabular-nums; }
.lh-qr.small svg { width: 120px; height: 120px; display: block; }
.wc-cloud { flex: 1; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; align-items: center; gap: 6px 22px; padding: 10px 4%; }
.wc-word { background: none; border: 0; padding: 0 2px; cursor: pointer; line-height: 1.05; font-family: inherit; transition: font-size 0.8s cubic-bezier(.2,.9,.3,1.2), opacity 0.2s; text-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); }
.wc-word:hover { opacity: 0.6; text-decoration: line-through; }
.wc-word.new { animation: wcPop 0.8s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes wcPop { from { opacity: 0; transform: scale(0.2) rotate(-8deg); } }
.wc-empty { text-align: center; color: rgba(255, 255, 255, 0.6); }
.wc-empty span { font-size: 6rem; display: block; animation: floatY 3s ease-in-out infinite; }
.wc-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wc-stats { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-weight: 700; color: rgba(255, 255, 255, 0.88); }
.wc-stats .muted { color: rgba(255, 255, 255, 0.5); font-weight: 400; }
.st-cloud.closed .wc-cloud { animation: wcGlow 3s ease-in-out infinite alternate; }
@keyframes wcGlow { to { filter: drop-shadow(0 0 18px rgba(127, 216, 224, 0.35)); } }
.st-cloud.live-play { background: radial-gradient(120% 120% at 10% 0%, #10414a, #0b1d33 60%, #070d1c); }
.wc-form { display: flex; flex-direction: column; gap: 12px; padding: 20px; max-width: 480px; margin: 0 auto; width: 100%; }
.wc-input { font-size: 1.3rem; padding: 14px 16px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08); color: #fff; }
.wc-input:focus { outline: none; border-color: #7fd8e0; background: rgba(255, 255, 255, 0.14); }
.wc-mine { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.wc-mine span { padding: 8px 14px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); font-weight: 700; font-size: 1.1rem; animation: wcPop 0.6s cubic-bezier(.3,1.6,.5,1) both; }
@media (max-width: 760px) { .wc-top { flex-direction: column; } .wc-host { padding: 18px; } }
