:root {
  color-scheme: dark;
  --bg: #0b0e1a; --card: rgba(24, 29, 48, .88); --card2: rgba(255, 255, 255, .06); --line: rgba(255, 255, 255, .09);
  --txt: #eef1fb; --mut: #94a0bf; --pri: #5b8cff; --pri2: #8a5bff; --cy: #36d6ff;
  --ok: #3ecf8e; --warn: #f5b942; --bad: #ff5d6c; --r: 22px;
  --pri-rgb: 91, 140, 255; --pri2-rgb: 138, 91, 255; --tx1: #2a49b8; --tx2: #6a3fe0;   /* o'quv markaz kodi kiritilganda JS shularni almashtiradi */
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--txt); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); position: relative; overflow-x: hidden; }
body.noscroll { overflow: hidden; }
main { max-width: 680px; margin: 0 auto; padding: 0 14px 48px; transition: max-width .25s; }
body.casting main { max-width: 1180px; }
[hidden] { display: none !important; }

.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 50% at 15% 0%, rgba(var(--pri-rgb), .28), transparent 70%),
              radial-gradient(50% 45% at 100% 10%, rgba(var(--pri2-rgb), .24), transparent 70%),
              radial-gradient(60% 50% at 50% 110%, rgba(54,214,255,.14), transparent 70%); }

