/* ==========================================================================
   EduSmart — Kuis Live (layar guru & HP siswa)
   ========================================================================== */
.live-body {
    --l-bg: #0f2747;
    --l-bg2: #16365f;
    --l-a: #e21b3c; --l-b: #1368ce; --l-c: #b88400; --l-d: #26890c; --l-e: #864cbf;
    --l-kuning: #f9b215;
    min-height: 100vh; min-height: 100dvh;
    background: radial-gradient(circle at 85% -10%, #1565c0 0, transparent 45%), radial-gradient(circle at 0% 110%, #2e9b3a 0, transparent 35%), var(--l-bg);
    color: #f6f8fc;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    overscroll-behavior: none;
}
.live-flash { position: relative; z-index: 5; }
.btn-live { background: var(--l-kuning); color: #14213d; font-weight: 800; border: 0; border-bottom: 4px solid #c88a00; border-radius: .9rem; padding: .7rem 1.2rem; font-size: 1.15rem; }
.btn-live:hover, .btn-live:focus { background: #ffc233; color: #14213d; }
.btn-live:active { transform: translateY(2px); border-bottom-width: 2px; }
.btn-live:disabled { opacity: .45; }

/* ---- Gabung ---------------------------------------------------------------- */
.live-gabung { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.live-gabung-kartu { width: 100%; max-width: 380px; background: #fff; color: #1e2533; border-radius: 1.25rem; padding: 28px 24px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.live-input-pin, .live-input-nama { font-size: 1.6rem; font-weight: 800; text-align: center; border: 2px solid #d5dbe5; border-radius: .9rem; padding: .6rem; }
.live-input-pin { letter-spacing: .25em; }
.live-input-nama { font-size: 1.3rem; }

/* ---- HP pemain --------------------------------------------------------------- */
.live-pemain { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.live-atas { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: rgba(0,0,0,.25); font-weight: 700; font-size: .95rem; }
.live-nama { max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-skor { background: #fff; color: #14213d; border-radius: 999px; padding: 2px 12px; }
.live-no { color: #c9d8ee; }
.live-waktu { height: 6px; background: rgba(255,255,255,.12); }
.live-waktu > div { height: 100%; width: 0; background: var(--l-kuning); transition: width .25s linear; }
.live-layar-isi { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 16px; gap: 6px; }
.live-besar { font-size: 1.8rem; font-weight: 800; line-height: 1.2; }
.live-sedang { font-size: 1.05rem; color: #dbe6f6; margin: 0; }
.live-titik { display: flex; gap: 8px; margin-top: 14px; }
.live-titik span { width: 12px; height: 12px; border-radius: 50%; background: #fff; animation: live-titik 1.2s infinite ease-in-out; }
.live-titik span:nth-child(2) { animation-delay: .15s; } .live-titik span:nth-child(3) { animation-delay: .3s; }
@keyframes live-titik { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

.live-soal { justify-content: flex-start; align-items: stretch; gap: 12px; }
.live-teks-hp { background: #fff; color: #1e2533; border-radius: 1rem; padding: 14px 16px; font-weight: 700; font-size: 1.05rem; text-align: left; white-space: pre-line; }
.live-teks-hp:empty { display: none; }
.live-opsi-hp { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 52vh; }
.live-opsi-hp.berteks { grid-template-columns: 1fr; min-height: 0; flex: 0 0 auto; }
.live-pilih { border: 0; border-radius: 1rem; color: #fff; font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left;
              box-shadow: inset 0 -5px 0 rgba(0,0,0,.22); min-height: 64px; touch-action: manipulation; }
.live-opsi-hp:not(.berteks) .live-pilih { justify-content: center; }
.live-pilih svg { flex: 0 0 auto; width: 34px; height: 34px; }
.live-opsi-hp:not(.berteks) .live-pilih svg { width: 64px; height: 64px; }
.live-pilih:active { transform: scale(.97); }
.live-pilih:disabled { opacity: .35; }
.live-pilih.dipilih { opacity: 1; outline: 4px solid #fff; }
.live-pilih .live-pilih-teks { white-space: pre-line; }
.o-A { background: var(--l-a); } .o-B { background: var(--l-b); } .o-C { background: var(--l-c); } .o-D { background: var(--l-d); } .o-E { background: var(--l-e); }

.live-hasil-ikon { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 3.4rem; background: #fff; margin-bottom: 6px; }
.live-hasil-ikon.benar { color: #15803d; animation: live-pop .45s ease-out; }
.live-hasil-ikon.salah { color: #b91c1c; animation: live-goyang .45s ease-out; }
@keyframes live-pop { 0% { transform: scale(.3); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes live-goyang { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.live-poin { font-size: 1.4rem; font-weight: 800; background: rgba(0,0,0,.28); border-radius: .8rem; padding: 4px 16px; }
.live-poin:empty, .live-beruntun:empty { display: none; }
.live-beruntun { font-weight: 700; color: var(--l-kuning); }
.live-bahas { background: rgba(255,255,255,.1); border-radius: .8rem; padding: 10px 14px; font-size: .92rem; text-align: left; max-width: 560px; white-space: pre-line; margin: 6px 0; }
.live-rank { font-size: 4.5rem; font-weight: 800; line-height: 1; color: var(--l-kuning); }
.live-papan-hp { list-style: none; padding: 0; margin: 14px 0; width: 100%; max-width: 340px; }
.live-papan-hp li { display: flex; justify-content: space-between; background: rgba(255,255,255,.1); border-radius: .7rem; padding: 8px 14px; margin-bottom: 6px; font-weight: 600; }
.live-papan-hp li.saya { background: #fff; color: #14213d; }

/* ---- Layar guru ---------------------------------------------------------------- */
.live-host { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.live-host-atas { display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: rgba(0,0,0,.25); }
.live-host-logo { background: #fff; border-radius: .6rem; padding: 3px 8px; height: 40px; width: auto; }
.live-host-judul { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-host-pin-kecil { font-size: 1.1rem; }
.live-host-isi { flex: 1; display: flex; flex-direction: column; padding: 16px clamp(16px, 3vw, 40px); gap: 14px; position: relative; }
.live-host-gabung { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(20px, 5vw, 70px); background: #fff; color: #14213d; border-radius: 1.4rem; padding: 22px 32px; align-self: center; }
.live-host-langkah { font-size: clamp(1.1rem, 2vw, 1.6rem); font-weight: 600; }
.live-host-pin { font-size: clamp(3.5rem, 9vw, 7.5rem); font-weight: 800; letter-spacing: .06em; line-height: 1; margin-top: 8px; }
.live-host-qr svg, .live-host-qr img { width: clamp(150px, 18vw, 230px); height: auto; display: block; }
.live-host-lobi-bawah { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.live-host-hitung { font-size: 1.5rem; font-weight: 800; background: rgba(0,0,0,.28); border-radius: .9rem; padding: 6px 18px; }
.live-host-chip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-content: flex-start; flex: 1; }
.live-host-chip button { border: 0; background: #fff; color: #14213d; font-weight: 800; font-size: 1.15rem; border-radius: .8rem; padding: 8px 16px; animation: live-pop .35s ease-out; }
.live-host-chip button:hover { text-decoration: line-through; background: #fde2e2; }
.live-host-soal-atas { display: flex; justify-content: space-between; align-items: center; }
.live-host-no { font-weight: 700; font-size: 1.15rem; background: rgba(0,0,0,.28); border-radius: .8rem; padding: 4px 14px; }
.live-host-jawab { display: flex; flex-direction: column; align-items: center; line-height: 1.1; background: rgba(0,0,0,.28); border-radius: .8rem; padding: 6px 14px; }
.live-host-jawab b { font-size: 1.7rem; } .live-host-jawab small { color: #c9d8ee; }
.live-host-teks { background: #fff; color: #14213d; border-radius: 1.2rem; padding: 18px 26px; font-size: clamp(1.25rem, 2.4vw, 2.2rem); font-weight: 700; text-align: center; white-space: pre-line; }
.live-host-tengah { display: flex; justify-content: center; }
.live-host-timer { width: 96px; height: 96px; border-radius: 50%; background: #7a3cc4; display: grid; place-items: center; font-size: 2.8rem; font-weight: 800; box-shadow: 0 0 0 6px rgba(255,255,255,.15); }
.live-host-timer.genting { background: #e21b3c; animation: live-pop .5s infinite alternate; }
.live-host-timer.kunci { background: #15803d; font-size: 2rem; animation: none; }
.live-host-opsi { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.live-host-ops { border-radius: 1rem; color: #fff; font-weight: 700; font-size: clamp(1.05rem, 1.8vw, 1.6rem); display: flex; align-items: center; gap: 16px; padding: 16px 20px; min-height: 84px; position: relative; overflow: hidden; box-shadow: inset 0 -6px 0 rgba(0,0,0,.2); white-space: pre-line; }
.live-host-ops svg { width: 44px; height: 44px; flex: 0 0 auto; }
.live-host-ops .bar { position: absolute; left: 0; bottom: 0; height: 6px; background: rgba(255,255,255,.85); transition: width .6s ease-out; }
.live-host-ops .jml { margin-left: auto; font-size: 1.6rem; font-weight: 800; }
.live-host-ops.redup { opacity: .32; }
.live-host-ops.kunci { outline: 4px solid #fff; outline-offset: -4px; }
.live-host-papan5 { background: rgba(0,0,0,.25); border-radius: 1rem; padding: 12px 18px; }
.live-host-papan5 ol { margin: 0; padding-left: 1.6rem; columns: 2; font-size: 1.15rem; font-weight: 700; }
.live-host-papan5 li span { color: var(--l-kuning); margin-left: 8px; }
.live-host-aksi { display: flex; justify-content: flex-end; gap: 10px; }
.live-host-aksi .btn { font-size: 1.1rem; padding: .55rem 1.4rem; }
.live-host-tabel { background: #fff; color: #14213d; border-radius: 1.2rem; padding: 10px 16px; flex: 1; overflow: auto; }
.live-host-baris { display: grid; grid-template-columns: 44px minmax(120px, 1.3fr) 2fr 90px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef1f5; font-weight: 700; }
.live-host-baris:last-child { border-bottom: 0; }
.live-host-baris .prog { height: 14px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.live-host-baris .prog > div { height: 100%; background: linear-gradient(90deg, #1565c0, #2e9b3a); transition: width .5s; }
.live-host-baris .skor { text-align: right; }
.live-host-baris .rk { color: #6b7280; }
.live-host-podium-judul { text-align: center; font-weight: 800; font-size: clamp(1.8rem, 4vw, 3rem); margin: 0; }
.live-podium { display: flex; align-items: flex-end; justify-content: center; gap: 14px; flex: 1; min-height: 300px; }
.live-podium .tiang { width: clamp(110px, 18vw, 220px); display: flex; flex-direction: column; align-items: center; animation: live-naik .9s ease-out both; }
.live-podium .tiang .nm { font-weight: 800; font-size: clamp(1rem, 2vw, 1.6rem); text-align: center; word-break: break-word; }
.live-podium .tiang .sk { color: #dbe6f6; margin-bottom: 6px; }
.live-podium .tiang .blok { width: 100%; border-radius: 1rem 1rem 0 0; display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: #14213d; }
.live-podium .j1 .blok { height: 240px; background: #f9b215; } .live-podium .j2 .blok { height: 170px; background: #d7dde6; } .live-podium .j3 .blok { height: 120px; background: #e0a26a; }
.live-podium .j1 { animation-delay: 1.4s; } .live-podium .j2 { animation-delay: .7s; } .live-podium .j3 { animation-delay: 0s; }
@keyframes live-naik { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.live-host-sisa { columns: 3; font-weight: 600; margin: 0 auto; max-width: 900px; }
.live-host-galat { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #b91c1c; color: #fff; padding: 8px 18px; border-radius: .8rem; font-weight: 600; z-index: 10; }
.live-konfeti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.live-konfeti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: live-jatuh linear forwards; }
@keyframes live-jatuh { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 640px) {
    .live-host-opsi { grid-template-columns: 1fr; }
    .live-host-papan5 ol, .live-host-sisa { columns: 1; }
    .live-host-baris { grid-template-columns: 32px 1fr 70px; }
    .live-host-baris .prog { display: none; }
    .live-host-gabung { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .live-body *, .live-body *::before, .live-body *::after { animation: none !important; transition: none !important; }
}

/* ---- Pengumuman juara (v2.10.2) ---- */
.la { overflow: hidden; justify-content: center; background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(249,178,21,.16), transparent 70%); }
.la-konfeti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.la-intro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; z-index: 2; transition: opacity .5s, transform .5s; }
.la-label { font-size: .95rem; letter-spacing: .22em; text-transform: uppercase; color: #9fb6d8; font-weight: 700; }
.la-tanya { font-size: clamp(2.6rem, 7.5vw, 6.5rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; animation: la-denyut 1.2s ease-in-out infinite alternate; }
@keyframes la-denyut { from { opacity: .55; transform: scale(.985); } to { opacity: 1; transform: scale(1); } }
.la.tampil .la-intro, .la.selesai .la-intro { opacity: 0; transform: translateY(-30px); pointer-events: none; }
.la-panggung { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 24px); align-items: end; width: min(1100px, 100%); margin: 0 auto; }
.la-kartu { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: clamp(14px, 2vw, 26px);
            border-radius: 22px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px);
            opacity: 0; transform: translateY(48px) scale(.96); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.la-kartu.muncul { opacity: 1; transform: none; }
.la-kartu.r1 { min-height: clamp(300px, 46vh, 430px); border-color: rgba(249,178,21,.7); background: linear-gradient(180deg, rgba(249,178,21,.16), rgba(249,178,21,.04)); box-shadow: 0 30px 90px rgba(249,178,21,.22); }
.la-kartu.r2 { min-height: clamp(240px, 36vh, 340px); }
.la-kartu.r3 { min-height: clamp(210px, 30vh, 290px); }
.la-kartu.r1.muncul { transition-duration: .9s; }
.la-kartu.r1.muncul::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%); transform: translateX(-120%); animation: la-kilau 2.8s 0.6s ease-in-out infinite; pointer-events: none; }
@keyframes la-kilau { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(120%); } }
.la-no { position: absolute; top: 4px; right: 14px; font-size: clamp(4rem, 9vw, 8.5rem); font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.22); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.la-kartu.r1 .la-no { -webkit-text-stroke-color: rgba(249,178,21,.8); }
.la-gelar { align-self: flex-start; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: #d7dde6; color: #14213d; }
.la-kartu.r1 .la-gelar { background: #f9b215; }
.la-kartu.r3 .la-gelar { background: #e0a26a; }
.la-nama { font-size: clamp(1.4rem, 3vw, 3rem); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; overflow-wrap: anywhere; }
.la-kartu.r1 .la-nama { font-size: clamp(1.8rem, 4vw, 3.8rem); }
.la-skor { display: flex; align-items: baseline; gap: 8px; }
.la-skor b { font-size: clamp(1.6rem, 3vw, 2.8rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.la-kartu.r1 .la-skor b { color: #f9b215; }
.la-skor span, .la-detail { color: #b9c8de; font-weight: 600; }
.la.kilat::before { content: ''; position: absolute; inset: 0; background: #fff; z-index: 5; pointer-events: none; animation: la-kilat .7s ease-out forwards; }
@keyframes la-kilat { from { opacity: .55; } to { opacity: 0; } }
.la-bawah { position: relative; z-index: 3; width: min(1100px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 14px;
            opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s; pointer-events: none; }
.la.selesai .la-bawah { opacity: 1; transform: none; pointer-events: auto; }
.la-stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.la-stat > div { border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; }
.la-stat span { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: #9fb6d8; font-weight: 700; }
.la-stat b { font-size: 1.15rem; overflow-wrap: anywhere; }
.la-sisa { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; counter-reset: sisa 3; }
.la-sisa li { counter-increment: sisa; display: flex; gap: 8px; align-items: baseline; background: rgba(255,255,255,.07); border-radius: 999px; padding: 5px 14px; font-weight: 600; }
.la-sisa li::before { content: counter(sisa); color: #9fb6d8; font-weight: 800; }
.la-sisa li b { color: #dbe6f6; font-variant-numeric: tabular-nums; }
.la-lewati { position: absolute; right: 18px; bottom: 14px; z-index: 6; background: none; border: 0; color: #9fb6d8; font-size: .85rem; text-decoration: underline; }
.la.selesai .la-lewati { display: none; }
.la-buka-suara { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20; border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 700; background: #f9b215; color: #14213d; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
@media (max-width: 640px) {
    .la-panggung { grid-template-columns: 1fr; }
    .la-kartu { min-height: 0 !important; }
    .la-kartu.r1 { order: -1; }
}
/* HP: kartu hasil akhir */
#v-akhir { position: relative; }
.hp-akhir { position: relative; z-index: 2; width: 100%; max-width: 360px; border-radius: 22px; padding: 22px 20px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); }
.hp-akhir.m1 { border-color: rgba(249,178,21,.8); background: linear-gradient(180deg, rgba(249,178,21,.2), rgba(249,178,21,.05)); }
.hp-akhir.m2 { border-color: rgba(215,221,230,.8); }
.hp-akhir.m3 { border-color: rgba(224,162,106,.8); }
.hp-label { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: #9fb6d8; font-weight: 700; }
.hp-rank { display: flex; justify-content: center; align-items: flex-start; line-height: .9; margin: 6px 0 4px; }
.hp-rank span { font-size: 2rem; font-weight: 800; color: #9fb6d8; margin-top: .4rem; }
.hp-rank b { font-size: 6rem; font-weight: 800; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.hp-akhir.m1 .hp-rank b { color: #f9b215; } .hp-akhir.m2 .hp-rank b { color: #e3e8ef; } .hp-akhir.m3 .hp-rank b { color: #e0a26a; }
.hp-pesan { font-weight: 600; color: #dbe6f6; min-height: 1.5em; }
.hp-baris { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.hp-baris div { display: flex; flex-direction: column; }
.hp-baris b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.hp-baris span { font-size: .75rem; color: #9fb6d8; text-transform: uppercase; letter-spacing: .08em; }
.hp-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.12); margin-top: 14px; overflow: hidden; }
.hp-bar > div { height: 100%; width: 0; background: #f9b215; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
