/* ================= MINIGAME TÂNG BÓNG (tiền tố kp-) ================= */
#kp-overlay { position: fixed; inset: 0; z-index: 9000; background: #0d1442; display: none; font-family: 'Tahoma','Segoe UI',sans-serif; color: #fff; touch-action: none; -webkit-user-select: none; user-select: none; }
#kp-overlay.kp-open { display: block; }
#kp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.kp-hud { position: absolute; inset: 0; pointer-events: none; }
.kp-panel {
    position: absolute; top: max(12px, env(safe-area-inset-top)); left: max(12px, env(safe-area-inset-left));
    min-width: 230px; padding: 10px 14px 12px; border-radius: 14px;
    background: rgba(13,20,66,.72); border: 2px solid rgba(255,255,255,.35);
    box-shadow: 0 6px 18px rgba(0,0,0,.35); backdrop-filter: blur(3px);
}
.kp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.kp-lbl { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; opacity: .8; }
#kp-score { font-size: 46px; font-weight: 800; line-height: 1; text-shadow: 0 2px 0 rgba(0,0,0,.4); transition: transform .08s; }
#kp-score.kp-pop { transform: scale(1.18); }
#kp-best { font-size: 20px; font-weight: 700; color: #ffd54f; }
.kp-aura-row { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
#kp-aura-badge { padding: 2px 10px; border-radius: 999px; color: #101010; background: #9aa4b8; box-shadow: 0 0 10px var(--kp-aura, #9aa4b8); }
.kp-bar { margin-top: 6px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; }
#kp-bar-fill { display: block; height: 100%; width: 0; background: #9aa4b8; transition: width .15s; }
#kp-next { display: block; margin-top: 3px; font-size: 11px; opacity: .75; }
.kp-actions { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); display: flex; gap: 8px; pointer-events: auto; }
.kp-btn { appearance: none; border: 2px solid #fff; border-radius: 10px; padding: 9px 14px; min-height: 40px; font: bold 14px 'Tahoma',sans-serif; color: #fff; cursor: pointer; background: #3949ab; box-shadow: 0 3px 0 #1a237e; }
.kp-btn:hover { background: #5c6bc0; }
.kp-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #1a237e; }
.kp-btn.kp-gold { background: #f9a825; color: #1a1a1a; border-color: #fff8e1; box-shadow: 0 3px 0 #b36b00; }
.kp-hint { position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); font-size: 13px; padding: 5px 12px; border-radius: 999px; background: rgba(13,20,66,.6); opacity: .9; white-space: nowrap; }
#kp-center { position: absolute; left: 50%; top: 42%; transform: translate(-50%,-50%); text-align: center; pointer-events: none; width: min(92vw, 420px); }
.kp-card { pointer-events: auto; padding: 20px 22px; border-radius: 18px; background: rgba(13,20,66,.86); border: 3px solid #fff; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.kp-card.kp-through { pointer-events: none; }
.kp-card h2 { font-size: 26px; margin-bottom: 6px; }
.kp-card p { font-size: 15px; line-height: 1.45; margin: 4px 0; }
.kp-card .kp-big { font-size: 56px; font-weight: 800; color: #ffd54f; line-height: 1.1; }
.kp-card .kp-btns { margin-top: 14px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#kp-modal { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(5,8,30,.7); padding: 12px; }
#kp-modal.kp-open { display: flex; }
.kp-modal-box { width: min(94vw, 520px); max-height: 86vh; overflow: auto; background: #eef3fa; color: #0d1442; border: 3px solid #1a237e; border-radius: 14px; box-shadow: 0 12px 36px rgba(0,0,0,.55); }
.kp-modal-title { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: #1a237e; color: #fff; font-weight: 800; font-size: 17px; position: sticky; top: 0; }
.kp-modal-title button { border: 2px solid #fff; background: #c62828; color: #fff; border-radius: 6px; font-weight: 800; width: 32px; height: 28px; cursor: pointer; }
.kp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.kp-table th { background: #c5cae9; padding: 8px; text-align: center; }
.kp-table td { padding: 8px; text-align: center; border-bottom: 1px solid #c5cae9; }
.kp-table tr:nth-child(even) td { background: #f5f7fd; }
.kp-table td.kp-best { font-weight: 800; color: #c77800; }
.kp-empty { padding: 26px; text-align: center; opacity: .7; }
.kp-chip { display: inline-block; padding: 1px 10px; border-radius: 999px; font-weight: 700; color: #111; }
#kp-prompt {
    position: fixed; z-index: 24; transform: translate(-50%,-100%); white-space: nowrap; cursor: pointer; touch-action: manipulation;
    padding: 6px 12px; border-radius: 999px; border: 2px solid #fff; background: #2e7d32; color: #fff;
    font: bold 13px 'Tahoma',sans-serif; box-shadow: 0 3px 0 #1b5e20; animation: kp-pulse 1.4s ease-in-out infinite alternate;
}
#kp-prompt[hidden] { display: none; }
@keyframes kp-pulse { from { opacity: .7; } to { opacity: 1; } }
@media (max-width: 560px) { .kp-panel { min-width: 170px; padding: 8px 10px; } #kp-score { font-size: 34px; } .kp-btn { padding: 7px 10px; font-size: 13px; } .kp-hint { font-size: 11px; } }
