/* Basket (🏀) — dvorana, canvas fizika. Prefiks .bk- */

:root {
    --text: #fdf3e7;
    --text-dim: #c4ab8e;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-bd: rgba(255, 255, 255, 0.13);
    --accent: #ff9f43;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: radial-gradient(ellipse at 50% -10%, #3a2413 0%, #241507 45%, #120a04 100%);
    overflow-x: hidden;
    overscroll-behavior: none;
}
body::before {
    content: '';
    position: fixed; inset: -20%; z-index: -1; pointer-events: none;
    background: radial-gradient(circle at 20% 8%, rgba(255, 190, 110, 0.14), transparent 32%),
                radial-gradient(circle at 80% 8%, rgba(255, 190, 110, 0.14), transparent 32%),
                radial-gradient(circle at 50% 100%, rgba(255, 130, 40, 0.12), transparent 55%);
    filter: blur(30px);
}

.bk-app {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
}

/* ---------- Vrh ---------- */
.bk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bk-top__btns { display: flex; gap: 8px; }
.bk-iconbtn {
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    color: var(--text); background: var(--surface); border: 1px solid var(--surface-bd);
    border-radius: 14px; cursor: pointer; text-decoration: none;
    backdrop-filter: blur(8px);
    transition: background 0.15s ease, transform 0.15s ease;
}
.bk-iconbtn:hover { background: rgba(255, 255, 255, 0.13); transform: translateY(-1px); }

.bk-title {
    margin: 0; text-align: center; font-size: 25px; font-weight: 900; letter-spacing: 0.5px;
    text-shadow: 0 2px 18px rgba(255, 159, 67, 0.4);
}

/* ---------- HUD ---------- */
.bk-hud { display: flex; align-items: center; gap: 8px; }
.bk-hud__chip {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 12px; border-radius: 12px;
    font-size: 12px; font-weight: 700; color: var(--text-dim);
    background: var(--surface); border: 1px solid var(--surface-bd);
    backdrop-filter: blur(8px);
}
.bk-hud__chip b { font-size: 17px; color: var(--text); }
.bk-hud__chip--streak { color: #ffd86b; border-color: rgba(255, 216, 107, 0.4); }
.bk-hud__chip--streak b { color: #ffd86b; }
.bk-hud__lives { margin-left: auto; font-size: 15px; letter-spacing: 2px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }

/* ---------- Teren ---------- */
.bk-court {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
#bkCanvas { display: block; width: 100%; touch-action: none; cursor: crosshair; }

/* poeni-poruka preko terena (+2 / +3 SVISH / promašaj) */
.bk-toast {
    position: absolute; left: 50%; top: 38%;
    transform: translate(-50%, -50%);
    font-size: 34px; font-weight: 900; letter-spacing: 1px;
    pointer-events: none; white-space: nowrap;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
    animation: bkToast 1s ease forwards;
}
.bk-toast--good { color: #7dffb9; }
.bk-toast--swish { color: #ffd86b; }
.bk-toast--bad { color: #ff9d9d; font-size: 26px; }
@keyframes bkToast {
    0% { opacity: 0; transform: translate(-50%, -30%) scale(0.7); }
    25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    75% { opacity: 1; transform: translate(-50%, -60%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -80%) scale(0.95); }
}

.bk-adbanner {
    min-height: 56px; display: flex; align-items: center; justify-content: center;
    border: 1px dashed var(--surface-bd); border-radius: 14px;
    color: var(--text-dim); font-size: 12px;
}

/* ---------- Overlays / kartice ---------- */
.bk-overlay {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    background: rgba(10, 5, 2, 0.82);
    backdrop-filter: blur(9px);
    animation: bkFade 0.25s ease;
}
.bk-overlay[hidden] { display: none; }
@keyframes bkFade { from { opacity: 0; } to { opacity: 1; } }
.bk-card {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    min-width: 290px; max-width: 340px;
    padding: 28px 30px; border-radius: 26px; text-align: center;
    background: linear-gradient(160deg, #3c2712, #1c0f05);
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: bkCard 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bkCard {
    from { opacity: 0; transform: scale(0.85) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.bk-card h2 { margin: 0; font-size: 24px; font-weight: 900; }
.bk-card__sub { margin: 0; font-size: 13px; color: var(--text-dim); }
.bk-card__hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.bk-card__score { font-size: 46px; font-weight: 900; line-height: 1; color: var(--accent); text-shadow: 0 0 24px rgba(255, 159, 67, 0.5); }
.bk-card__badge {
    padding: 4px 14px; border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
    color: #241505; background: linear-gradient(90deg, #ffd86b, #ff9f43);
}
.bk-btn {
    width: 100%; padding: 13px 18px;
    font-size: 16px; font-weight: 800; color: #241505;
    border: none; border-radius: 14px; cursor: pointer;
    background: linear-gradient(135deg, #ffb75e 0%, #ff8a2b 100%);
    box-shadow: 0 10px 24px rgba(255, 159, 67, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bk-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255, 159, 67, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.bk-btn:active { transform: translateY(0); }
.bk-btn--ghost { color: var(--text); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--surface-bd); box-shadow: none; }
.bk-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); box-shadow: none; }
.bk-btn small { font-weight: 600; opacity: 0.75; }
