@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&display=swap");
.kql-app {
font-family: 'Nunito', sans-serif;
max-width: 900px;
margin: 0 auto;
background: linear-gradient(135deg, #fce7f3, #e0e7ff, #dcfce7, #fef3c7);
background-size: 200% 200%;
animation: kqlbg 14s ease infinite;
border-radius: 26px;
padding: 22px;
color: #1e293b;
box-shadow: 0 18px 42px rgba(30, 41, 59, .14);
position: relative; }
@keyframes kqlbg { 0% { background-position: 0% 50% } 50% { background-position: 100% 50% } 100% { background-position: 0% 50% } }
.kql-screen { display: none; }
.kql-screen.active { display: block; }
.kql-portal { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kql-card { background: #f8fafc; border: 2.5px solid #e2e8f0; border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.kql-card-join { background: linear-gradient(180deg, #f5f3ff, #fdf2f8); border-color: #d8b4fe; }
.kql-icon { font-size: 2.2rem; }
.kql-card h2 { font-size: 1.15rem; font-weight: 900; margin: 0; }
.kql-card p { font-size: .84rem; font-weight: 700; color: #64748b; margin: 0; }
.kql-card label { font-size: .76rem; font-weight: 900; text-transform: uppercase; color: #475569; }
.kql-card input { width: 100%; padding: 10px 13px; border-radius: 12px; border: 2px solid #cbd5e1; font-size: .96rem; font-weight: 800; outline: none; box-sizing: border-box; }
.kql-card input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, .15); }
.kql-pin { text-align: center; font-size: 1.35rem; letter-spacing: .2em; font-weight: 900; }
.kql-btn { width: 100%; padding: 13px 16px; border: none; border-radius: 14px; font-size: 1rem; font-weight: 900; cursor: pointer; font-family: inherit; }
.kql-btn-primary { background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6); color: #fff; box-shadow: 0 6px 16px rgba(139, 92, 246, .28); }
.kql-btn-primary:hover { filter: brightness(1.06); transform: translateY(-2px); }
.kql-btn-secondary { background: #fff; color: #1e293b; border: 2px solid #cbd5e1; margin-top: 10px; }
.kql-btn:disabled { opacity: .55; cursor: not-allowed; }
.kql-error { color: #dc2626; font-size: .82rem; font-weight: 800; min-height: 20px; }
.kql-lobby-box { background: linear-gradient(135deg, #4f46e5, #9333ea, #db2777); color: #fff; border-radius: 20px; padding: 18px 20px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.kql-lobby-pin-info { flex: 1; text-align: center; }
.kql-lobby-label { font-size: .8rem; font-weight: 800; text-transform: uppercase; opacity: .9; }
.kql-lobby-code { font-size: 2.6rem; font-weight: 900; letter-spacing: .16em; margin: 2px 0 8px; }
.kql-copy { background: rgba(255, 255, 255, .2); border: 1.5px solid rgba(255, 255, 255, .5); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: .82rem; font-weight: 800; cursor: pointer; }
.kql-qr-box { background: #fff; padding: 10px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; }
#kql-qr img, #kql-qr canvas { width: 118px !important; height: 118px !important; }
.kql-qr-cap { font-size: .72rem; font-weight: 900; color: #4f46e5; text-transform: uppercase; margin-top: 6px; }
.kql-players-title { text-align: center; font-weight: 900; font-size: .95rem; margin: 10px 0; }
.kql-players-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 74px; padding: 14px; background: #f8fafc; border: 2px dashed #cbd5e1; border-radius: 16px; margin-bottom: 16px; }
.kql-player-chip { background: #fff; border: 2px solid #c4b5fd; color: #4c1d95; padding: 7px 14px; border-radius: 999px; font-size: .92rem; font-weight: 900; }
#kql-guest-wait { text-align: center; padding: 12px; background: #f5f3ff; border-radius: 14px; font-weight: 800; color: #5b21b6; margin-bottom: 10px; }
.kql-topbar { display: flex; justify-content: space-between; margin-bottom: 10px; gap: 8px; flex-wrap: wrap; }
.kql-badge { padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 900; background: #eef2ff; color: #4338ca; }
.kql-timer { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.kql-timer-track { flex: 1; height: 11px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.kql-timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #10b981, #3b82f6, #8b5cf6); border-radius: 999px; transition: width .2s linear; }
.kql-timer-fill.warning { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.kql-timer-text { font-size: .88rem; font-weight: 900; min-width: 44px; text-align: right; }
.kql-hud { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.kql-hud-card { border-radius: 14px; padding: 8px; text-align: center; color: #fff; }
.kql-hud-score { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.kql-hud-streak { background: linear-gradient(135deg, #f59e0b, #d97706); }
.kql-hud-lbl { font-size: .66rem; text-transform: uppercase; font-weight: 800; opacity: .92; display: block; }
.kql-hud-val { font-size: 1.08rem; font-weight: 900; }
.kql-question-box { background: #fff; border: 2px solid #e2e8f0; border-radius: 20px; padding: 20px; margin-bottom: 14px; text-align: center; }
.kql-q-text { font-size: 1.25rem; font-weight: 900; line-height: 1.4; }
.kql-answers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.kql-answer-btn { padding: 16px; border: none; border-radius: 14px; font-size: 1rem; font-weight: 900; color: #fff; cursor: pointer; font-family: inherit; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); text-align: left; height: auto; min-height: 80px; }
.kql-answer-btn:nth-child(1) { background: linear-gradient(180deg, #ef4444, #dc2626); }
.kql-answer-btn:nth-child(2) { background: linear-gradient(180deg, #3b82f6, #2563eb); }
.kql-answer-btn:nth-child(3) { background: linear-gradient(180deg, #f59e0b, #d97706); }
.kql-answer-btn:nth-child(4) { background: linear-gradient(180deg, #10b981, #059669); }
.kql-answer-btn.correct { background: #22c55e !important; }
.kql-answer-btn.wrong { background: #94a3b8 !important; opacity: .6; }
.kql-answer-btn:disabled { cursor: default; }
.kql-feedback { display: none; border-radius: 14px; padding: 11px 14px; margin-bottom: 12px; text-align: center; font-weight: 800; }
.kql-feedback.show { display: block; }
.kql-feedback.win { background: #dcfce7; border: 2px solid #22c55e; color: #166534; }
.kql-feedback.lose { background: #fee2e2; border: 2px solid #ef4444; color: #991b1b; }
.kql-live-board { background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 16px; padding: 12px 14px; }
.kql-live-title { font-size: .8rem; font-weight: 900; text-transform: uppercase; color: #64748b; margin-bottom: 8px; }
.kql-board-row { display: flex; justify-content: space-between; padding: 7px 10px; background: #fff; border-radius: 10px; margin-bottom: 6px; border: 1.5px solid #e2e8f0; font-size: .88rem; font-weight: 800; }
.kql-board-row.me { border-color: #8b5cf6; background: #f5f3ff; }
.kql-trophy { font-size: 4rem; text-align: center; }
.kql-podium-list { max-width: 440px; margin: 16px auto 20px; display: flex; flex-direction: column; gap: 10px; }
.kql-podium-item { display: flex; justify-content: space-between; padding: 12px 16px; border-radius: 16px; background: #f8fafc; border: 2px solid #e2e8f0; font-weight: 900; }
.kql-podium-item.rank-1 { background: linear-gradient(135deg, #fef3c7, #fde68a); border-color: #f59e0b; font-size: 1.12rem; }
.kql-podium-item.rank-2 { background: #f1f5f9; border-color: #94a3b8; }
.kql-podium-item.rank-3 { background: #ffedd5; border-color: #fb923c; }
@media(max-width: 620px) { 
.kql-portal, .kql-answers-grid { grid-template-columns: 1fr; } 
.kql-lobby-box { flex-direction: column; } 
}