/* Sarlavha */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 1180px; margin: 0 auto; padding: 14px; }
.logo { font-weight: 800; font-size: 19px; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; }
.logo-mark { background: linear-gradient(135deg, var(--cy), var(--pri2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 22px; }
.top-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fn-btn { background: linear-gradient(135deg, var(--pri), var(--pri2)); color: #fff; font-weight: 700; padding: 9px 14px; border-radius: 999px; display: flex; align-items: center; gap: 8px; box-shadow: 0 6px 20px rgba(91,140,255,.35); }
.badge { background: rgba(255,255,255,.25); border-radius: 999px; padding: 1px 8px; font-size: 12px; }

h1 { font-size: 30px; line-height: 1.15; margin: 18px 0 10px; letter-spacing: -.3px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.grad { background: linear-gradient(90deg, var(--cy), var(--pri), var(--pri2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero { padding: 10px 0 6px; }
.sub { color: var(--mut); margin: 0 0 24px; line-height: 1.55; }
.muted { color: var(--mut); font-size: 13px; }
.center { text-align: center; }
.tip { margin: 10px 0 2px; line-height: 1.45; }
.warn-t { color: var(--warn); }
.err { color: var(--bad); font-size: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.cards { display: grid; gap: 14px; }
@media (min-width: 560px) { .cards { grid-template-columns: 1fr 1fr; } }

button { font: inherit; color: inherit; border: 0; cursor: pointer; border-radius: 14px; padding: 12px 16px; transition: transform .12s, filter .15s, background .2s; }
button:hover { filter: brightness(1.1); }
button:active { transform: scale(.97); }
button.primary { background: linear-gradient(135deg, var(--pri), var(--pri2)); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(91,140,255,.4); }
button.sec { background: var(--card2); border: 1px solid var(--line); }
button.sec.ic { padding: 12px 14px; font-size: 18px; border-radius: 50%; width: 48px; height: 48px; }
button.wide { width: 100%; }
button.link { background: none; color: var(--mut); padding: 8px; text-decoration: underline; }
button.link.danger { color: var(--bad); }
button.back { background: none; color: var(--mut); padding: 8px 0; }
button.round { width: 68px; height: 68px; border-radius: 50%; font-size: 26px; padding: 0; }
button.x { background: none; color: var(--mut); padding: 4px 10px; }
button.sec.on { background: var(--bad); color: #fff; border-color: transparent; font-weight: 700; }
button.sec.live { background: var(--ok); color: #06241a; border-color: transparent; font-weight: 700; }

.big { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; padding: 24px; border-radius: 24px; color: #fff;
  background: linear-gradient(135deg, #2a49b8, #6a3fe0); box-shadow: 0 16px 40px rgba(75,70,220,.35); }
.big.alt { background: linear-gradient(135deg, #0f8a73, #2a6fd0); box-shadow: 0 16px 40px rgba(20,140,160,.3); }
.big .ico { font-size: 28px; background: rgba(255,255,255,.18); width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; }
.big b { font-size: 21px; }
.big small { color: #dbe2ff; font-size: 14px; line-height: 1.4; }

label { display: block; color: var(--mut); font-size: 13px; margin: 12px 0 6px; }
input[type=text], input:not([type]), input[type=url], select {
  width: 100%; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line); background: var(--card2); color: var(--txt); font: inherit; outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--pri); box-shadow: 0 0 0 3px rgba(91,140,255,.2); }
select option { background: #1a1f35; }
.code-in { font-size: 36px; text-align: center; letter-spacing: 10px; font-weight: 800; }
#joinBtn { width: 100%; margin-top: 18px; padding: 16px; font-size: 17px; }

/* Toggle (switch) */
label.sw { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--txt); font-size: 14px; margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
label.sw:last-child { border-bottom: 0; }
input.tg { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 99px; background: #2b3350; position: relative; flex: none; cursor: pointer; transition: .2s; border: 1px solid var(--line); margin: 0; }
input.tg::after { content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
input.tg:checked { background: linear-gradient(135deg, var(--pri), var(--pri2)); border-color: transparent; }
input.tg:checked::after { transform: translateX(18px); }

/* Xona kartasi */
.room { display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; align-items: center; }
.room-code small { color: var(--mut); }
.code { font-size: 46px; font-weight: 800; letter-spacing: 8px; font-variant-numeric: tabular-nums; background: linear-gradient(90deg, #fff, #b9c8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.code.sm { font-size: 22px; letter-spacing: 4px; }
.members { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: rgba(91,140,255,.18); border: 1px solid rgba(91,140,255,.4); font-size: 15px; font-weight: 600; }
.pill b { font-size: 20px; font-variant-numeric: tabular-nums; }
.pill.ok { background: rgba(62,207,142,.14); border-color: rgba(62,207,142,.4); color: var(--ok); }
/* A'zolar soni: sarlavhada doim ko'rinadi */
.memchip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; background: linear-gradient(135deg, rgba(91,140,255,.3), rgba(138,91,255,.3)); border: 1px solid rgba(138,91,255,.55); font-size: 14px; }
.memchip b { font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.room-qr img { background: #fff; border-radius: 14px; display: block; padding: 4px; }
.room-link { grid-column: 1 / -1; display: flex; gap: 8px; }
.room-link input { flex: 1; font-size: 13px; }
#lanHint { grid-column: 1 / -1; margin: 0; color: var(--warn); }

/* Pleyer */
.np { font-weight: 700; margin-bottom: 12px; word-break: break-word; display: flex; align-items: center; gap: 10px; }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; flex: none; }
.eq i { width: 4px; height: 6px; border-radius: 2px; background: linear-gradient(var(--cy), var(--pri2)); }
body.playing .eq i { animation: eq 0.9s ease-in-out infinite; }
body.playing .eq i:nth-child(2) { animation-delay: -.3s; } body.playing .eq i:nth-child(3) { animation-delay: -.6s; } body.playing .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 18px; } }
.slot { margin-bottom: 12px; }
.stage { position: relative; width: 100%; border-radius: 18px; overflow: hidden; background: #000; }
.stage video, .stage img, .stage iframe, .doccard, .cover, .docview { display: none; }
.stage[data-kind="video"] video.pl { display: block; width: 100%; max-height: 46vh; background: #000; }
.stage[data-kind="cast"] #castVideo { display: block; width: 100%; max-height: 72vh; background: #000; object-fit: contain; }
.stage[data-kind="cast"].fill #castVideo { object-fit: cover; }
.stage[data-kind="image"] img { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: #000; }
.stage[data-kind="pdf"] iframe, .stage[data-kind="text"] iframe { display: block; width: 100%; height: 60vh; border: 0; background: #fff; }
.stage[data-kind="doc"] .doccard, .stage[data-kind="archive"] .doccard { display: flex; }
.stage[data-kind="audio"] .cover, .stage[data-kind="none"] .cover { display: flex; }
.stage[data-kind="audio"], .stage[data-kind="none"] { background: linear-gradient(135deg, #1d2753, #35205e); }
.cover { align-items: center; justify-content: center; height: 150px; font-size: 58px; }
.doccard { flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 30px 14px; background: #1d2753; text-align: center; }
.doc-ico { font-size: 56px; }
.doc-name { font-weight: 700; word-break: break-word; }
.filebar { display: flex; gap: 8px; padding: 8px; background: rgba(255,255,255,.07); }
.filebar a { flex: 1; text-align: center; padding: 10px; border-radius: 12px; background: linear-gradient(135deg, var(--pri), var(--pri2)); color: #fff; text-decoration: none; font-weight: 600; }
.stage[data-kind="cast"] .filebar { display: none; }
.tap { position: absolute; inset: 0; width: 100%; background: rgba(0,0,0,.65); font-size: 18px; font-weight: 700; color: #fff; border-radius: 0; }

/* Ekran uzatish: boshqaruv va to'liq ekran */
.castbar { display: none; position: absolute; right: 10px; bottom: 10px; gap: 8px; z-index: 5; }
.stage[data-kind="cast"] .castbar { display: flex; }
.castbar button { background: rgba(10,12,24,.65); backdrop-filter: blur(8px); color: #fff; width: 42px; height: 42px; padding: 0; font-size: 18px; border: 1px solid rgba(255,255,255,.18); }
.fsexit { display: none; position: absolute; left: 14px; top: calc(14px + env(safe-area-inset-top)); z-index: 6; background: rgba(10,12,24,.7); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.stage:fullscreen, .stage.pseudo-fs { display: flex; align-items: center; justify-content: center; background: #000; border-radius: 0; width: 100vw; height: 100vh; }
.stage:-webkit-full-screen { display: flex; align-items: center; justify-content: center; background: #000; border-radius: 0; width: 100vw; height: 100vh; }
.stage.pseudo-fs { position: fixed; inset: 0; z-index: 200; height: 100dvh; }
.stage:fullscreen #castVideo, .stage.pseudo-fs #castVideo { width: 100%; height: 100%; max-height: none; }
.stage:-webkit-full-screen #castVideo { width: 100%; height: 100%; max-height: none; }
.stage:fullscreen .fsexit, .stage.pseudo-fs .fsexit { display: block; }
.stage:-webkit-full-screen .fsexit { display: block; }

.seek-row { display: flex; align-items: center; gap: 10px; color: var(--mut); font-size: 13px; font-variant-numeric: tabular-nums; }
input[type=range] { flex: 1; width: 100%; accent-color: var(--pri); height: 28px; }
.controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.btn-row button { flex: 1; min-width: 130px; }

/* Fayllar */
.drop { border: 2px dashed rgba(255,255,255,.16); border-radius: 18px; padding: 20px; text-align: center; cursor: pointer; color: var(--txt); margin: 0 0 10px; transition: .15s; }
.drop span, .drop small { color: var(--mut); display: block; }
.drop.over { border-color: var(--pri); background: rgba(91,140,255,.1); }
.url-row { display: flex; gap: 8px; margin: 10px 0; }
.up { display: grid; grid-template-columns: 1fr 120px; gap: 2px 10px; align-items: center; font-size: 13px; margin: 8px 0; }
.up-pct { grid-column: 2; color: var(--mut); text-align: right; font-variant-numeric: tabular-nums; }
.up span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up.bad { color: var(--bad); }
progress { width: 100%; height: 8px; accent-color: var(--pri); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; cursor: pointer; transition: background .15s; }
.list li:hover { background: var(--card2); }
.list li.cur { background: rgba(91,140,255,.16); outline: 1px solid rgba(91,140,255,.45); }
.list .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .sz { color: var(--mut); font-size: 12px; }
.list .x { background: none; color: var(--mut); padding: 4px 8px; }
.rlist li { cursor: default; }
.rlist .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mut); flex: none; }
.rlist .dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.rlist button { background: var(--card2); border: 1px solid var(--line); padding: 6px 10px; border-radius: 10px; }
.rlist button.on { background: var(--bad); color: #fff; }

.foot { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* Receiver */
.r-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.r-status { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 12px 0 4px; }
.vol { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
#castPrev { display: block; width: 100%; max-height: 180px; margin-top: 10px; border-radius: 14px; background: #000; }
#micMeter { margin-top: 8px; }

.chip { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-size: 13px; color: var(--mut); }
.chip.mini { padding: 3px 9px; font-size: 12px; margin-left: auto; }
.chip.ok { color: var(--ok); border-color: rgba(62,207,142,.4); }
.chip.warn { color: var(--warn); border-color: rgba(245,185,66,.4); }
.chip.bad { color: var(--bad); border-color: rgba(255,93,108,.4); }
.chip.live { color: #fff; background: rgba(255,93,108,.25); border-color: rgba(255,93,108,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255,93,108,0); } 0% { box-shadow: 0 0 0 0 rgba(255,93,108,.5); } }

/* Funksiyalar menyusi (yon panel) */
.scrim { position: fixed; inset: 0; background: rgba(4,6,14,.6); backdrop-filter: blur(3px); z-index: 90; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100vw); z-index: 100; display: flex; flex-direction: column;
  background: rgba(15,19,34,.96); border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0,0,0,.5);
  transform: translateX(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); padding-top: env(safe-area-inset-top); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 17px; }
.drawer-body { overflow-y: auto; padding: 12px 14px calc(30px + env(safe-area-inset-bottom)); flex: 1; }
.acc { background: var(--card2); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 12px; overflow: hidden; }
.acc summary { list-style: none; cursor: pointer; padding: 15px 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '›'; margin-left: auto; font-size: 22px; color: var(--mut); transition: transform .2s; }
.acc[open] summary::after { transform: rotate(90deg); }
.acc-body { padding: 2px 16px 16px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(30,36,60,.96); border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px; z-index: 300; max-width: 90vw; box-shadow: 0 10px 30px rgba(0,0,0,.4); }

/* Tarmoq holati (yuqorida) */
.netwrap { position: relative; }
.netbox { display: flex; align-items: center; gap: 8px; background: var(--card2); border: 1px solid var(--line); padding: 7px 12px; border-radius: 999px; font-size: 13px; color: var(--txt); }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.bars i { width: 4px; border-radius: 1px; background: rgba(255,255,255,.2); }
.bars i:nth-child(1) { height: 4px; } .bars i:nth-child(2) { height: 7px; } .bars i:nth-child(3) { height: 10px; } .bars i:nth-child(4) { height: 14px; }
.netbox[data-q="4"] .bars i, .netbox[data-q="3"] .bars i:nth-child(-n+3) { background: var(--ok); }
.netbox[data-q="2"] .bars i:nth-child(-n+2) { background: var(--warn); }
.netbox[data-q="1"] .bars i:nth-child(1), .netbox[data-q="0"] .bars i { background: var(--bad); }
.netbox[data-q="0"] { color: var(--bad); }
.netpanel { position: absolute; right: 0; top: calc(100% + 8px); width: 270px; background: rgba(18,22,40,.98); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; z-index: 120; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.netpanel h4 { margin: 0 0 8px; font-size: 14px; }
.netpanel .row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.netpanel .row:last-child { border: 0; }
.netpanel .row span:first-child { color: var(--mut); }
.netpanel .ok { color: var(--ok); } .netpanel .warn { color: var(--warn); } .netpanel .bad { color: var(--bad); }

/* YouTube */
#ytWrap { display: none; position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
#ytWrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.stage[data-kind="youtube"] #ytWrap { display: block; }
.stage[data-kind="youtube"] #ytWrap iframe { display: block; }   /* ".stage iframe {display:none}" YouTube videosini yashirib, faqat ovoz qoldirardi */
.stage[data-kind="youtube"] .filebar { display: none; }

/* Kattalashtirish / kichiklashtirish (video, YouTube, ekran, rasm) */
.stage[data-kind="video"] .castbar, .stage[data-kind="youtube"] .castbar, .stage[data-kind="image"] .castbar { display: flex; }
.stage.fill video.pl { object-fit: cover; }
.stage.big[data-kind="video"] video.pl { max-height: 82vh; }
.stage.big[data-kind="cast"] #castVideo { max-height: 85vh; }
.stage.big[data-kind="image"] img { max-height: 85vh; }
body.big main { max-width: 1180px; }
.stage:fullscreen video.pl, .stage.pseudo-fs video.pl { width: 100%; height: 100%; max-height: none; }
.stage:fullscreen img, .stage.pseudo-fs img { width: 100%; height: 100%; max-height: none; }
.stage:fullscreen #ytWrap, .stage.pseudo-fs #ytWrap { width: 100%; height: 100%; aspect-ratio: auto; }
.stage:-webkit-full-screen video.pl { width: 100%; height: 100%; max-height: none; }
.stage:-webkit-full-screen #ytWrap { width: 100%; height: 100%; aspect-ratio: auto; }

.mini-acc { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.mini-acc summary { cursor: pointer; color: var(--mut); font-size: 13px; padding: 6px 0; }

/* Reaksiyalar va so'rovnoma */
.reactbar { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.reactbar button.sec { font-size: 22px; padding: 6px 11px; border-radius: 14px; }
#floaty { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.fe { position: absolute; bottom: -50px; font-size: 34px; animation: floatUp 3s ease-out forwards; }
@keyframes floatUp { 0% { transform: translateY(0) scale(.6); opacity: 0; } 12% { opacity: 1; transform: translateY(-8vh) scale(1); } 100% { transform: translateY(-85vh) rotate(18deg) scale(1.15); opacity: 0; } }
.popt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; margin: 7px 0; padding: 13px 14px; background: var(--card2); border: 1px solid var(--line); overflow: hidden; }
.popt i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(91,140,255,.3); transition: width .5s; }
.popt span, .popt b { position: relative; }
.popt b { color: var(--mut); font-weight: 600; font-size: 13px; }
.popt.mine { outline: 2px solid var(--pri); }

/* Viktorina */
.tabs { display: flex; gap: 6px; background: var(--card2); border: 1px solid var(--line); padding: 5px; border-radius: 16px; margin-bottom: 14px; }
.tab { flex: 1; background: none; color: var(--mut); padding: 11px; font-weight: 700; border-radius: 12px; }
.tab.on { background: linear-gradient(135deg, var(--pri), var(--pri2)); color: #fff; box-shadow: 0 6px 18px rgba(91,140,255,.35); }
textarea { width: 100%; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line); background: var(--card2); color: var(--txt); font: inherit; outline: none; resize: vertical; }
textarea:focus { border-color: var(--pri); box-shadow: 0 0 0 3px rgba(91,140,255,.2); }
.fmt { background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 12.5px; white-space: pre-wrap; color: #cdd6ff; margin: 8px 0; }
.qcard { padding: 14px; }
.qcard.warn { outline: 2px solid var(--warn); }
.qc-head { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.qc-sum { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mut); }
.qc-head button { background: var(--card2); border: 1px solid var(--line); padding: 5px 9px; border-radius: 10px; font-size: 13px; }
.qc-body { margin-top: 12px; }
.qc-img { display: block; max-width: 100%; max-height: 180px; border-radius: 12px; margin: 8px 0; }
.qopt-row { display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.qopt-row .tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 15px; flex: none; }
.qopt-row input[type=radio] { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.qc-set { display: flex; gap: 8px; margin-top: 8px; }
.qc-set select { flex: 1; }
/* ================= VIKTORINA: o'yin ekranlari (Kahoot uslubi) ================= */
:root { --q0: #e21b3c; --q1: #1368ce; --q2: #d89e00; --q3: #26890c; }
.chip.big-n { font-size: 15px; font-weight: 700; }

/* Savol matni: katta, kontrastli */
.qb { display: flex; flex-direction: column; gap: clamp(8px, 1.6vh, 16px); min-height: 0; }
.qb.fill { flex: 1; }
.qz-q { background: #fff; color: #14172b; border-radius: 18px; text-align: center; font-weight: 800; line-height: 1.2; padding: clamp(14px, 2.6vh, 30px) clamp(14px, 2.4vw, 36px);
  font-size: clamp(22px, 5.6vw, 34px); box-shadow: 0 6px 0 rgba(0,0,0,.22); word-break: break-word; }
.qz-q[data-len="m"] { font-size: clamp(21px, 5vw, 30px); }
.qz-q[data-len="l"] { font-size: clamp(19px, 4.4vw, 26px); }
.qz-q[data-len="xl"] { font-size: clamp(17px, 3.8vw, 22px); }
.qz-img { display: block; max-width: 100%; max-height: calc(30vh * var(--iz, 1)); margin: 0 auto; border-radius: 14px; object-fit: contain; }
.qb-main { position: relative; flex: 1; display: flex; flex-direction: column; gap: clamp(8px, 1.6vh, 16px); min-height: 0; }

/* Javob plitalari: ekranni to'ldiradi */
.qz-grid { flex: 1; display: grid; grid-template-columns: 1fr; grid-auto-rows: minmax(64px, 1fr); gap: clamp(8px, 1.4vw, 16px); min-height: 0; }
.qopt { position: relative; display: flex; align-items: center; gap: clamp(10px, 1.6vw, 22px); text-align: left; color: #fff; font-weight: 800; padding: clamp(12px, 2.4vh, 26px) clamp(14px, 2vw, 30px);
  border-radius: 16px; min-height: 64px; box-shadow: 0 6px 0 rgba(0,0,0,.28); transition: opacity .2s, transform .1s, filter .15s; width: 100%; }
button.qopt:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.28); }
.qopt .sh { font-size: clamp(26px, 5vw, 44px); line-height: 1; flex: none; width: 1.3em; text-align: center; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.qopt .tx { flex: 1; font-size: clamp(18px, 4.6vw, 30px); line-height: 1.2; word-break: break-word; text-shadow: 0 2px 0 rgba(0,0,0,.18); }
.qopt .tx[data-len="l"], .qopt .tx[data-len="xl"] { font-size: clamp(15px, 3.8vw, 22px); }
.qopt .cnt { font-size: clamp(22px, 4.4vw, 40px); background: rgba(0,0,0,.28); border-radius: 12px; padding: 2px 14px; min-width: 2.2em; text-align: center; flex: none; }
.qopt .mk { font-size: clamp(26px, 4.6vw, 44px); flex: none; }
.qopt.dim { opacity: .35; filter: saturate(.6); }
.qopt.good { outline: 5px solid #fff; box-shadow: 0 0 36px rgba(255,255,255,.5), 0 6px 0 rgba(0,0,0,.28); z-index: 1; }
.qopt.mine { outline: 4px dashed #fff; outline-offset: -4px; }
.qz-grid.locked .qopt { opacity: .5; pointer-events: none; }
.qz-grid.locked .qopt.mine { opacity: 1; }
@media (min-width: 640px) { .qz-grid { grid-template-columns: 1fr 1fr; } .qz-grid.n3 .qopt:last-child { grid-column: 1 / -1; } .qz-grid.n2 { grid-template-columns: 1fr 1fr; } }

/* Taymer */
.qz-timer { height: 12px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; flex: none; }
.qz-timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--ok), var(--warn), var(--bad)); transition: width .1s linear; }
.qz-time { text-align: center; font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; min-height: 38px; }
.qz-time.low, .qz-clock b.low { color: var(--bad); animation: tick 1s infinite; }
@keyframes tick { 50% { transform: scale(1.12); } }
.qz-count { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; border-radius: 18px; background: rgba(11,14,26,.8); font-weight: 900;
  font-size: clamp(90px, 26vw, 220px); line-height: 1; background-clip: padding-box; color: #fff; text-shadow: 0 0 40px rgba(138,91,255,.8); overflow: hidden; }
@keyframes pop { 0% { transform: scale(.8); opacity: .3; } 30% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); } }
.qz-count[hidden] { display: none; }

/* Natija / reyting */
.lb { list-style: none; margin: 10px 0; padding: 0; }
.lb li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card2); margin: 8px 0; font-weight: 700; font-size: clamp(16px, 3.6vw, 22px); }
.lb li .rk { width: 1.8em; text-align: center; }
.lb li .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb li .pt { color: var(--cy); font-variant-numeric: tabular-nums; }
.lb li .dl { color: var(--ok); font-size: .7em; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: clamp(8px, 2vw, 22px); margin: 22px 0; }
.podium div { flex: 1; max-width: 220px; text-align: center; border-radius: 16px 16px 0 0; padding: 12px 6px; font-weight: 800; font-size: clamp(28px, 6vw, 56px); color: #14172b; }
.podium .p1 { background: linear-gradient(#ffd54a, #d9a21b); height: clamp(170px, 30vh, 300px); }
.podium .p2 { background: linear-gradient(#e3e8f4, #9aa4bb); height: clamp(130px, 22vh, 230px); }
.podium .p3 { background: linear-gradient(#e6a06a, #a8622f); height: clamp(100px, 16vh, 170px); }
.podium small { display: block; font-weight: 700; font-size: clamp(14px, 2.4vw, 24px); }

/* ---- Transmitter: to'liq ekranli o'yin paneli (proyektor / katta ekran) ---- */
.qzgame { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; z-index: 125; display: flex; flex-direction: column; color: #fff; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  overflow: hidden; border: 0; border-radius: 0; box-shadow: none;
  background: radial-gradient(70% 55% at 15% 0%, rgba(138,91,255,.5), transparent 70%), radial-gradient(60% 55% at 100% 100%, rgba(54,214,255,.28), transparent 70%), #0b0e1a; }
.qzgame:fullscreen { inset: 0; width: 100%; height: 100%; max-width: none; transform: none; border: 0; border-radius: 0; box-shadow: none; }
.qg-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: clamp(10px, 2vh, 20px) clamp(12px, 2.4vw, 32px); }
.qg-stat { display: flex; align-items: baseline; gap: 10px; background: rgba(255,255,255,.1); border: 1px solid var(--line); border-radius: 18px; padding: 8px 20px; }
.qg-stat .k { font-size: clamp(24px, 3vw, 38px); }
.qg-stat b { font-size: clamp(34px, 5vw, 64px); line-height: 1; font-variant-numeric: tabular-nums; }
.qg-stat small { color: var(--mut); font-size: clamp(12px, 1.4vw, 16px); }
.qg-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.qg-mid b { font-size: clamp(16px, 2.4vw, 26px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.qg-fs { background: rgba(255,255,255,.1); border: 1px solid var(--line); width: 52px; height: 52px; padding: 0; font-size: 24px; border-radius: 14px; }
.qg-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: clamp(8px, 1.6vh, 16px); padding: 0 clamp(12px, 2.4vw, 32px) clamp(8px, 1.6vh, 16px); overflow-y: auto; }
.qg-body.ph-lobby { overflow-y: auto; }
.qg-body.ph-question .qz-q, .qg-body.ph-reveal .qz-q { font-size: clamp(24px, 4.6vw, 64px); }
.qg-body.ph-question .qz-q[data-len="m"], .qg-body.ph-reveal .qz-q[data-len="m"] { font-size: clamp(22px, 3.9vw, 52px); }
.qg-body.ph-question .qz-q[data-len="l"], .qg-body.ph-reveal .qz-q[data-len="l"] { font-size: clamp(20px, 3.2vw, 42px); }
.qg-body.ph-question .qz-q[data-len="xl"], .qg-body.ph-reveal .qz-q[data-len="xl"] { font-size: clamp(18px, 2.6vw, 34px); }
.qg-body .qopt .tx { font-size: clamp(20px, 3.4vw, 52px); }
.qg-body .qopt .tx[data-len="l"] { font-size: clamp(18px, 2.7vw, 40px); }
.qg-body .qopt .tx[data-len="xl"] { font-size: clamp(16px, 2.2vw, 30px); }
.qg-body .qopt .sh { font-size: clamp(30px, 5vw, 72px); }
.qg-body .qopt .cnt { font-size: clamp(26px, 4.4vw, 64px); }
.qg-body.pre .qg-midrow, .qg-body.pre .qz-grid { visibility: hidden; }
.qg-midrow { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; flex: none; min-height: 90px; }
.qz-clock { width: clamp(72px, 11vw, 130px); height: clamp(72px, 11vw, 130px); border-radius: 50%; background: #7a3df0; display: grid; place-items: center; box-shadow: 0 6px 0 rgba(0,0,0,.28); }
.qz-clock b { font-size: clamp(32px, 5.4vw, 72px); font-weight: 900; font-variant-numeric: tabular-nums; }
.qg-imgbox { display: flex; justify-content: center; min-width: 0; }
.qg-imgbox .qz-img { max-height: calc(clamp(110px, 26vh, 300px) * var(--iz, 1)); }
.qg-ans { text-align: center; background: rgba(255,255,255,.1); border: 1px solid var(--line); border-radius: 18px; padding: 8px 22px; min-width: 100px; }
.qg-ans b { display: block; font-size: clamp(32px, 5.4vw, 72px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.qg-ans small { color: var(--mut); font-size: clamp(12px, 1.4vw, 16px); }
.qg-body.ph-reveal { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); align-items: stretch; }
.qg-body.ph-reveal .qg-side { overflow-y: auto; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 18px; padding: 8px 16px; }
.qg-side h2 { font-size: clamp(18px, 2.4vw, 30px); margin: 10px 0 0; }
@media (max-width: 820px) { .qg-body.ph-reveal { display: flex; } .qg-midrow { grid-template-columns: auto 1fr auto; gap: 8px; } }
.qg-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); background: rgba(0,0,0,.3); }
.qg-bar button { min-width: 140px; font-size: 16px; padding: 14px 22px; }
.qg-bar .primary { font-size: 18px; padding: 14px 34px; }
.qg-final { text-align: center; font-size: clamp(28px, 5vw, 56px); margin: 6px 0; }
.ph-final .lb { max-width: 760px; width: 100%; margin: 10px auto; }

/* Kutish zali (host) */
.qg-lobby { flex: 1 0 auto; min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(14px, 3vw, 40px); align-items: center; }
.qg-join { position: relative; z-index: 1; width: 100%; min-width: 0; background: #fff; color: #14172b; border-radius: 24px; padding: clamp(16px, 3vh, 34px); text-align: center; box-shadow: 0 8px 0 rgba(0,0,0,.25); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.qg-join small { color: #5a6280; font-weight: 600; font-size: clamp(13px, 1.5vw, 18px); }
.qg-url { font-weight: 800; font-size: clamp(16px, 2.2vw, 28px); word-break: break-all; }
.qg-code { max-width: 100%; font-size: clamp(36px, min(6.5vw, 10vh), 82px); font-weight: 900; letter-spacing: .04em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qg-qr { background: #fff; border-radius: 12px; margin-top: 8px; width: clamp(120px, 18vh, 200px); height: auto; }
.qg-who { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.qg-bigcount { font-size: clamp(70px, 14vw, 190px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; background: linear-gradient(90deg, var(--cy), var(--pri2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qg-who small { color: var(--mut); font-size: clamp(14px, 2vw, 24px); }
.qg-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-height: 38vh; overflow-y: auto; width: 100%; padding: 4px; }
.qg-chip { background: rgba(255,255,255,.12); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-weight: 700; font-size: clamp(14px, 1.8vw, 22px); animation: chipin .3s ease-out; }
@keyframes chipin { from { transform: scale(.6); opacity: 0; } }
@media (max-width: 820px) { .qg-lobby { grid-template-columns: minmax(0, 1fr); align-content: start; } .qg-body { overflow-y: auto; } }
/* ---- Receiver: o'yinchi ekrani ---- */
.quizplay { position: fixed; inset: 0; z-index: 130; display: flex; flex-direction: column; overflow-y: auto; padding: calc(10px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom));
  background: radial-gradient(70% 50% at 20% 0%, rgba(138,91,255,.45), transparent 70%), radial-gradient(60% 50% at 100% 100%, rgba(54,214,255,.25), transparent 70%), #0b0e1a; }
.qp-top { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 900px; margin: 0 auto 10px; flex: none; }
.qp-top span:first-child { flex: 1; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qp-top .chip { font-weight: 700; color: var(--txt); }
.qp-top .chip.ok { color: var(--ok); }
.qp-body { flex: 1; width: 100%; max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.qp-body.ph-question { overflow-y: auto; }
.qp-body .qz-grid { grid-auto-rows: minmax(60px, 1fr); }
.qp-body.ph-reveal .qz-grid, .qp-body.ph-final .qz-grid { grid-auto-rows: minmax(64px, auto); flex: none; }
.qp-body.ph-reveal .qb-main { flex: none; }
.qp-body.ph-reveal .qz-q { font-size: clamp(17px, 4vw, 24px); }
.qp-wait { text-align: center; color: var(--mut); margin: 0; flex: none; }
.qp-big { text-align: center; padding: 30px 14px; }
.qp-big .em { font-size: 64px; }
.qp-big h2 { font-size: 28px; margin: 10px 0; }
.qp-big input { text-align: center; font-size: 20px; margin-top: 8px; }
.qp-n { margin-top: 14px; font-size: 22px; font-weight: 800; }
.qp-banner { text-align: center; border-radius: 20px; padding: 20px; margin: 4px 0; font-size: clamp(24px, 6vw, 34px); font-weight: 900; flex: none; }
.qp-banner.ok { background: linear-gradient(135deg, #1f9d63, #3ecf8e); color: #04210f; }
.qp-banner.no { background: linear-gradient(135deg, #b8283a, #ff5d6c); color: #fff; }
.qp-banner.none { background: var(--card2); }
.qp-banner small { display: block; font-size: 16px; font-weight: 700; margin-top: 4px; }

/* Qo'shimcha: katta ekranlarda xona kodi va tezlik */
.room-code .code { font-size: clamp(40px, 9vw, 58px); }
.stage video, .stage img { content-visibility: auto; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 420px) { .top { padding: 10px; } .logo { font-size: 17px; } .fn-btn { padding: 8px 11px; } }

/* tuzatishlar: javob matni siqilmasin, o'yinchi natija ekrani ustma-ust tushmasin */
.qopt .tx { min-width: 0; overflow-wrap: anywhere; }
.qg-body.ph-reveal .qz-grid { grid-template-columns: 1fr; }
.qg-body.ph-reveal .qb { min-width: 0; }
.qg-body.ph-reveal .qz-q { flex: none; }
.qp-body:not(.ph-question) { min-height: min-content; }
.qp-body:not(.ph-question) > * { flex-shrink: 0; }
.qp-body:not(.ph-question) .qb { flex-shrink: 0; }

/* uzun matn: plitalar kontentga qarab o'sadi, shrift ekran balandligiga ham bog'liq */
.qz-grid { grid-auto-rows: 1fr; min-height: min-content; }
.qb-main { min-height: min-content; }
.qg-body .qz-q[data-len="l"] { font-size: clamp(18px, min(3.2vw, 5vh), 42px) !important; }
.qg-body .qz-q[data-len="xl"] { font-size: clamp(16px, min(2.6vw, 4vh), 34px) !important; }
.qg-body .qopt .tx { font-size: clamp(18px, min(3.4vw, 6vh), 52px); }
.qg-body .qopt .tx[data-len="m"] { font-size: clamp(17px, min(2.9vw, 5vh), 42px); }
.qg-body .qopt .tx[data-len="l"] { font-size: clamp(15px, min(2.4vw, 4vh), 34px); }
.qg-body .qopt .tx[data-len="xl"] { font-size: clamp(14px, min(2vw, 3.4vh), 26px); }
.qg-body.ph-reveal .qz-q { font-size: clamp(18px, min(2.8vw, 4.4vh), 44px) !important; }
.qg-body .qz-img { max-height: calc(clamp(80px, 20vh, 260px) * var(--iz, 1)); }

/* ---- viktorina: variantlar yashirilgan rejim, himoya, konfetti ---- */
.qz-grid.blind .qopt { justify-content: center; }
.qz-grid.blind .qopt .tx { display: none; }
.qz-grid.blind .qopt .sh { font-size: clamp(44px, 12vw, 84px); width: auto; }
.qp-hint { text-align: center; opacity: .8; margin: 6px 0 0; font-size: 15px; }
button.sec.on { outline: 2px solid var(--ok, #26890c); }
.qg-bar { flex-wrap: wrap; }
button.chip { border: 0; cursor: pointer; color: inherit; font: inherit; }

.quizplay.guard { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.quizplay.guard img { pointer-events: none; -webkit-user-drag: none; user-drag: none; }
.quizplay.guard input, .quizplay.guard textarea { -webkit-user-select: text; user-select: text; }
.quizplay.guard::after { content: ""; position: fixed; inset: 0; background-image: var(--wm); background-size: 240px 150px; pointer-events: none; z-index: 5; }
.qshield { position: fixed; inset: 0; z-index: 99999; background: #0b0d1a; color: #fff; display: grid; place-content: center; text-align: center; gap: 8px; }
.qshield .em { font-size: 56px; }
@media print { #quizPlay, .quizplay { display: none !important; } body::before { content: "Chop etish taqiqlangan"; display: block; font-size: 24px; } }

.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 9999; }
.confetti i { position: absolute; top: -14px; width: 10px; height: 16px; border-radius: 2px; opacity: 0; animation: cfall linear forwards; will-change: transform; }
@keyframes cfall { 0% { transform: translate3d(0,0,0) rotate(0); opacity: 1; } 100% { transform: translate3d(var(--dx), 105vh, 0) rotate(720deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
.qg-btns { display: flex; gap: 8px; }

/* ---- bekor qilish tugmalari ---- */
.cancelbtn { border: 1px solid var(--bad, #e21b3c); color: var(--bad, #ff6b81); background: transparent; cursor: pointer; font: inherit; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.up { position: relative; }
.up-x { background: rgba(255,255,255,.1); border: 1px solid var(--line); color: inherit; border-radius: 10px; width: 34px; height: 34px; padding: 0; flex: none; cursor: pointer; }
.doccard .sec { margin-top: 12px; }

/* ---- avatarlar ---- */
.qp-avt { margin: 12px 0 6px; font-weight: 700; opacity: .85; text-align: center; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; max-height: 34vh; overflow-y: auto; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.05); -webkit-overflow-scrolling: touch; }
.av-grid .av { font-size: 26px; line-height: 1; padding: 8px 0; border-radius: 12px; border: 2px solid transparent; background: rgba(255,255,255,.07); cursor: pointer; }
.av-grid .av.on { border-color: #fff; background: rgba(255,255,255,.22); transform: scale(1.08); }
.av-chip { font-size: 20px; padding: 2px 10px; }
.lb .av { font-size: 1.3em; flex: none; }
.qg-chip { white-space: nowrap; }
.qz-q.hidq { font-size: clamp(18px, 4vw, 26px); background: #2b2f4d; color: #fff; }

/* ---- final marosimi: medallar ---- */
.cer { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2vh, 22px); width: 100%; padding: 6px 0 14px; }
.cer-row { display: flex; align-items: flex-end; justify-content: center; gap: clamp(8px, 2vw, 28px); width: 100%; }
.cer-rest { display: flex; justify-content: center; gap: clamp(8px, 2vw, 20px); flex-wrap: wrap; }
.cer-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; flex: 1 1 0; max-width: 220px;
  opacity: 0; transform: translateY(46px) scale(.55); animation: cerIn .9s cubic-bezier(.2, 1.5, .4, 1) var(--d, 0s) forwards; }
.cer-card.mini { flex: 0 0 auto; width: clamp(120px, 28vw, 180px); background: rgba(255,255,255,.08); border-radius: 18px; padding: 10px 8px; }
.cer-av { font-size: clamp(34px, 8vw, 64px); line-height: 1.1; }
.cer-card.h1 .cer-av { font-size: clamp(46px, 11vw, 92px); }
.cer-crown { height: 1.2em; font-size: clamp(22px, 5vw, 40px); animation: crownBob 1.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.cer-medal { font-size: clamp(34px, 7vw, 58px); line-height: 1; margin: 2px 0; opacity: 0; animation: medalDrop .9s cubic-bezier(.3, 1.6, .5, 1) calc(var(--d, 0s) + .35s) forwards; filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.cer-card.h1 .cer-medal { font-size: clamp(46px, 9vw, 78px); }
.cer-nm { font-weight: 800; font-size: clamp(14px, 3.2vw, 24px); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cer-pt { font-size: clamp(12px, 2.6vw, 18px); opacity: .85; margin-bottom: 6px; }
.cer-blk { width: 100%; display: grid; place-items: center; font-weight: 900; font-size: clamp(22px, 5vw, 40px); color: rgba(0,0,0,.55); border-radius: 14px 14px 0 0; }
.cer-card.h1 .cer-blk { height: clamp(90px, 18vh, 170px); background: linear-gradient(#ffe066, #f2b705); }
.cer-card.h2 .cer-blk { height: clamp(64px, 12vh, 120px); background: linear-gradient(#e6ebf2, #aeb8c6); }
.cer-card.h3 .cer-blk { height: clamp(44px, 8vh, 84px); background: linear-gradient(#f0b27a, #b9722f); }
.cer-card.gold .cer-av { filter: drop-shadow(0 0 18px rgba(255, 210, 60, .9)); animation: glow 1.8s ease-in-out infinite; animation-delay: var(--d, 0s); }
.cer-card.gold::before { content: ""; position: absolute; top: 8%; left: 50%; width: 150%; aspect-ratio: 1; transform: translateX(-50%); z-index: -1; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 90, .26) 0 10deg, transparent 10deg 20deg); border-radius: 50%; -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%); mask: radial-gradient(circle, #000 25%, transparent 70%);
  animation: raysIn .6s ease var(--d, 0s) forwards, spin 14s linear var(--d, 0s) infinite; }
@keyframes cerIn { to { opacity: 1; transform: none; } }
@keyframes medalDrop { 0% { opacity: 0; transform: translateY(-90px) rotate(-40deg) scale(.2); } 70% { opacity: 1; transform: translateY(6px) rotate(8deg) scale(1.15); } 100% { opacity: 1; transform: none; } }
@keyframes crownBob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-6px) rotate(6deg); } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 210, 60, .6)); } 50% { filter: drop-shadow(0 0 26px rgba(255, 230, 120, 1)); } }
@keyframes raysIn { to { opacity: 1; } }
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }

/* ---- g'olibga to'liq ekranli tabrik (receiver) ---- */
.qwin { position: fixed; inset: 0; z-index: 9998; display: grid; place-items: center; background: rgba(8, 10, 26, .82); padding: 18px; animation: fadeIn .3s ease; }
.qwin-card { position: relative; width: min(92vw, 420px); text-align: center; padding: 26px 18px 22px; border-radius: 26px; background: linear-gradient(160deg, #3b2f7a, #1d1b45); color: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.5); overflow: hidden; animation: popIn .7s cubic-bezier(.2, 1.5, .4, 1); }
.qwin-card.gold { background: linear-gradient(160deg, #8a6a00, #3a2a00 70%); }
.qwin-card.silver { background: linear-gradient(160deg, #6c7a8c, #2a313c 70%); }
.qwin-card.bronze { background: linear-gradient(160deg, #94571f, #3a210c 70%); }
.qwin-rays { position: absolute; top: -40%; left: 50%; width: 140%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; z-index: 0; pointer-events: none;
  background: repeating-conic-gradient(rgba(255,255,255,.12) 0 10deg, transparent 10deg 20deg); animation: spin 16s linear infinite; -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); }
.qwin-card > * { position: relative; z-index: 1; }
.qwin-card .qwin-rays { position: absolute; }
.qwin-medal { font-size: 92px; line-height: 1; animation: medalDrop 1s cubic-bezier(.3, 1.6, .5, 1) .2s both; filter: drop-shadow(0 6px 12px rgba(0,0,0,.4)); }
.qwin-card h2 { margin: 6px 0; font-size: 30px; }
.qwin-av { font-size: 64px; animation: crownBob 1.6s ease-in-out infinite; }
.qwin-nm { font-weight: 800; font-size: 22px; }
.qwin-card p { margin: 6px 0 2px; font-size: 20px; }
.qwin-card small { display: block; opacity: .8; margin-bottom: 14px; }
@keyframes popIn { 0% { transform: scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .cer-card, .cer-medal { animation: none; opacity: 1; transform: none; }
  .cer-crown, .cer-card.gold .cer-av, .cer-card.gold::before, .qwin-rays, .qwin-av, .qwin-medal, .qwin-card { animation: none; }
}

/* ---- import: oldindan ko'rish oynasi ---- */
.qz-prev { position: fixed; inset: 0; z-index: 9990; background: rgba(8, 10, 26, .75); display: grid; place-items: center; padding: 14px; }
.qz-prev-card { width: min(96vw, 680px); max-height: 90vh; display: flex; flex-direction: column; gap: 10px; background: var(--card, #1b1f3a); color: var(--txt, #fff); border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 20px; padding: 18px; }
.qz-prev-card h3 { margin: 0; }
.qz-prev-info { font-size: 14px; }
.qz-prev-w { color: #ffd166; font-weight: 700; margin-bottom: 4px; }
.qz-prev-list { overflow-y: auto; flex: 1; min-height: 120px; display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }
.qz-prev-row { position: relative; padding: 10px 40px 10px 12px; background: rgba(255,255,255,.06); border-radius: 12px; border-left: 4px solid #26890c; }
.qz-prev-row.warn { border-left-color: #ffd166; }
.qz-prev-o { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 13px; }
.qz-prev-o .o { padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,.08); }
.qz-prev-o .o.ok { background: #26890c; color: #fff; font-weight: 700; }
.qz-prev-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; padding: 0; border-radius: 8px; background: rgba(255,255,255,.1); border: 0; color: inherit; cursor: pointer; }
#qzEditor.dz { outline: 3px dashed var(--ok, #26890c); outline-offset: 4px; }

button.sec.act { background: #1f7a3a; border-color: #2fb35a; color: #fff; }
.cer-nm { margin-top: 4px; }

/* 🤝 Do'st bilan do'st (AI) */
.ai-box { margin: 10px 0 14px; padding: 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(236,72,153,.12)); }
.ai-box h3 { margin: 0 0 6px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.ai-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.ai-row input { flex: 1 1 220px; min-width: 0; }
.ai-row select { flex: 0 0 auto; }
.ai-box .primary.wide { margin-top: 8px; }

/* AI Quiz: sozlamalar maydonlari va savollar soni */
.ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.ai-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ai-f > span, .ai-cnt > .lbl { font-size: 12px; font-weight: 700; color: var(--mut); letter-spacing: .02em; }
.ai-f select, .ai-f input { width: 100%; }
.ai-cnt { margin: 12px 0 4px; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.12); }
.ai-cnt .lbl { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ai-cnt .lbl em { font-style: normal; font-weight: 500; opacity: .75; }
.ai-step { display: flex; align-items: stretch; gap: 8px; }
.ai-step button { flex: 0 0 52px; font-size: 26px; font-weight: 700; line-height: 1; padding: 0; border-radius: 12px; }
.ai-step input { flex: 1 1 auto; min-width: 0; text-align: center; font-size: 30px; font-weight: 800; padding: 6px 4px; border-radius: 12px; -moz-appearance: textfield; appearance: textfield; }
.ai-step input::-webkit-outer-spin-button, .ai-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ai-chips button { flex: 1 1 0; min-width: 44px; padding: 8px 0; border-radius: 999px; font-weight: 700; font-size: 14px; background: rgba(255,255,255,.08); color: var(--txt, #fff); border: 1px solid rgba(255,255,255,.14); }
.ai-chips button.on { background: linear-gradient(135deg, var(--pri), var(--pri2)); color: #fff; border-color: transparent; }
.ai-total { margin: 8px 0 0; font-size: 12px; opacity: .8; text-align: center; }

@media (max-width: 440px) { .tab { font-size: 12.5px; padding: 10px 2px; } }
.ai-ready { margin: 6px 0 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--ok, #26c281); }
/* Mikrofon bo'limi */
.mic-card { text-align: center; }
.mic-big { display: block; width: 100%; margin: 14px 0 10px; padding: 22px 14px; font-size: 20px; font-weight: 800; border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--pri), var(--pri2)); box-shadow: 0 10px 28px rgba(91,140,255,.35); }
.mic-big.live { background: linear-gradient(135deg, #ef4444, #f97316); box-shadow: 0 10px 28px rgba(239,68,68,.45); animation: micpulse 1.6s ease-in-out infinite; }
@keyframes micpulse { 50% { box-shadow: 0 10px 40px rgba(239,68,68,.75); } }
.mic-live { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 700; color: #ff8a80; }
.mic-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: micpulse 1s infinite; }
.mic-card #micBox { text-align: left; margin: 8px 0; }
.mic-card progress { width: 100%; height: 12px; }
.mic-stat { display: flex; justify-content: space-around; gap: 8px; margin: 8px 0; font-size: 14px; }
.mic-card .sw { text-align: left; }

#nameIn.need { border-color: var(--bad, #e21b3c) !important; box-shadow: 0 0 0 3px rgba(226,27,60,.28); }
.up-x:hover { background: rgba(226,27,60,.25); }

/* Qat'iy rejim: to'liq ekran qulfi */
.sgate { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(circle at 50% 30%, #1b2140, #070914); text-align: center; -webkit-user-select: none; user-select: none; }
.sgate[hidden] { display: none; }
.sgate-box { max-width: 460px; width: 100%; }
.sgate-box .em { font-size: 64px; margin-bottom: 8px; }
.sgate-box h2 { margin: 0 0 10px; font-size: 24px; }
.sgate-box .sg-t { opacity: .85; line-height: 1.5; margin: 0 0 12px; }
.sgate-box .sg-w { color: #ffb74d; font-weight: 800; margin: 0 0 16px; min-height: 1em; }
body.sg-lock { overflow: hidden; }
.qg-cheat { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 12px; margin: 6px 0; border-radius: 12px; background: rgba(255,160,0,.14); border: 1px solid rgba(255,160,0,.4); font-size: 13px; }
.qg-cheat .cheat.dq { color: #ff8a80; text-decoration: line-through; }
.qz-prev-im { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.qz-prev-th { height: 44px; max-width: 80px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); }
.qz-prev-ib { padding: 4px 10px; font-size: 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: inherit; }

/* ===== O'yin paneli: yon sozlamalar menyusi (chat tugmasi kabi) ===== */
.qg-fab { position: fixed; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 130; width: 58px; height: 58px; min-width: 0; padding: 0; border-radius: 50%; font-size: 28px; line-height: 1; color: #fff; background: linear-gradient(135deg, var(--pri), var(--pri2)); box-shadow: 0 10px 28px rgba(0,0,0,.45); transition: transform .2s; }
.qzgame .qg-fab, .qzgame .qg-menu { position: absolute; }
.qzgame::before { position: absolute; border-radius: inherit; }
.qg-fab:hover { transform: scale(1.06); } .qg-fab.on { transform: rotate(60deg); }
.qg-fab-dot { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: #2ecc71; border: 2px solid #1b2140; }
.qg-menu { position: fixed; right: 16px; bottom: calc(162px + env(safe-area-inset-bottom)); z-index: 131; width: min(92vw, 340px); max-height: min(68vh, 520px); display: flex; flex-direction: column; border-radius: 18px; background: rgba(22,27,52,.97); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 18px 48px rgba(0,0,0,.55); transform: translateY(16px) scale(.97); transform-origin: bottom right; opacity: 0; visibility: hidden; pointer-events: none; transition: transform .22s ease, opacity .2s ease, visibility 0s .22s; }
.qg-menu.open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition: transform .22s ease, opacity .2s ease; }
.qg-menu-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.qg-menu-x { width: 34px; height: 34px; min-width: 0; padding: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 16px; }
.qg-menu-b { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; overflow-y: auto; }
.qg-menu-b small { margin-top: 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
.qg-menu-b button { width: 100%; min-width: 0; text-align: left; font-size: 15px; padding: 11px 14px; border-radius: 12px; }
/* ===== Savollar to'plami ===== */
.bank summary { cursor: pointer; font-weight: 800; font-size: 18px; }
.bank textarea { width: 100%; box-sizing: border-box; margin: 8px 0; }
.bank-tools { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.bank-mix { display: flex; gap: 8px; } .bank-mix input { width: 80px; text-align: center; } .bank-mix button { flex: 1; }
.bank-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; max-height: 360px; overflow-y: auto; }
.bank-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.bank-item input[type=checkbox] { width: 20px; height: 20px; flex: 0 0 auto; }
.bank-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; } .bank-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bank-info small { opacity: .65; }
.bank-acts { display: flex; gap: 4px; flex: 0 0 auto; } .bank-acts button { padding: 6px 10px; min-width: 0; border-radius: 10px; }


/* ---------- CHAT (suzuvchi: tugma yoki sarlavhadan ushlab, ekranning istalgan joyiga surish mumkin) ---------- */
.chat { position: fixed; left: 14px; top: calc(100vh - 66px); top: calc(100dvh - 66px); width: 52px; height: 52px; z-index: 140; touch-action: none; }
.chat.dragging, .chat.dragging * { user-select: none; -webkit-user-select: none; }
.chat.dragging .chat-fab { cursor: grabbing; transform: scale(1.08); }
.chat-fab { cursor: grab; touch-action: none; }
.chat-head { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.chat-grip { color: var(--mut); font-size: 14px; letter-spacing: -2px; margin-right: -2px; }
.chat-panel { position: absolute; left: 0; bottom: 62px; }
.chat.up .chat-panel { bottom: auto; top: 62px; }
.chat.right .chat-panel { left: auto; right: 0; }
.chat-fab { position: absolute; left: 0; top: 0; width: 52px; height: 52px; min-width: 0; padding: 0; border-radius: 50%; font-size: 24px; line-height: 1; color: #fff; border: 1px solid rgba(255,255,255,.18); background: linear-gradient(135deg, var(--pri), var(--pri2)); box-shadow: 0 8px 24px rgba(0,0,0,.45); cursor: pointer; transition: transform .15s; }
.chat-fab:active { transform: scale(.93); }
.chat.has-new .chat-fab { animation: chatPulse 1.2s ease 2; }
@keyframes chatPulse { 0%,100% { box-shadow: 0 8px 24px rgba(0,0,0,.45); } 50% { box-shadow: 0 0 0 8px rgba(91,140,255,.35), 0 8px 24px rgba(0,0,0,.45); } }
.chat-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; }
.chat-panel { width: min(92vw, 340px); height: min(62vh, 440px); display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: rgba(18,22,42,.97); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 18px 48px rgba(0,0,0,.55); color: var(--txt); }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 15px; }
.chat-online { color: var(--mut); font-size: 12px; margin-right: auto; }
.chat-x { background: transparent; color: var(--mut); border: 0; font-size: 16px; padding: 4px 8px; cursor: pointer; min-width: 0; }
.chat-cfg { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 0; }
.chat-chip { min-width: 0; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--txt); background: var(--card2); border: 1px solid var(--line); cursor: pointer; }
.chat-chip.on { background: rgba(62,207,142,.18); border-color: rgba(62,207,142,.5); color: #b9f5d9; }
.chat-chip.off { background: rgba(255,93,108,.15); border-color: rgba(255,93,108,.45); color: #ffc2c8; }
.chat-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.chat-empty { margin: auto; color: var(--mut); font-size: 13px; text-align: center; }
.chat-msg { max-width: 88%; align-self: flex-start; padding: 7px 10px; border-radius: 14px 14px 14px 4px; background: var(--card2); border: 1px solid var(--line); word-break: break-word; overflow-wrap: anywhere; }
.chat-msg.me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: rgba(91,140,255,.22); border-color: rgba(91,140,255,.4); }
.chat-msg.host { border-color: rgba(245,185,66,.55); background: rgba(245,185,66,.12); }
.chat-who { font-size: 12px; font-weight: 800; color: var(--cy); margin-bottom: 2px; display: flex; gap: 6px; align-items: baseline; }
.chat-msg.me .chat-who { color: #cfe0ff; }
.chat-msg.host .chat-who { color: var(--warn); }
.chat-time { font-weight: 400; color: var(--mut); font-size: 11px; }
.chat-txt { font-size: 14px; line-height: 1.35; white-space: pre-wrap; }
.chat-note { padding: 6px 12px; font-size: 12px; color: var(--warn); background: rgba(245,185,66,.1); border-top: 1px solid var(--line); }
.chat-form { display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--txt); font-size: 16px; outline: none; }
.chat-form input:focus { border-color: var(--pri); }
.chat-form input:disabled { opacity: .5; }
.chat-send { min-width: 0; width: 44px; border-radius: 12px; border: 0; color: #fff; font-size: 18px; cursor: pointer; background: linear-gradient(135deg, var(--pri), var(--pri2)); }
.chat-send:disabled { opacity: .45; cursor: not-allowed; }
/* Chat tugmasi viktorina javoblarini yopib qo'ymasligi uchun pastdan joy qoldiriladi */
body.chat-on .quizplay { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
/* Diskvalifikatsiya qilingan o'yinchi ham chatni ko'ra olsin */
body.sg-dq .chat { z-index: 100001; }
@media (max-width: 480px) { .chat-panel { height: min(58vh, 420px); } }

/* AI xizmati tanlovi (Gemini / Groq) */
.ai-prov-row { display: flex; gap: 8px; margin-top: 6px; }
.ai-pv { position: relative; flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); cursor: pointer; }
.ai-pv input { position: absolute; opacity: 0; pointer-events: none; }
.ai-pv small { color: var(--mut); font-size: 12px; }
.ai-pv:has(input:checked) { border-color: var(--pri); background: rgba(91,140,255,.18); }
.ai-pv:has(input:focus-visible) { outline: 2px solid var(--pri); outline-offset: 2px; }
.ai-pv.na { opacity: .45; }

/* Top 3 asosiy, qolganlar "qolgan o'rinlar" ro'yxatida */
.rest-h { margin: 18px auto 0; max-width: 760px; width: 100%; font-size: clamp(15px, 2.2vw, 20px); color: var(--mut); text-align: left; }
.rest-box { max-width: 760px; width: 100%; margin: 0 auto; max-height: 38vh; overflow-y: auto; }
.rest-box .lb { margin: 6px 0; }

/* v12: viktorina sozlamalari (Kahoot rejimi, Transmitter o'yinchi, vaqt/son) */
.qz-opts { margin: 10px 0 4px; }
.qz-inline { display: flex; gap: 8px; align-items: stretch; }
.qz-inline input { flex: 1 1 auto; min-width: 0; }
.qz-inline button { flex: 0 0 auto; white-space: nowrap; }
.qc-set .qc-time { display: inline-flex; align-items: center; gap: 6px; }
.qc-set .qc-time input { width: 84px; }
.qg-me { margin: 0 0 10px; }
.qg-menu-b button[disabled] { opacity: .5; }

/* v13: 🎰 Luck o'yini */
.luck { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 35%, #2b1c5c 0%, #120d2e 55%, #080616 100%); color: #fff; overflow: hidden; }
.luck[hidden] { display: none; }
.luck-top { width: 100%; max-width: 760px; display: flex; align-items: center; gap: 10px; font-size: 20px; }
.luck-top b { flex: 1; }
.luck-top .chip { cursor: pointer; }
.luck-stage { flex: 1 1 auto; min-height: 0; width: 100%; display: grid; place-items: center; }
.luck-wrap { position: relative; padding: 14px; border-radius: 50%; background: conic-gradient(from 0deg, #ffd54a, #ff7a59, #ff4fa3, #7a5cff, #2fd0ff, #ffd54a); box-shadow: 0 0 60px rgba(255,200,80,.35), 0 12px 40px rgba(0,0,0,.6); }
.luck-wrap canvas { display: block; border-radius: 50%; background: #1a1438; }
.luck-wrap.done { animation: luckglow 1.1s ease-in-out infinite alternate; }
@keyframes luckglow { from { box-shadow: 0 0 40px rgba(255,200,80,.4), 0 12px 40px rgba(0,0,0,.6); } to { box-shadow: 0 0 110px rgba(255,220,100,.95), 0 12px 40px rgba(0,0,0,.6); } }
.luck-ptr { position: absolute; top: -4px; left: 50%; width: 0; height: 0; z-index: 2; transform: translateX(-50%); transform-origin: 50% 0; transition: transform .07s ease-out;
  border-left: 17px solid transparent; border-right: 17px solid transparent; border-top: 38px solid #fff; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
.luck-ptr.hit { transform: translateX(-50%) rotate(-17deg); }
.luck-hub { position: absolute; left: 50%; top: 50%; width: 15%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; font-size: clamp(18px, 4vw, 32px);
  background: radial-gradient(circle at 35% 30%, #fff, #cfc6ff); box-shadow: 0 4px 14px rgba(0,0,0,.5); z-index: 1; }
.luck-res { text-align: center; padding: 12px 22px; border-radius: 22px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); animation: luckpop .55s cubic-bezier(.2,1.5,.4,1); max-width: 94vw; }
.luck-res .lw-av { font-size: clamp(40px, 9vw, 64px); line-height: 1.1; }
.luck-res .lw-nm { font-size: clamp(26px, 6vw, 44px); font-weight: 900; word-break: break-word; }
.luck-res .lw-sub { font-size: clamp(14px, 3.4vw, 18px); opacity: .85; margin-top: 2px; }
.luck-res.me { background: linear-gradient(135deg, #1f9d63, #ffd54a); color: #1a1200; border-color: transparent; }
@keyframes luckpop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.luck-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .luck-wrap.done, .luck-res { animation: none; } }

/* v14: qabul qilish rejimi va qurilma belgisi */
.dev { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.3; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: var(--txt, #fff); white-space: normal; }
.dev.warn { background: rgba(255,185,56,.16); border-color: #ffb938; color: #ffd27a; }
#recvList li { flex-wrap: wrap; }
#recvList li .dev { flex: 1 0 100%; width: fit-content; max-width: 100%; margin: 2px 0 0 26px; }
.joinreq { position: fixed; top: calc(64px + env(safe-area-inset-top)); right: 12px; width: min(440px, calc(100vw - 24px)); max-height: 62vh; overflow-y: auto; z-index: 130; display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border-radius: 18px; background: rgba(20,16,43,.96); color: #fff; border: 1px solid #ffb938; box-shadow: 0 12px 40px rgba(0,0,0,.55); }
.joinreq[hidden] { display: none; }
.joinreq .jr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.joinreq .jr-head b { flex: 1; }
.joinreq .jr-row { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.07); }
.joinreq .jr-top { display: flex; align-items: center; gap: 8px; }
.joinreq .jr-nm { flex: 1; font-weight: 700; word-break: break-word; }
.joinreq button { padding: 7px 12px; font-size: 14px; border-radius: 10px; min-width: 0; }
.waitov { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(8,6,22,.88); backdrop-filter: blur(4px); }
.waitov[hidden] { display: none; }
.wo-box { text-align: center; max-width: 380px; padding: 28px 24px; border-radius: 24px; background: var(--card, #1a1438); border: 1px solid rgba(255,255,255,.18); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.wo-box .em { font-size: 56px; animation: wopulse 1.4s ease-in-out infinite; }
@keyframes wopulse { 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .wo-box .em { animation: none; } }

/* ===== v15: xonalar ro'yxati (dumaloq), xona nomi, O'yinlar tabi ===== */
.rs-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
#roomQ { flex: 1; min-width: 0; width: 100%; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--txt); border-radius: 14px; padding: 13px 14px; font: inherit; outline: 0; }
#roomQ:focus { border-color: var(--pri); box-shadow: 0 0 0 3px rgba(91,140,255,.2); }
#roomNameIn, #hRoomName { width: 100%; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--txt); border-radius: 14px; padding: 13px 14px; font: inherit; outline: 0; }
#roomNameIn:focus, #hRoomName:focus { border-color: var(--pri); box-shadow: 0 0 0 3px rgba(91,140,255,.2); }
#roomNameIn.need { border-color: var(--bad); }
#hostNew .primary { width: 100%; margin-top: 14px; }

.orbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 10px; justify-items: center; max-height: 54vh; overflow-y: auto; padding: 8px 4px 6px; overscroll-behavior: contain; }
.orb { background: none; padding: 4px; display: flex; flex-direction: column; align-items: center; gap: 9px; width: 100%; max-width: 124px; color: var(--txt); }
.orb:hover { filter: none; }
.orb-c { position: relative; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #fff;
  background: radial-gradient(circle at 30% 22%, hsl(var(--h) 85% 68%), hsl(calc(var(--h) + 40) 70% 40%));
  box-shadow: 0 10px 26px hsl(var(--h) 70% 30% / .55), inset 0 -6px 14px rgba(0,0,0,.22); transition: transform .18s, box-shadow .18s; }
.orb:hover .orb-c { transform: translateY(-3px) scale(1.04); }
.orb.sel .orb-c { transform: scale(1.08); box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px #fff, 0 12px 30px hsl(var(--h) 70% 30% / .6); }
.orb.live .orb-c::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--ok); animation: orbPulse 1.8s ease-out infinite; }
@keyframes orbPulse { 0% { transform: scale(.94); opacity: .9; } 100% { transform: scale(1.22); opacity: 0; } }
.orb-n { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 700; white-space: nowrap; background: #151a2e; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--txt); }
.orb-k { position: absolute; top: -2px; right: -2px; font-style: normal; font-size: 14px; background: #151a2e; border: 1px solid var(--line); border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.orb-t { font-size: 13px; font-weight: 600; line-height: 1.25; text-align: center; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; margin-top: 4px; }
.room-pick { margin: 12px 0 4px; padding: 10px 14px; border-radius: 14px; background: rgba(62,207,142,.12); border: 1px solid rgba(62,207,142,.4); color: var(--ok); font-weight: 600; font-size: 14px; }
#join .primary { width: 100%; margin-top: 14px; }
#joinBtn { width: 100%; }
@media (prefers-reduced-motion: reduce) { .orb.live .orb-c::before { animation: none; } }

.room-name { grid-column: 1 / -1; }
.room-name small { color: var(--mut); }
.rn-row { display: flex; gap: 8px; margin-top: 6px; }
.rn-row input { flex: 1; min-width: 0; font-weight: 700; }
.r-id { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.rname { font-size: 16px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { white-space: nowrap; flex: 1 0 auto; padding-left: 12px; padding-right: 12px; }

.game-item { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: var(--card2); }
.game-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.game-head b { display: block; font-size: 16px; }
.game-head small { color: var(--mut); }
.game-ico { font-size: 28px; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, #f5b942, #ff5d6c); }

/* ===== v16: mini o'yinlar (Tez bos, Tap-poyga, Raqamni top) ===== */
.game-item + .game-item { margin-top: 12px; }
.game-ico.rx { background: linear-gradient(135deg, #26890c, #d89e00); }
.game-ico.gs { background: linear-gradient(135deg, #00897b, #36d6ff); }
.game-item .primary { margin-top: 10px; }
.mg { position: fixed; inset: 0; z-index: 125; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; overflow-y: auto;
  padding: calc(10px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom)); background: radial-gradient(ellipse at 50% 30%, #1d2a5c 0%, #0d1230 55%, #070918 100%); }
.mg[hidden] { display: none; }
.mg-top { width: 100%; max-width: 760px; display: flex; align-items: center; gap: 10px; font-size: 20px; }
.mg-top b { flex: 1; }
.mg-top .chip { cursor: pointer; }
.mg-body { flex: 1 1 auto; width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; min-height: 0; }
.mg-pad { width: 100%; flex: 1; min-height: 52vh; max-height: 70vh; border-radius: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; touch-action: manipulation; user-select: none; -webkit-user-select: none; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.mg-pad b { font-size: clamp(34px, 9vw, 64px); }
.mg-pad small { font-size: clamp(14px, 3.6vw, 18px); opacity: .92; padding: 0 18px; }
.mg-pad.red { background: linear-gradient(160deg, #e21b3c, #8c0f26); }
.mg-pad.green { background: linear-gradient(160deg, #2fd06a, #14803f); animation: mgflash .25s ease-out; }
.mg-pad.blue { background: linear-gradient(160deg, #1368ce, #0c3b7a); }
.mg-pad.gray { background: linear-gradient(160deg, #4a5068, #2a2f42); }
@keyframes mgflash { from { filter: brightness(2); } to { filter: none; } }
.mg-count { font-size: clamp(110px, 34vw, 240px); font-weight: 900; line-height: 1; background: linear-gradient(135deg, #ffd54a, #ff4fa3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mg-count.pop { animation: mgpop .5s cubic-bezier(.2,1.5,.4,1); }
@keyframes mgpop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.mg-hint { margin: 0; color: #cfd6ff; font-size: 15px; }
.mg-timer { font-size: clamp(34px, 9vw, 54px); font-weight: 900; }
.barw { width: 100%; height: 10px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.barw .bar { display: block; height: 100%; background: linear-gradient(90deg, #36d6ff, #8a5bff); border-radius: 99px; }
.mg-tap { width: min(70vw, 300px); aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none;
  background: radial-gradient(circle at 30% 25%, #6aa0ff, #5b3cff 70%); box-shadow: 0 0 0 8px rgba(255,255,255,.1), 0 18px 50px rgba(91,60,255,.55); transition: transform .06s; }
.mg-tap .ico { font-size: 44px; line-height: 1; } .mg-tap .cnt { font-size: clamp(54px, 16vw, 96px); line-height: 1.05; } .mg-tap small { opacity: .8; }
.mg-tap.hit { animation: mgtap .09s; } .mg-tap.off { filter: grayscale(.8) brightness(.6); }
@keyframes mgtap { 50% { transform: scale(.93); } }
.mg-board { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 520px; display: grid; gap: 6px; text-align: left; }
.mg-board li { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 14px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); }
.mg-board.big li { padding: 12px 16px; font-size: 18px; }
.mg-board li.me { background: rgba(62,207,142,.22); border-color: rgba(62,207,142,.6); }
.mg-board li.empty { justify-content: center; color: #cfd6ff; }
.mg-rk { width: 30px; text-align: center; } .mg-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; } .mg-val { white-space: nowrap; }
.mg-topbox { width: 100%; display: flex; justify-content: center; }
.mg-h { margin: 4px 0 0; font-size: 22px; }
.mg-me { padding: 12px 18px; border-radius: 18px; background: rgba(255,255,255,.12); font-weight: 700; max-width: 94vw; }
.mg-me.first { background: linear-gradient(135deg, #1f9d63, #ffd54a); color: #1a1200; }
.mg-secret { color: #cfd6ff; font-size: 17px; }
.mg-big { font-size: clamp(80px, 26vw, 170px); font-weight: 900; line-height: 1; background: linear-gradient(135deg, #36d6ff, #8a5bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mg-gs { display: flex; gap: 10px; width: 100%; max-width: 420px; }
.mg-gs input { flex: 1; min-width: 0; font-size: 26px; text-align: center; font-weight: 800; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 14px; padding: 12px; outline: 0; }
.mg-gs input:disabled, .mg-gs button:disabled { opacity: .5; }
@media (prefers-reduced-motion: reduce) { .mg-count.pop, .mg-pad.green, .mg-tap.hit { animation: none; } }

/* ---- 🔼 Kichik-katta */
.game-ico.hl { background: linear-gradient(135deg, #e21b3c, #1368ce); }
.gm.dark { background: #000; }
.gm.dark .mg-top { opacity: .35; }
.gm-emo { font-size: clamp(64px, 20vw, 120px); line-height: 1; }
.gm-h { margin: 0; font-size: clamp(24px, 6vw, 36px); font-weight: 900; }
.gm-banner { padding: 12px 18px; border-radius: 18px; background: rgba(255,255,255,.12); font-weight: 700; max-width: 94vw; }
.gm-list { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 520px; display: grid; gap: 6px; text-align: left; }
.gm-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 14px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); }
.gm-list li.found { background: rgba(62,207,142,.18); border-color: rgba(62,207,142,.5); }
.gm-list .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.gm-list .st { color: #cfd6ff; white-space: nowrap; font-size: 14px; }
.gm-list button { padding: 8px 14px; border-radius: 12px; border: 0; font-weight: 800; cursor: pointer; background: #1f9d63; color: #fff; }
.gm-list button.undo { background: rgba(255,255,255,.18); }
.gm-big-btn { width: min(92vw, 420px); padding: 22px 18px; font-size: 24px; font-weight: 900; border: 0; border-radius: 24px; color: #fff; cursor: pointer; background: linear-gradient(160deg, #ff7a59, #e21b3c); box-shadow: 0 14px 40px rgba(0,0,0,.45); touch-action: manipulation; }
.gm-big-btn:disabled { opacity: .55; }
.gm-range { padding: 8px 18px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 20px; font-weight: 800; }
.gm-secret { font-size: clamp(54px, 16vw, 110px); font-weight: 900; line-height: 1; color: #ffd54a; }
.gm-reply { min-height: 72px; font-size: clamp(26px, 7vw, 40px); font-weight: 900; padding: 10px 20px; border-radius: 20px; display: flex; align-items: center; justify-content: center; width: min(92vw, 420px); background: rgba(255,255,255,.08); }
.gm-reply.up { background: linear-gradient(135deg, #e21b3c, #ff7a59); }
.gm-reply.down { background: linear-gradient(135deg, #1368ce, #36d6ff); }
.gm-reply.hit { background: linear-gradient(135deg, #1f9d63, #ffd54a); color: #1a1200; }
.gm-feed { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 520px; display: grid; gap: 5px; text-align: left; max-height: 34vh; overflow-y: auto; }
.gm-feed li { display: flex; gap: 10px; align-items: center; padding: 6px 12px; border-radius: 12px; background: rgba(255,255,255,.08); }
.gm-feed .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-feed .up { color: #ff9a8a; font-weight: 800; } .gm-feed .down { color: #7fc8ff; font-weight: 800; } .gm-feed .hit { color: #ffd54a; font-weight: 800; }

/* ======================================================================
   v35 — dizayn tartibi: bir xil oraliqlar, aniq ierarxiya, qulay sozlamalar
   ====================================================================== */
:root {
  --sp1: 6px; --sp2: 10px; --sp3: 14px; --sp4: 20px;
  --r-sm: 12px; --r-md: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.28);
  --ring: 0 0 0 3px rgba(91,140,255,.45);
}

/* Fokus va bosish qulayligi (klaviatura va telefon) */
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 0; box-shadow: var(--ring); }
button, summary, label.sw { min-height: 44px; }
button.link, button.x, button.back { min-height: 36px; }

/* Kartalar: yengil yuqori yorug'lik va bir xil soya */
.card { box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05); }
.card h2 { display: flex; align-items: center; gap: var(--sp2); letter-spacing: .1px; }

/* Maydonlar */
input[type=text], input[type=url], input[type=number], input[type=search], input:not([type]), select, textarea {
  border-radius: var(--r-sm); transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--pri); }

/* Akkordeonlar (Transmitter paneli) */
.acc { border-radius: var(--r-md); margin-bottom: var(--sp2); transition: border-color .2s, background .2s; }
.acc[open] { border-color: rgba(91,140,255,.35); background: rgba(255,255,255,.08); }
.acc summary { padding: 14px 16px; gap: var(--sp2); }
.acc summary > span:first-child { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(91,140,255,.16); font-size: 16px; flex: none; }
.acc summary:hover { background: rgba(255,255,255,.04); }
.acc-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }

/* Sozlama guruhlari va tushuntirishlar */
h4.grp { margin: 18px 0 2px; padding: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); border-bottom: 1px solid var(--line); }
.acc-body > h4.grp:first-child { margin-top: 12px; }
label.sw { padding: 12px 0; align-items: center; }
label.sw > span { display: flex; flex-direction: column; gap: 3px; line-height: 1.35; min-width: 0; }
label.sw small { color: var(--mut); font-size: 12px; font-weight: 400; line-height: 1.4; }
label.sw:hover > span { color: #fff; }
input.tg { width: 48px; height: 28px; }
input.tg:checked { box-shadow: 0 0 0 3px rgba(91,140,255,.18); }
input.tg:checked::after { transform: translateX(20px); }

/* Tugma qatorlari bir xil masofada */
.btn-row { gap: var(--sp2); margin: var(--sp2) 0; }
button.primary:hover { filter: brightness(1.08); box-shadow: 0 10px 28px rgba(91,140,255,.5); }
button.sec:hover { background: rgba(255,255,255,.10); filter: none; }

/* Ro'yxatlar */
.list > li, ul.list > li { border-radius: var(--r-sm); }

/* Toast */
#toast { border-radius: var(--r-md); box-shadow: var(--shadow); backdrop-filter: blur(8px); }

/* Telefon: zichroq va qulayroq */
@media (max-width: 480px) {
  main { padding: 0 12px 40px; }
  h1 { font-size: 26px; }
  .card { padding: 16px; border-radius: 20px; }
  .acc summary { padding: 13px 14px; }
  .acc-body { padding: 4px 14px 14px; }
}
@media (prefers-reduced-motion: reduce) { .acc, input.tg, input.tg::after, button { transition: none !important; } }

/* 📎 Fayldan quiz */
.ai-file { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.ai-file > .lbl { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--mut); letter-spacing: .02em; }
.ai-file > .lbl em { font-style: normal; font-weight: 500; }
.ai-drop { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 64px; padding: 12px; border-radius: 14px; border: 2px dashed rgba(255,255,255,.25); background: var(--card2); color: var(--txt); font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.ai-drop:hover, .ai-drop:focus-visible, .ai-drop.over { border-color: var(--cy); background: rgba(54,214,255,.10); outline: none; }
.ai-file.na .ai-drop { opacity: .45; pointer-events: none; }
.ai-prog { height: 8px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.ai-prog > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cy), var(--pri2)); transition: width .15s linear; }
.ai-fi { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: rgba(62,207,142,.12); border: 1px solid rgba(62,207,142,.4); font-size: 14px; }
.ai-fi span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-fi button { padding: 6px 10px; flex: none; }
.ai-fnote { margin: 0; font-size: 12px; }

/* ================= v18: Kichik · Katta — yangi dizayn ================= */
.gm-range { width: 100%; max-width: 520px; padding: 14px 16px 16px; border-radius: 22px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: inherit; font-weight: 400; }
.gm-ends { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; }
.gm-end { text-align: left; } .gm-end.r { text-align: right; }
.gm-end small { display: block; color: #aab4de; font-size: 12px; }
.gm-end b { font-size: clamp(30px, 9vw, 44px); font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; }
.gm-end:not(.r) b { color: #7fc8ff; } .gm-end.r b { color: #ff9a8a; }
.gm-left { padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 700; white-space: nowrap; }
.gm-track { position: relative; height: 16px; margin-top: 14px; border-radius: 99px; background: rgba(255,255,255,.12); }
.gm-fill { position: absolute; top: 0; bottom: 0; border-radius: 99px; min-width: 10px; background: linear-gradient(90deg, #36d6ff, #8a5bff 55%, #ff7a59); transition: left .35s ease, width .35s ease; }
.gm-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid #0d1230; background: #fff; }
.gm-dot.up { background: #ff7a59; } .gm-dot.down { background: #36d6ff; } .gm-dot.hit { background: #ffd54a; }

.gm-reply { flex-direction: column; gap: 2px; min-height: 104px; width: min(92vw, 520px); border: 1px solid rgba(255,255,255,.14); transition: background .25s; }
.gm-reply span { font-size: clamp(34px, 10vw, 54px); line-height: 1.1; }
.gm-reply small { font-size: 14px; font-weight: 600; opacity: .85; }
.gm-reply.up small, .gm-reply.down small { color: #fff; }

.gm-in { width: min(92vw, 520px); display: grid; grid-template-columns: 1fr; gap: 10px; }
.gm-step { display: grid; grid-template-columns: 64px 1fr 64px; gap: 10px; }
.gm-step input { min-width: 0; width: 100%; height: 64px; font-size: 32px; text-align: center; font-weight: 900; background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.25); color: #fff; border-radius: 18px; outline: 0; -moz-appearance: textfield; }
.gm-step input::-webkit-outer-spin-button, .gm-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gm-step input:focus { border-color: #8aa8ff; box-shadow: 0 0 0 4px rgba(91,140,255,.25); }
.gm-step input.bad { border-color: var(--bad); animation: gmshake .3s; }
.gm-pm { height: 64px; font-size: 32px; font-weight: 900; line-height: 1; border-radius: 18px; border: 0; color: #fff; background: rgba(255,255,255,.14); cursor: pointer; touch-action: manipulation; }
.gm-pm:active { background: rgba(255,255,255,.28); }
.gm-go { height: 60px; font-size: 20px; font-weight: 900; border: 0; border-radius: 18px; color: #fff; cursor: pointer; background: linear-gradient(135deg, var(--pri), var(--pri2)); box-shadow: 0 10px 28px rgba(91,140,255,.4); touch-action: manipulation; }
.gm-go:active:not(:disabled) { transform: translateY(2px); }
.gm-mid { padding: 11px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.3); background: transparent; color: #dbe3ff; font-weight: 700; font-size: 15px; cursor: pointer; }
.gm-pm:disabled, .gm-go:disabled, .gm-mid:disabled { opacity: .45; cursor: default; box-shadow: none; }
.gm-msg { margin: 0; min-height: 0; color: #ff9aa5; font-size: 14px; font-weight: 600; text-align: center; }
.gm-msg:empty { display: none; }
.gm-mine { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; max-width: 520px; }
.gm-mine small { color: #aab4de; }
.gm-chip { padding: 5px 11px; border-radius: 999px; font-weight: 800; font-size: 14px; background: rgba(255,255,255,.12); }
.gm-chip.up { background: rgba(255,122,89,.25); color: #ffb4a3; } .gm-chip.down { background: rgba(54,214,255,.2); color: #9fe1ff; } .gm-chip.hit { background: #ffd54a; color: #1a1200; }
.gm-feed li.empty { justify-content: center; color: #aab4de; background: transparent; }
.gm-feed .dir { font-weight: 800; font-size: 14px; white-space: nowrap; } .gm-feed .dir.up { color: #ff9a8a; } .gm-feed .dir.down { color: #7fc8ff; } .gm-feed .dir.hit { color: #ffd54a; }
@keyframes gmshake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .gm-step input.bad { animation: none; } .gm-fill { transition: none; } }

/* ================= v18: viktorina qoidalari ogohlantirishi ================= */
.rules { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto;
  background: radial-gradient(circle at 50% 20%, #261a3a, #080a16 70%); }
.rules-box { width: 100%; max-width: 460px; margin: auto; padding: 24px 20px 20px; border-radius: 28px; background: rgba(24,29,48,.96); border: 1px solid rgba(255,184,77,.35); box-shadow: 0 24px 80px rgba(0,0,0,.6); text-align: center; }
.rules-em { font-size: 52px; line-height: 1; }
.rules-box h2 { margin: 8px 0 4px; font-size: 26px; }
.rules-sub { margin: 0 0 14px; color: var(--mut); }
.rules-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; text-align: left; }
.rules-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: rgba(255,93,108,.1); border: 1px solid rgba(255,93,108,.28); }
.rules-list .ic { font-size: 26px; line-height: 1.1; }
.rules-list b { display: block; font-size: 16px; } .rules-list small { color: var(--mut); font-size: 13px; line-height: 1.35; display: block; margin-top: 2px; }
.rules-pen { margin: 0 0 14px; padding: 10px 12px; border-radius: 14px; background: rgba(245,185,66,.12); color: #ffd28a; font-weight: 700; font-size: 14px; line-height: 1.4; }
.rules-ok { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 0 0 12px; font-weight: 700; cursor: pointer; }
.rules-ok input { width: 22px; height: 22px; accent-color: var(--ok); }
.room-pick .pick-warn { display: block; margin-top: 6px; color: #ffd28a; font-weight: 600; line-height: 1.4; }

/* ================= v18: viktorina studiyasi — sodda va tartibli ================= */
.qz-start-card { padding: 0; overflow: hidden; }
.qz-sum { margin: 0; padding: 14px 16px; font-weight: 700; color: var(--txt); background: linear-gradient(135deg, rgba(91,140,255,.18), rgba(138,91,255,.14)); border-bottom: 1px solid var(--line); }
.qz-sum:empty { display: none; }
.qz-grp { border-bottom: 1px solid var(--line); }
.qz-grp > summary { list-style: none; cursor: pointer; padding: 15px 16px; font-weight: 800; display: flex; align-items: center; justify-content: space-between; }
.qz-grp > summary::-webkit-details-marker { display: none; }
.qz-grp > summary::after { content: '▾'; color: var(--mut); transition: transform .2s; }
.qz-grp[open] > summary::after { transform: rotate(180deg); }
.qz-grp > :not(summary) { margin-left: 16px; margin-right: 16px; }
.qz-grp > .sw:first-of-type, .qz-grp > .ai-grid { margin-top: 0; }
.qz-grp > :last-child { margin-bottom: 14px; }
.qz-grp .sw span { display: flex; flex-direction: column; gap: 2px; }
.qz-grp .sw b { font-size: 15px; } .qz-grp .sw small { color: var(--mut); font-size: 12.5px; line-height: 1.35; }
.qz-startbar { position: sticky; bottom: 0; z-index: 5; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgba(11,14,26,.96) 35%); }
.qz-startbar .primary { font-size: 18px; padding: 16px; }
.qz-start-card .err { margin: 0 16px 14px; }
.qz-hint { font-size: 13px; margin: 6px 0; }
.qz-more button { flex: 1; }
@media (max-width: 480px) { #qpPlayers { display: none; } .qp-top span:first-child { min-width: 0; } }
.gm .mg-body { padding-bottom: 80px; }

/* ---- viktorina rasmi: kattalashtirish / kichraytirish */
.qz-imgw { position: relative; display: block; width: fit-content; max-width: 100%; margin: 0 auto; }
.qz-imgw .qz-img { cursor: zoom-in; }
.qz-imgtl { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 6px; z-index: 2; }
.qz-imgtl button { width: 36px; height: 36px; min-width: 0; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(10,12,24,.72); color: #fff; font-size: 18px; font-weight: 800; line-height: 1; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); }
.qz-imgtl button:active { transform: scale(.92); }
.imgv { position: fixed; inset: 0; z-index: 9995; background: rgba(4,6,14,.95); display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.imgv img { max-width: 96vw; max-height: 86vh; object-fit: contain; border-radius: 8px; transform-origin: 50% 50%; will-change: transform; cursor: grab; touch-action: none; -webkit-user-drag: none; }
.imgv-bar { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 999px; background: rgba(20,24,44,.94); border: 1px solid rgba(255,255,255,.18); z-index: 2; }
.imgv-bar button, .imgv-x { min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff; font-size: 22px; font-weight: 800; line-height: 1; cursor: pointer; }
.imgv-bar span { min-width: 54px; text-align: center; font-weight: 700; font-size: 14px; color: #fff; }
.imgv-x { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; z-index: 2; background: rgba(20,24,44,.94); }
/* ---- rasmlarni savollarga ketma-ket joylash */
.qbi-ctl { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 14px; }
.qbi-lab { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.qbi-n-in { width: 72px; padding: 6px 8px; text-align: center; }
.qbi-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(255,255,255,.06); border-radius: 12px; border-left: 4px solid #26890c; }
.qbi-row.off { border-left-color: #ffd166; opacity: .55; }
.qbi-no { min-width: 22px; text-align: center; font-size: 12px; opacity: .7; }
.qbi-th { height: 46px; width: 64px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); flex: none; }
.qbi-t { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qbi-t small { display: block; opacity: .6; overflow: hidden; text-overflow: ellipsis; }
.qbi-mv { flex: none; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: inherit; cursor: pointer; }

/* ====== BOSH SAHIFA: yangi fon, yon panellar, kartalar ichidagi fon ====== */
.home-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .5s; }
body.home-on .home-bg { opacity: 1; }
.home-bg .orb { position: absolute; border-radius: 50%; opacity: .55; animation: orbf 18s ease-in-out infinite; will-change: transform; }
.home-bg .o1 { width: 46vmax; height: 46vmax; left: -14vmax; top: 6vh; background: radial-gradient(circle, rgba(var(--pri-rgb), .55), transparent 65%); }
.home-bg .o2 { width: 42vmax; height: 42vmax; right: -12vmax; top: 18vh; background: radial-gradient(circle, rgba(15,200,170,.42), transparent 65%); animation-delay: -6s; }
.home-bg .o3 { width: 34vmax; height: 34vmax; left: 32vw; bottom: -16vmax; background: radial-gradient(circle, rgba(var(--pri2-rgb), .5), transparent 65%); animation-delay: -11s; }
@keyframes orbf { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4vw,-5vh) scale(1.12); } }
.home-bg .grid { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 62%;
  background-image: linear-gradient(rgba(120,160,255,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(120,160,255,.16) 1px, transparent 1px);
  background-size: 56px 56px; transform: perspective(520px) rotateX(62deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  }
@keyframes gridm { to { background-position: 0 56px, 56px 0; } }
.home-bg .beam { position: absolute; left: 0; right: 0; top: 46%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(54,214,255,.0) 10%, rgba(54,214,255,.55) 50%, rgba(54,214,255,0) 90%, transparent);
  background-size: 40% 100%; background-repeat: no-repeat; background-position: 50% 0; opacity: .6; }
@keyframes beam { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* Joylashuv: keng ekranda 3 ustun, telefonda faqat markaz */
body.home-on main { max-width: 1240px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: center; }
.home-center { max-width: 680px; margin: 0 auto; width: 100%; }
.side { display: none; }
@media (min-width: 1060px) {
  .home-grid { grid-template-columns: 1fr minmax(420px, 560px) 1fr; min-height: 68vh; }
  .side { display: block; }
}

.side { padding: 18px 16px; border-radius: 26px; border: 1px solid var(--line); position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(var(--pri-rgb), .16), rgba(24,29,48,.55) 55%), var(--card); box-shadow: 0 18px 50px rgba(0,0,0,.3); animation: sidein .8s cubic-bezier(.2,.8,.2,1) both; }
.side::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1.4px); background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); mask-image: linear-gradient(180deg, #000, transparent 80%); }
.side-rx { background: linear-gradient(200deg, rgba(20,200,170,.16), rgba(24,29,48,.55) 55%), var(--card); animation-name: sidein-r; animation-delay: .12s; }
@keyframes sidein { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
@keyframes sidein-r { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
.side-head { position: relative; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.side-head b { font-size: 19px; }
.side-head small { margin-left: auto; color: var(--mut); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; }
.side-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: linear-gradient(135deg, var(--tx1), var(--tx2)); box-shadow: 0 0 0 0 rgba(var(--pri-rgb), .6); animation: ping 2.6s ease-out infinite; }
.side-rx .side-ico { background: linear-gradient(135deg, #0f8a73, #2a6fd0); animation-name: ping-g; }
@keyframes ping { 70%,100% { box-shadow: 0 0 0 16px rgba(var(--pri-rgb), 0); } }
@keyframes ping-g { 0% { box-shadow: 0 0 0 0 rgba(20,200,170,.6); } 70%,100% { box-shadow: 0 0 0 16px rgba(20,200,170,0); } }

.flow { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 10px; }
.flow li { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 16px; background: var(--card2); border: 1px solid var(--line);
  transition: transform .2s, background .2s, border-color .2s; animation: itemin .6s calc(.3s + var(--i) * .09s) both; }
.flow li:hover { transform: translateX(4px); background: rgba(91,140,255,.14); border-color: rgba(91,140,255,.45); }
.side-rx .flow li:hover { transform: translateX(-4px); background: rgba(20,200,170,.14); border-color: rgba(20,200,170,.45); }
@keyframes itemin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.fi { width: 36px; height: 36px; flex: none; display: grid; place-items: center; font-size: 18px; border-radius: 11px; background: rgba(255,255,255,.08); }
.ft { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.25; }
/* Harakatlanuvchi strelka (Transmitter → Receiver) */
.arr { position: relative; flex: none; width: 46px; height: 3px; border-radius: 3px; overflow: visible;
  background: repeating-linear-gradient(90deg, var(--cy) 0 8px, transparent 8px 15px); background-size: 15px 3px; animation: dash 0.9s linear infinite; animation-delay: calc(var(--i, 0) * -.15s); }
.arr::after { content: ''; position: absolute; right: -4px; top: 50%; width: 9px; height: 9px; border-top: 3px solid var(--cy); border-right: 3px solid var(--cy); transform: translateY(-50%) rotate(45deg); }
.side-rx .arr { background-image: repeating-linear-gradient(90deg, var(--ok) 0 8px, transparent 8px 15px); }
.side-rx .arr::after { border-color: var(--ok); }
@keyframes dash { to { background-position: 15px 0; } }

/* Katta tugmalar ichidagi fon */
.big { position: relative; overflow: hidden; isolation: isolate; }
.big::before { content: ''; position: absolute; z-index: -1; right: -40px; bottom: -40px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, transparent 28%, rgba(255,255,255,.14) 29% 31%, transparent 32% 48%, rgba(255,255,255,.10) 49% 51%, transparent 52% 68%, rgba(255,255,255,.07) 69% 71%, transparent 72%); animation: sonar 5s ease-in-out infinite; }
.big::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%); transform: translateX(-120%); animation: shine 5.5s ease-in-out infinite; }
.big.alt::after { animation-delay: 1.4s; }
.big { background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.5px), linear-gradient(135deg, var(--tx1), var(--tx2)); background-size: 18px 18px, auto; transition: transform .2s, box-shadow .2s; }
.big.alt { background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.5px), linear-gradient(135deg, #0f8a73, #2a6fd0); }
.big:hover { transform: translateY(-4px); }
@keyframes sonar { 0%,100% { transform: scale(.9); opacity: .7; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes shine { 0%,55% { transform: translateX(-120%); } 85%,100% { transform: translateX(120%); } }
.hero h1 { font-size: clamp(30px, 4.2vw, 44px); }

/* Fon qatlamlari (aurora, home-bg) body orqasida qolib ketmasligi uchun */
body { background: transparent; }

/* ====== 📋 DAVOMAT ====== */
.att-card h2, #atSet h2, #atFace h2, #atStat h2 { font-size: 18px; }
.att-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 12px 0 4px; }
.att-row > div { flex: 1 1 140px; }
.att-up { flex: 1 1 220px; margin: 0; padding: 13px 16px; border: 2px dashed rgba(91,140,255,.55); border-radius: 14px; color: var(--txt); text-align: center; cursor: pointer; font-size: 14px; background: rgba(91,140,255,.08); transition: background .2s, transform .15s; }
.att-up:hover { background: rgba(91,140,255,.18); transform: translateY(-1px); }
input[type=number] { width: 100%; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line); background: var(--card2); color: var(--txt); font: inherit; outline: none; }
#afVid { width: 100%; max-height: 260px; border-radius: 16px; background: #000; margin: 8px 0; object-fit: cover; transform: scaleX(-1); }
#afVid:not([srcObject]) { min-height: 0; }
.att-k { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.att-k .k { border-radius: 16px; padding: 12px 8px; text-align: center; background: var(--card2); border: 1px solid var(--line); animation: itemin .5s both; }
.att-k .k b { display: block; font-size: 28px; line-height: 1.1; }
.att-k .k small { color: var(--mut); font-size: 12px; }
.att-k .k.in { background: rgba(62,207,142,.14); border-color: rgba(62,207,142,.4); } .att-k .k.in b { color: var(--ok); }
.att-k .k.late, .att-k .k.warn { background: rgba(245,185,66,.14); border-color: rgba(245,185,66,.4); } .att-k .k.late b, .att-k .k.warn b { color: var(--warn); }
.att-k .k.out { background: rgba(255,93,108,.12); border-color: rgba(255,93,108,.35); } .att-k .k.out b, .att-k .k.bad b { color: var(--bad); }
.att-bar { height: 12px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.att-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--ok), var(--cy)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.att-groups { display: grid; gap: 8px; margin: 14px 0; }
.gb { display: grid; grid-template-columns: 90px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; }
.gb div { height: 10px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; } .gb div i { display: block; height: 100%; background: linear-gradient(90deg, var(--pri), var(--pri2)); border-radius: 99px; transition: width .5s; }
.gb em { color: var(--mut); font-style: normal; text-align: right; }
.att-tl { margin: 10px 0; } .att-tl div { display: flex; align-items: flex-end; gap: 3px; height: 70px; margin-top: 6px; } .att-tl i { flex: 1; min-width: 4px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--cy), var(--pri)); }
.att-warn { margin: 12px 0; padding: 12px 14px; border-radius: 16px; background: rgba(245,185,66,.1); border: 1px solid rgba(245,185,66,.4); }
.att-warn div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 14px; border-top: 1px solid rgba(255,255,255,.06); } .att-warn em { color: var(--warn); font-style: normal; font-weight: 700; }
.att-dl button { flex: 1 1 auto; }
.att-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.chip-b { flex: none; padding: 8px 12px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); font-size: 13px; } .chip-b b { color: var(--cy); margin-left: 4px; }
.chip-b.on { background: linear-gradient(135deg, var(--pri), var(--pri2)); border-color: transparent; } .chip-b.on b { color: #fff; }
.att-rows { display: grid; gap: 8px; margin-top: 10px; }
.att-r { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--card2); border: 1px solid var(--line); }
.att-r .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--bad); box-shadow: 0 0 0 4px rgba(255,93,108,.18); }
.att-r.in .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(62,207,142,.18); } .att-r.late .dot { background: var(--warn); box-shadow: 0 0 0 4px rgba(245,185,66,.18); }
.att-r .nm { flex: 1; min-width: 0; } .att-r .nm b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .att-r .nm small { color: var(--mut); font-size: 12px; }
.att-r .b { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.08); flex: none; }
.att-r .b.ok { color: var(--ok); } .att-r .b.warn { color: var(--warn); background: rgba(245,185,66,.15); } .att-r .b.bad { color: var(--bad); background: rgba(255,93,108,.15); }
.att-r img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; cursor: zoom-in; flex: none; background: #000; }
button.sm { padding: 6px 12px; border-radius: 10px; flex: none; }
.att-res { display: grid; gap: 8px; margin-top: 10px; }
.att-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 13px 16px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); }
.att-pick b { font-size: 16px; } .att-pick small { color: var(--mut); } .att-pick:disabled { opacity: .45; cursor: not-allowed; }
.att-done { text-align: center; padding: 18px 8px; font-size: 18px; border-radius: 16px; background: rgba(62,207,142,.13); border: 1px solid rgba(62,207,142,.4); animation: itemin .5s both; }
.att-modal { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 16px; background: rgba(5,7,15,.78); backdrop-filter: blur(6px); }
.att-sheet { width: min(440px, 100%); max-height: 92vh; overflow: auto; padding: 20px; border-radius: 24px; background: #151a2e; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: itemin .3s both; }
.att-sheet h2 { margin: 0 0 2px; font-size: 20px; } .att-steps { display: grid; gap: 6px; margin: 12px 0; font-size: 14px; } .att-steps a { color: var(--cy); }
.att-sheet video { width: 100%; border-radius: 16px; background: #000; transform: scaleX(-1); max-height: 46vh; object-fit: cover; }
.att-btns { display: flex; gap: 10px; margin-top: 14px; } .att-btns .primary { flex: 1; } .att-big { width: 100%; border-radius: 16px; }
@media (max-width: 520px) { .att-k { grid-template-columns: repeat(2, 1fr); } .gb { grid-template-columns: 70px 1fr 50px; } }

/* ====== 🏫 O'QUV MARKAZ BRENDI + ROL IZOHLARI ====== */
.brand-img { width: 30px; height: 30px; border-radius: 9px; object-fit: contain; background: #fff; padding: 2px; }
.brand-sub { color: var(--mut); font-weight: 600; font-size: 12px; letter-spacing: .4px; margin-left: 2px; }
.logo { min-width: 0; }
#brandName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }

.center-badge { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin: 0 0 6px; padding: 7px 16px 7px 8px; border-radius: 999px; text-decoration: none; color: var(--txt); font-weight: 700; font-size: 14px;
  background: rgba(var(--pri-rgb), .16); border: 1px solid rgba(var(--pri-rgb), .45); animation: itemin .5s both; }
.center-badge:not([href]) { cursor: default; }
.center-badge img { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; background: #fff; flex: none; }
.center-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center-badge:not(:has(img:not([hidden]))) { padding-left: 16px; }

.center-box { margin: 22px 0 6px; padding: 14px; border-radius: 18px; text-align: left; background: var(--card2); border: 1px solid var(--line); }
.center-box label { display: block; font-size: 13px; font-weight: 700; color: var(--mut); margin-bottom: 8px; }
.cb-row { display: flex; gap: 8px; }
.cb-row input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--txt); font: inherit; letter-spacing: .6px; outline: none; transition: border-color .2s, box-shadow .2s; }
.cb-row input:focus { border-color: var(--pri); box-shadow: 0 0 0 3px rgba(var(--pri-rgb), .25); }
.cb-row input:disabled, .cb-row button:disabled { opacity: .5; cursor: not-allowed; }
.cb-row input.bad { border-color: var(--bad); animation: cbshake .4s; }
@keyframes cbshake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.cb-msg { margin: 8px 2px 0; font-size: 13px; line-height: 1.4; color: var(--mut); }
.cb-msg.bad { color: var(--bad); } .cb-msg.ok { color: var(--ok); }
.cb-on { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.cb-on b { color: var(--txt); }
.cb-on button.link { padding: 6px 10px; flex: none; }

/* Rol izohi: Transmitter / Receiver ustiga sichqoncha kelganda (yoki klaviatura bilan fokus bo'lganda) chiqadi */
.big .role-tip { position: absolute; top: 18px; right: 16px; max-width: calc(100% - 100px); padding: 5px 11px; border-radius: 12px; font-size: 12px; font-weight: 700; line-height: 1.3; text-align: right;
  color: #fff; background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(4px);
  opacity: 0; transform: translateY(-4px); transition: opacity .18s, transform .18s; pointer-events: none; }
.big:hover .role-tip, .big:focus-visible .role-tip { opacity: 1; transform: none; }
@media (hover: none) { .big .role-tip { opacity: 1; transform: none; background: rgba(0,0,0,.25); } }   /* sensorli ekranda sichqoncha yo'q — izoh doim ko'rinadi */
.side-head[data-tip]::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% - 2px); z-index: 6; max-width: 100%; padding: 6px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700; color: #fff;
  background: rgba(12,16,32,.96); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 8px 24px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(-4px); transition: opacity .18s, transform .18s; pointer-events: none; }
.side-head[data-tip]:hover::after, .side-head[data-tip]:focus-visible::after { opacity: 1; transform: none; }
.side-head[data-tip] { cursor: help; outline: none; }

/* Davomat: shablon bloki va Yuz ID kamerasi */
.att-tpl { margin-top: 16px; padding: 14px; border-radius: 16px; background: rgba(91,140,255,.08); border: 1px dashed rgba(91,140,255,.5); }
.att-tpl h3 { margin: 0 0 6px; font-size: 16px; } .att-tpl .att-row { margin-top: 10px; } .att-tpl button { flex: 1 1 auto; }
#afVid { display: block; width: 100%; max-height: 46vh; margin: 10px 0; border-radius: 16px; background: #000; object-fit: cover; }
#afVid.mir { transform: scaleX(-1); }


/* ---- Markaz rejimi: tablar tartibi (Davomat, Viktorina, AI Quiz, Funksiyalar) ---- */
#hostTabs .tab[data-tab="fn"], #hostTabs .tab[data-tab="hw"] { display: none; }
#host.center-mode #hostTabs .tab[data-tab="att"]  { order: 1; }
#host.center-mode #hostTabs .tab[data-tab="hw"]   { order: 2; display: block; }
#host.center-mode #hostTabs .tab[data-tab="quiz"] { order: 3; }
#host.center-mode #hostTabs .tab[data-tab="fn"]   { order: 4; display: block; }
#host.center-mode #hostTabs .tab[data-tab="media"],
#host.center-mode #hostTabs .tab[data-tab="mic"],
#host.center-mode #hostTabs .tab[data-tab="games"] { display: none; }
.fn-sub { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 14px; }
.fn-sub[hidden] { display: none; }
.fn-sub .chipbtn { background: var(--card2); color: var(--mut); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-weight: 700; }
.fn-sub .chipbtn.on { background: linear-gradient(135deg, var(--pri), var(--pri2)); color: #fff; border-color: transparent; }
#shareCode { white-space: nowrap; }
.room-link { flex-wrap: wrap; }

/* ---- 📝 Uyga vazifa */
#qzEditor.hw-mode .qz-only { display: none !important; }
#qzEditor:not(.hw-mode) .hw-only { display: none !important; }
.hw-intro h2 { margin-bottom: 6px; }
.hw-sum { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; }
.hw-sum > div { flex: 1 1 110px; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.hw-sum b { display: block; font-size: 28px; line-height: 1.1; }
.hw-sum small { color: var(--mut); }
.hw-sum .ok b { color: #2ecc71; } .hw-sum .no b { color: #ff5d6c; }
.hw-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.hw-bar .chipbtn { background: var(--card2); color: var(--mut); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 700; }
.hw-bar .chipbtn.on { background: linear-gradient(135deg, var(--pri), var(--pri2)); color: #fff; border-color: transparent; }
.hw-wrap { overflow: auto; max-height: 56vh; border: 1px solid var(--line); border-radius: 14px; }
.hw-tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.hw-tbl th, .hw-tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hw-tbl th { position: sticky; top: 0; background: var(--card2); z-index: 1; }
.hw-tbl tr.ok td:last-child { color: #2ecc71; font-weight: 800; }
.hw-tbl tr.no td:last-child { color: #ff5d6c; font-weight: 800; }
.hw-me { text-align: center; padding: 26px 18px; border-radius: 20px; margin: 14px 0; }
.hw-me.ok { background: rgba(46,204,113,.16); border: 2px solid #2ecc71; }
.hw-me.no { background: rgba(255,93,108,.14); border: 2px solid #ff5d6c; }
.hw-me .em { font-size: 64px; } .hw-me h2 { margin: 6px 0; font-size: 28px; }
.hw-me .big { font-size: 40px; font-weight: 900; }
.hw-last h3 { margin: 0 0 6px; }

/* 🙂 Face ID */
.fst { margin: 8px 0; min-height: 22px; font-size: 14px; text-align: center; color: var(--mut); }
.fst.ok { color: #3ecf8e; } .fst.warn { color: #ffc857; } .fst.bad { color: #ff6b7a; }
.fcand { display: grid; gap: 2px; text-align: center; padding: 16px 10px; margin-top: 8px; border-radius: 16px; background: rgba(62,207,142,.13); border: 1px solid rgba(62,207,142,.4); animation: itemin .4s both; }
.fcand b { font-size: 22px; } .fcand small { color: var(--mut); }
#arFace { display: grid; gap: 10px; margin-bottom: 8px; } #arFace[hidden] { display: none; } #arG[hidden] { display: none; }
#afG { margin: 8px 0; } #atFace h3 { margin: 16px 0 6px; font-size: 15px; }

/* ====== 📋 DAVOMAT v23: tartibli panel, qadamlar, ro'yxatdan o'tish ====== */
/* Transmitter: bo'limlar (Ro'yxat · Jonli · Yuz ID · Sozlama · Fayl) — bir vaqtda faqat bittasi ko'rinadi */
.att-nav, .pn-nav { position: sticky; top: 8px; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 5px; margin: 0 0 14px; border-radius: 20px; background: rgba(14, 18, 34, .9); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.att-nav button, .pn-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 8px; border: 0; border-radius: 15px; background: transparent; color: var(--mut); font-size: 12px; font-weight: 600; transition: background .2s, color .2s, transform .15s; }
.att-nav button span, .pn-nav button span { font-size: 19px; line-height: 1; }
.att-nav button:hover, .pn-nav button:hover { color: var(--txt); background: var(--card2); }
.att-nav button.on, .pn-nav button.on { color: #fff; background: linear-gradient(135deg, var(--pri), var(--pri2)); box-shadow: 0 6px 18px rgba(var(--pri-rgb), .38); }
#tabAtt .att-pane { display: none; }
#tabAtt[data-p="list"] .att-pane[data-pane="list"], #tabAtt[data-p="live"] .att-pane[data-pane="live"], #tabAtt[data-p="face"] .att-pane[data-pane="face"],
#tabAtt[data-p="set"] .att-pane[data-pane="set"], #tabAtt[data-p="rep"] .att-pane[data-pane="rep"] { display: block; animation: itemin .35s both; }
#tabAtt .att-pane[hidden] { display: none !important; }
#tabAtt .att-pane h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 19px; }
#tabAtt .att-pane h3 { margin: 18px 0 8px; font-size: 15px; }
.att-save { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px; border-radius: 16px; background: rgba(245, 185, 66, .13); border: 1px solid rgba(245, 185, 66, .5); font-size: 14px; font-weight: 600; color: var(--warn); }
.att-save button { padding: 8px 14px; font-size: 14px; }

/* Ro'yxat bo'limi: ikki boshlanish yo'li */
.att-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 4px; }
.att-up { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 112px; margin: 0; padding: 14px 12px !important; text-align: center; }
.att-up b { font-size: 15px; } .att-up small { color: var(--mut); font-size: 12px; line-height: 1.35; }
.att-up.alt { border: 2px dashed rgba(54, 214, 255, .55); background: rgba(54, 214, 255, .07); color: var(--txt); border-radius: 14px; cursor: pointer; }
.att-up.alt:hover { background: rgba(54, 214, 255, .16); transform: translateY(-1px); }
.att-how { margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); font-size: 14px; }
.att-how summary { cursor: pointer; font-weight: 700; } .att-how ol { margin: 10px 0 2px; padding-left: 20px; display: grid; gap: 8px; color: var(--mut); } .att-how li b { color: var(--txt); } .att-how i { color: var(--cy); font-style: normal; }

/* Jonli: boshqaruv paneli */
.att-ctl { display: grid; gap: 4px; border: 1px solid rgba(var(--pri-rgb), .35); background: linear-gradient(135deg, rgba(var(--pri-rgb), .14), rgba(var(--pri2-rgb), .1)), var(--card); }
.att-code { margin-top: 6px; padding: 9px 12px; border-radius: 12px; background: rgba(0, 0, 0, .25); font-size: 13px; color: var(--mut); text-align: center; } .att-code:empty { display: none; } .att-code b { color: var(--cy); font-size: 18px; letter-spacing: 3px; margin-left: 4px; }
.att-k { grid-template-columns: repeat(3, 1fr); }
.att-k .k b { font-size: 30px; }
.att-r { transition: background .2s, transform .15s; } .att-r:hover { background: rgba(255, 255, 255, .09); }
.att-r.in { border-color: rgba(62, 207, 142, .3); } .att-r.late { border-color: rgba(245, 185, 66, .35); }

/* Yuz ID bo'limi: A / B / C variantlar */
.att-opt { margin-top: 16px; padding: 14px; border-radius: 18px; background: var(--card2); border: 1px solid var(--line); }
.att-opt h3 { margin: 0 0 8px !important; font-size: 15px; } .att-opt h4 { margin: 12px 0 6px; font-size: 14px; color: var(--mut); } .att-opt h4 b { color: var(--ok); }
.att-newst { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; margin: 6px 0 10px; } .att-newst input { min-width: 0; }
.att-regs { display: grid; gap: 8px; margin-top: 8px; max-height: 320px; overflow: auto; }
.att-form { display: grid; gap: 6px; margin: 12px 0 4px; } .att-form label { margin: 6px 0 0; font-size: 13px; color: var(--mut); }
.att-form input { width: 100%; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line); background: var(--card2); color: var(--txt); font: inherit; outline: none; }
.att-form input:focus { box-shadow: var(--ring); }
button.big { padding: 16px 18px; font-size: 17px; border-radius: 18px; }

/* Receiver: sarlavha, holat, 3 qadam */
.ar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .ar-head h2 { margin: 0; }
.ar-pill { padding: 5px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--card2); border: 1px solid var(--line); }
.ar-pill.on { color: var(--ok); background: rgba(62, 207, 142, .13); border-color: rgba(62, 207, 142, .4); } .ar-pill.off { color: var(--mut); } .ar-pill.ok { color: #fff; background: linear-gradient(135deg, #2fbf7e, #1da1c9); border-color: transparent; }
.ar-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin: 4px 0 12px; }
.ar-steps span { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 4px; border-radius: 12px; font-size: 12px; font-weight: 600; color: var(--mut); background: var(--card2); border: 1px solid var(--line); transition: all .25s; }
.ar-steps span i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-size: 11px; background: rgba(255, 255, 255, .1); }
.ar-steps span.on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--pri), var(--pri2)); box-shadow: 0 4px 14px rgba(var(--pri-rgb), .4); } .ar-steps span.on i { background: rgba(255, 255, 255, .25); }
.ar-steps span.done { color: var(--ok); border-color: rgba(62, 207, 142, .4); background: rgba(62, 207, 142, .1); } .ar-steps span.done i { background: var(--ok); color: #06210f; font-size: 0; } .ar-steps span.done i::before { content: '✓'; font-size: 12px; font-weight: 800; }
.ar-steps.big { margin: 10px 0 4px; }
#arG { margin-bottom: 10px; }
.ar-reg { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 8px; text-align: center; }
.ar-dots { display: flex; justify-content: center; gap: 8px; margin: 12px 0 6px; } .ar-dots i { width: 34px; height: 6px; border-radius: 9px; background: rgba(255, 255, 255, .14); transition: background .25s; } .ar-dots i.on { background: var(--cy); } .ar-dots i.done { background: var(--ok); }
.reg-ok { display: grid; gap: 6px; text-align: center; justify-items: center; } .reg-ok .big { font-size: 54px; line-height: 1; animation: itemin .5s both; } .reg-ok h2 { margin: 4px 0 0; } .reg-ok b { font-size: 20px; } .reg-ok .att-btns { width: 100%; }
.att-sheet video[hidden] { display: none; }

@media (max-width: 560px) {
  .att-two { grid-template-columns: 1fr; } .att-up { min-height: 88px; }
  .att-newst { grid-template-columns: 1fr 1fr; } .att-newst input:first-child { grid-column: 1 / -1; } .att-newst button { grid-column: 1 / -1; }
  .att-nav button { font-size: 11px; } .att-nav button span { font-size: 17px; }
}
.att-newst input, #afQ, #atQ, #atTitle { width: 100%; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line); background: var(--card2); color: var(--txt); font: inherit; outline: none; }
.att-newst input:focus, #afQ:focus, #atQ:focus, #atTitle:focus { box-shadow: var(--ring); }
.att-how { padding: 0 14px; } .att-how summary { padding: 12px 0; list-style-position: inside; } .att-how[open] summary { padding-bottom: 4px; } .att-how ol { margin: 6px 0 14px; }

/* 🧭 Bo'limlar navigatsiyasi (Davomat uslubi): Viktorina, O'yinlar */
.pn-nav { grid-auto-flow: column; grid-auto-columns: 1fr; margin: 4px 0 14px; }
.card .pn-nav { position: static; box-shadow: none; }
.pn-hide { display: none !important; }
@media (max-width: 560px) { .pn-nav button { font-size: 11px; } .pn-nav button span { font-size: 17px; } }

/* ---------------- 🍎 Face ID halqasi (iPhone uslubida) ---------------- */
.fid-wrap { position: relative; width: min(280px, 72vw); aspect-ratio: 1; margin: 14px auto 8px; user-select: none; -webkit-user-select: none; }
.fid-wrap:has(video[hidden]) { display: none; }
.fid-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fid-t { stroke: rgba(255,255,255,.17); stroke-width: 2.6; stroke-linecap: round; transition: stroke .16s, stroke-width .16s; }
.fid-t.on { stroke: #fff; stroke-width: 3.6; }
.fid-dot { fill: #fff; filter: drop-shadow(0 0 4px rgba(255,255,255,.95)); opacity: 0; transition: opacity .2s; }
.fid-in { position: absolute; inset: 9%; border-radius: 50%; overflow: hidden; background: #000; box-shadow: 0 0 0 2px rgba(255,255,255,.06), 0 12px 40px rgba(0,0,0,.45); }
.att-sheet .fid-wrap video, .fid-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; margin: 0; border-radius: 0; object-fit: cover; transform: scaleX(-1); }
.fid-line { position: absolute; left: 0; right: 0; top: -40%; height: 40%; background: linear-gradient(to bottom, transparent, rgba(120,220,255,.30), transparent); animation: fidscan 2.1s ease-in-out infinite alternate; pointer-events: none; }
.sweeping .fid-line, .s-wait .fid-line, .s-ok .fid-line, .s-bad .fid-line { display: none; }
@keyframes fidscan { to { top: 100%; } }
.fid-ar { position: absolute; font-size: 34px; font-weight: 700; line-height: 1; color: #fff; opacity: 0; text-shadow: 0 2px 10px rgba(0,0,0,.7); pointer-events: none; transition: opacity .2s, color .2s; }
.fid-ar-u { top: 5%; left: 50%; transform: translateX(-50%); } .fid-ar-d { bottom: 5%; left: 50%; transform: translateX(-50%); }
.fid-ar-l { left: 6%; top: 50%; transform: translateY(-50%); } .fid-ar-r { right: 6%; top: 50%; transform: translateY(-50%); }
.sweeping .fid-ar.show { opacity: .9; animation: fidar 1.1s ease-in-out infinite; }
.sweeping .fid-ar.done { opacity: .95; color: #3ecf8e; animation: none; }
@keyframes fidar { 50% { opacity: .35; } }
.fid-ck { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8,24,16,.42); opacity: 0; transform: scale(.7); transition: opacity .25s, transform .35s cubic-bezier(.2,1.4,.4,1); pointer-events: none; }
.fid-ck svg { width: 46%; fill: none; stroke: #3ecf8e; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.fid-ck circle { stroke-dasharray: 170; stroke-dashoffset: 170; } .fid-ck path { stroke-dasharray: 52; stroke-dashoffset: 52; }
.s-ok .fid-ck { opacity: 1; transform: scale(1); }
.s-ok .fid-ck circle { animation: fiddraw .5s ease-out forwards; } .s-ok .fid-ck path { animation: fiddraw .35s .3s ease-out forwards; }
@keyframes fiddraw { to { stroke-dashoffset: 0; } }
.s-ok .fid-t, .s-ok .fid-t.on { stroke: #3ecf8e; }
.s-ok .fid-svg { animation: fidpop .55s ease-out; transform-origin: 50% 50%; }
@keyframes fidpop { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
.s-wait .fid-t.on { stroke: #6fd8ff; animation: fidwait 1s ease-in-out infinite; }
.s-wait .fid-t:nth-child(odd).on { animation-delay: .5s; }
@keyframes fidwait { 50% { stroke-opacity: .35; } }
.s-bad .fid-t, .s-bad .fid-t.on { stroke: #ff6b7a; }
.s-bad { animation: fidshake .5s; }
@keyframes fidshake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
@media (prefers-reduced-motion: reduce) { .fid-line, .fid-ar, .s-wait .fid-t, .s-ok .fid-svg, .s-bad { animation: none !important; } }

/* 🗑 Davomatni qaytadan boshlash (Ro'yxat bo'limi, pastda) */
.att-reset { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.att-reset button.danger { border-color: var(--bad); color: var(--bad); background: transparent; font-weight: 700; padding: 10px 16px; }
.att-reset button.danger:hover { background: var(--bad); color: #fff; }

/* 🧑‍🎓 o'quvchilarni boshqarish */
.att-nav { grid-template-columns: repeat(6, 1fr); }
#tabAtt[data-p="tah"] .att-pane[data-pane="tah"] { display: block; animation: itemin .35s both; }
.mgcnt { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: rgba(91,140,255,.2); color: var(--cy); }
.att-r.mgr .dot { display: none; } .att-r.mgr button { padding: 7px 12px; font-size: 15px; flex: none; }
.att-r.mgr button.xbtn { color: var(--bad); border-color: rgba(255,93,108,.5); font-weight: 800; } .att-r.mgr button.xbtn:hover { background: var(--bad); color: #fff; }
.att-form textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 12px; }
/* 📈 Davomat tahlilchisi */
.th-dates { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin: 6px -2px 6px; scroll-snap-type: x proximity; }
.th-d { flex: none; display: grid; grid-template-columns: auto auto; align-items: center; gap: 4px 10px; min-width: 168px; padding: 12px 14px; border-radius: 18px; background: var(--card2); border: 1px solid var(--line); color: var(--txt); text-align: left; scroll-snap-align: start; transition: transform .15s, border-color .2s, background .2s; }
.th-d:hover { transform: translateY(-2px); } .th-d.on { border-color: var(--pri); background: linear-gradient(135deg, rgba(91,140,255,.22), rgba(138,91,255,.18)); box-shadow: 0 8px 22px rgba(91,140,255,.25); }
.th-ring { grid-row: span 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ok) calc(var(--p) * 1%), rgba(255,93,108,.38) 0); position: relative; }
.th-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #171c31; } .th-ring b { position: relative; font-size: 11px; }
.th-dt b { display: block; font-size: 20px; line-height: 1.1; } .th-dt small { color: var(--mut); font-size: 12px; }
.th-cn { grid-column: 2; display: flex; gap: 8px; font-size: 12px; font-style: normal; font-weight: 700; } .th-cn i { font-style: normal; } .th-cn .in { color: var(--ok); } .th-cn .out { color: var(--bad); }
.th-head h3 { margin: 8px 0 2px; font-size: 20px; } .th-bar { height: 10px; border-radius: 99px; background: rgba(255,93,108,.35); overflow: hidden; margin: 10px 0 14px; } .th-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), var(--cy)); border-radius: 99px; transition: width .5s; }
.th-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 640px) { .th-cols { grid-template-columns: 1fr; } }
.th-col { border-radius: 18px; border: 1px solid var(--line); background: var(--card2); overflow: hidden; } .th-col.in { border-top: 4px solid var(--ok); } .th-col.out { border-top: 4px solid var(--bad); }
.th-ch { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; } .th-ch b { flex: 1; font-size: 15px; } .th-ch em { font-style: normal; font-weight: 800; font-size: 13px; padding: 2px 10px; border-radius: 99px; background: rgba(255,255,255,.1); } .th-ch button { padding: 4px 9px; }
.th-col ul { list-style: none; margin: 0; padding: 0 8px 10px; max-height: 420px; overflow-y: auto; display: grid; gap: 4px; }
.th-col li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 14px; } .th-col li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .th-col li small { color: var(--mut); font-size: 12px; }
.th-col li .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; } .th-col.in .dot { background: var(--ok); } .th-col.out .dot { background: var(--bad); } .th-col li.none { color: var(--mut); justify-content: center; }
.th-empty { display: grid; gap: 6px; text-align: center; padding: 26px 14px; border-radius: 18px; border: 2px dashed var(--line); } .th-empty span { color: var(--mut); font-size: 14px; }

/* ---- Davomat: fayl nomi (✏ tahrirlash) ---- */
.att-fn { display: grid; gap: 6px; margin: 12px 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); }
.att-fn-l { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--mut); }
.att-fn-v { display: flex; align-items: center; gap: 8px; min-width: 0; }
.att-fn-v b { font-size: 18px; overflow-wrap: anywhere; min-width: 0; }
.att-fn-v em { font-style: normal; color: var(--mut); font-weight: 700; }
.att-fn-v input { flex: 1 1 auto; min-width: 0; margin: 0; }
.att-fn button.att-fn-ed, .att-fn button.att-fn-ok, .att-fn button.att-fn-x { flex: none; width: 38px; height: 38px; min-width: 0; padding: 0; border-radius: 10px; font-size: 17px; line-height: 1; background: rgba(255,255,255,.1); border: 1px solid var(--line); }
.att-fn button.att-fn-ok { background: var(--ok); color: #04210f; font-weight: 900; }
.att-fn button.link { justify-self: start; padding: 2px 0; font-size: 13px; }

/* ---- 3-2-1 sanoq: har raqam o'z animatsiyasi (JS cdPaint startAt'dan kechikishni hisoblaydi) — asosiy oqim band bo'lsa ham to'xtab qolmaydi ---- */
.qz-count .cd { grid-area: 1 / 1; opacity: 0; animation: cdStep 1s linear forwards; will-change: transform, opacity; }
.qz-count .cd.rd { font-size: .24em; letter-spacing: .03em; animation-name: cdReady; }
@keyframes cdStep { 0% { opacity: 1; transform: scale(1.55); } 22% { opacity: 1; transform: scale(1); } 90% { opacity: 1; transform: scale(.96); } 100% { opacity: 0; transform: scale(.88); } }
@keyframes cdReady { 0% { opacity: 0; transform: scale(.85); } 25% { opacity: 1; transform: scale(1); } 90% { opacity: 1; } 100% { opacity: 0; } }

/* ---- Transmitter taymeri: doira (halqa) + tik chiziqlar, rangi o'zgaradi ---- */
.qz-ring { --rc: var(--ok); position: relative; width: clamp(104px, 14vw, 190px); aspect-ratio: 1; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(255,255,255,.1), rgba(10,14,30,.72) 70%); box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08); }
.qz-ring[data-lv="warn"] { --rc: var(--warn); } .qz-ring[data-lv="bad"] { --rc: var(--bad); }
.qz-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.qz-ring .tk { fill: none; stroke: rgba(255,255,255,.28); stroke-width: 3; stroke-dasharray: .3 .7; }
.qz-ring .trk { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 9; }
.qz-ring .arc { fill: none; stroke: var(--rc); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; filter: drop-shadow(0 0 5px var(--rc)); transition: stroke .3s; }
.qz-ring .num { position: relative; display: grid; justify-items: center; line-height: 1; }
.qz-ring .num b { font-size: clamp(38px, 6vw, 86px); font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.qz-ring .num small { margin-top: 3px; font-size: clamp(10px, 1.1vw, 14px); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); font-weight: 700; }
.qz-ring.low .num b { color: var(--bad); animation: ringBeat 1s ease-in-out infinite; }
.qz-ring.low { animation: ringGlow 1s ease-in-out infinite; }
@keyframes ringBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
@keyframes ringGlow { 0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 0 rgba(255,93,108,.0); } 50% { box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 34px 6px rgba(255,93,108,.45); } }
@keyframes cdFlat { 0% { opacity: 1; } 99% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .qz-count .cd, .qz-count .cd.rd { animation-name: cdFlat; } .qz-ring.low, .qz-ring.low .num b { animation: none; } }

/* ---- 🏫 Markaz rejimi: sarlavhada markaz logosi + markaz nomi + «× Birlash»; logo ustiga sichqoncha kelsa (yoki telefonda bosilsa) Birlash logosi chiqadi ---- */
.logo-swap { position: relative; display: inline-flex; flex: none; width: 38px; height: 38px; }
.logo-swap #loogoi { width: 38px; height: 38px; max-width: 38px; }
.logo.center-logo .logo-swap { cursor: pointer; }
.logo.center-logo .logo-swap > img, .logo.center-logo .logo-swap > .logo-mark { position: absolute; inset: 0; width: 38px; height: 38px; margin: 0; padding: 3px; border-radius: 11px; box-sizing: border-box; transition: opacity .28s ease, transform .4s var(--ease); }
.logo.center-logo .logo-swap > #loogoi { padding: 0; opacity: 0; transform: rotate(-12deg) scale(.82); pointer-events: none; }
.logo.center-logo .logo-swap > #brandImg { opacity: 1; }
.logo.center-logo .logo-swap:hover > #loogoi, .logo.center-logo .logo-swap.peek > #loogoi, .logo.center-logo .logo-swap:focus-visible > #loogoi { opacity: 1; transform: none; }
.logo.center-logo .logo-swap:hover > #brandImg, .logo.center-logo .logo-swap.peek > #brandImg, .logo.center-logo .logo-swap:focus-visible > #brandImg { opacity: 0; transform: rotate(10deg) scale(.82); }
.logo:hover #loogoi { transform: none; }
.logo.center-logo:hover .logo-swap:not(:hover):not(.peek) > #loogoi { transform: rotate(-12deg) scale(.82); }
@media (prefers-reduced-motion: reduce) { .logo.center-logo .logo-swap > img { transition: opacity .01s; } }

/* ---- 👥 Transmitter: receiverlar doim ko'rinadigan panel (tab/menyudan qat'i nazar) ---- */
.rc-strip { padding: 10px 14px; margin: 10px 0; }
.rc-strip > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
.rc-strip > summary::-webkit-details-marker { display: none; }
.rc-ready { font-weight: 500; font-size: 12px; }
.rc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-height: 170px; overflow: auto; }
.rc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid var(--line); font-size: 13px; max-width: 100%; }
.rc-chip i { width: 8px; height: 8px; border-radius: 50%; background: #f5b84a; flex: none; } .rc-chip i.ok { background: var(--ok, #3ecf8e); }
.rc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.rc-chip button { border: 0; background: transparent; color: var(--mut); cursor: pointer; padding: 2px 6px; border-radius: 999px; font-size: 12px; }
.rc-chip button:hover { background: rgba(255,80,80,.25); color: #fff; }
.rc-strip #rcEmpty { margin: 8px 0 0; font-size: 13px; }

.rc-chip.off { opacity: .5; } .rc-chip.off i { background: #7a8099; }

/* ---- stiker to'plamlari (tablar) ---- */
.av-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.av-tabs::-webkit-scrollbar { display: none; }
.av-tab { flex: none; padding: 7px 12px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: inherit; font: 600 13px/1.1 inherit; white-space: nowrap; cursor: pointer; transition: background .2s, transform .2s; }
.av-tab.on { background: linear-gradient(135deg, #6c5ce7, #00b8d4); border-color: transparent; color: #fff; transform: translateY(-1px); }
.qg-menu-b .ai-f { display: grid; gap: 4px; } .qg-menu-b select, #qzStkPack { width: 100%; }
select:disabled { opacity: .5; }

/* ---- Transmitter ↑ / Receiver ↓ strelka belgilari ---- */
.ri { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; flex: none; }
.ri.sm { width: 1.15em; height: 1.15em; vertical-align: -.2em; }
.big .ico { width: 60px; height: 60px; border-radius: 18px; background: linear-gradient(145deg, rgba(255,255,255,.34), rgba(255,255,255,.1)); border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.big .ico .ri { width: 34px; height: 34px; color: #fff; filter: drop-shadow(0 3px 6px rgba(0,0,0,.28)); }
.side-ico { color: #fff; border: 1px solid rgba(255,255,255,.3); }
.side-ico .ri { width: 26px; height: 26px; }
.wv { opacity: .65; stroke-width: 2.6; animation: wv 1.8s ease-in-out infinite; }
.ar-u { animation: ar-up 1.8s ease-in-out infinite; }
.ar-d { animation: ar-down 1.8s ease-in-out infinite; }
@keyframes ar-up { 0%,100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }
@keyframes ar-down { 0%,100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }
@keyframes wv { 0%,100% { opacity: .25; } 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .ar-u, .ar-d, .wv { animation: none !important; } }
.big { box-shadow: 0 18px 44px rgba(40,40,160,.35), inset 0 1px 0 rgba(255,255,255,.28); }
.big b { font-size: 24px; letter-spacing: .2px; }
.big small { color: rgba(255,255,255,.86); }
.big:active { transform: translateY(-1px) scale(.99); }

/* ---- Kahoot uslubidagi savol turlari ---- */
.qc-type { width: 100%; margin: 8px 0 4px; font-weight: 700; }
.qc-note { font-size: 12.5px; margin: 6px 0; }
.qc-tf { font-weight: 700; padding: 6px 4px; }
.qc-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.qc-num { display: grid; gap: 3px; font-size: 12.5px; } .qc-num input { width: 100%; }
.qz-kind { align-self: center; padding: 5px 14px; border-radius: 999px; font-size: clamp(13px, 2.2vw, 18px); font-weight: 800; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); }
.qz-send { width: 100%; padding: 14px; font-size: 18px; font-weight: 800; border-radius: 16px; margin-top: 8px; }
.qz-stat { text-align: center; font-weight: 700; opacity: .85; margin-top: 6px; }
.qopt.poll { opacity: 1; }
.qz-wgt { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 0; padding: 6px 2px; }
.qz-wgt.locked { opacity: .6; pointer-events: none; }
.wg-big { text-align: center; font-size: clamp(22px, 5vw, 40px); font-weight: 900; padding: 18px 12px; border-radius: 20px; background: rgba(255,255,255,.08); border: 2px dashed rgba(255,255,255,.25); word-break: break-word; }
.wg-big.ok { border: 2px solid #3ddc84; background: rgba(61,220,132,.14); }
.wg-in { width: 100%; font-size: clamp(20px, 5vw, 30px); font-weight: 800; text-align: center; padding: 16px; border-radius: 18px; }
.wg-words { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wg-words .wd { padding: 6px 12px; border-radius: 999px; font-weight: 700; background: rgba(255,255,255,.1); }
.wg-words .wd.ok { background: rgba(61,220,132,.25); } .wg-words .wd.no { background: rgba(226,27,60,.25); }
.wg-val { text-align: center; font-size: clamp(40px, 10vw, 84px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.wg-rng { width: 100%; height: 44px; accent-color: #6c5ce7; touch-action: pan-y; }
.wg-lab { display: flex; justify-content: space-between; font-weight: 700; opacity: .7; }
.wg-track { position: relative; height: 18px; border-radius: 9px; background: rgba(255,255,255,.14); margin: 22px 8px 4px; }
.wg-track .band { position: absolute; top: 0; bottom: 0; background: rgba(61,220,132,.4); border-radius: 9px; min-width: 4px; }
.wg-track .tgt { position: absolute; top: -8px; width: 6px; height: 34px; margin-left: -3px; border-radius: 3px; background: #3ddc84; }
.wg-track .dot { position: absolute; top: 4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #ffd54a; opacity: .8; }
.wg-ord { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wg-ord li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.1); border-left: 8px solid #888; font-weight: 800; font-size: clamp(16px, 4vw, 26px); }
.wg-ord li.ok { background: rgba(61,220,132,.18); }
.wg-ord .no { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.3); flex: none; font-size: 15px; }
.wg-ord .tx { flex: 1; word-break: break-word; }
.wg-ord .mv { width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(255,255,255,.18); color: inherit; font-size: 18px; cursor: pointer; flex: none; }
.wg-ord .mv:disabled { opacity: .25; }
.lb .mvr { font-size: 12px; font-weight: 800; margin-left: 6px; } .lb .mvr.up { color: #3ddc84; } .lb .mvr.dn { color: #ff6b81; }

/* Receiver: ismni tahrirlash */
.my-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; min-width: 0; }
.mn-show { max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-in { flex: 1 1 140px; min-width: 0; padding: 8px 10px; }
.mn-btn { cursor: pointer; }
.mn-in.need { outline: 2px solid var(--bad, #ff6b81); }
