/* blackjack.css — Fruggia Blackjack */

.bj-wrap {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: flex-start;
}

/* ── Table ────────────────────────────────────────────────────────────────── */
.bj-table {
    background: #166534;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 340px;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    position: relative;
}

.bj-area-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.55);
    margin-bottom: .3rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.bj-score {
    font-size: .8rem;
    font-weight: 700;
    background: rgba(0,0,0,.25);
    color: #fff;
    padding: 1px 7px;
    border-radius: 20px;
}

/* ── Message bar ──────────────────────────────────────────────────────────── */
.bj-msg {
    display: none;
    text-align: center;
    padding: .5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: .9rem;
}
.bj-msg--win  { background: #14532d; color: #bbf7d0; }
.bj-msg--lose { background: #7f1d1d; color: #fecaca; }
.bj-msg--info { background: rgba(0,0,0,.25); color: #e2e8f0; }

/* ── Controls ─────────────────────────────────────────────────────────────── */
.bj-controls {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.bj-bet-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
}

.bj-bet-btn {
    background: #ca8a04;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.2);
    transition: background .12s, transform .1s;
    flex-shrink: 0;
}
.bj-bet-btn:hover:not(:disabled) { background: #a16207; transform: translateY(-1px); }
.bj-bet-btn:disabled { opacity: .4; cursor: default; }

.bj-bet-btn[data-amount="10"]  { background: #dc2626; }
.bj-bet-btn[data-amount="10"]:hover:not(:disabled)  { background: #b91c1c; }
.bj-bet-btn[data-amount="25"]  { background: #16a34a; }
.bj-bet-btn[data-amount="25"]:hover:not(:disabled)  { background: #15803d; }
.bj-bet-btn[data-amount="50"]  { background: #2563eb; }
.bj-bet-btn[data-amount="50"]:hover:not(:disabled)  { background: #1d4ed8; }
.bj-bet-btn[data-amount="100"] { background: #7c3aed; }
.bj-bet-btn[data-amount="100"]:hover:not(:disabled) { background: #6d28d9; }

.bj-btn-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.bj-btn {
    flex: 1 1 auto;
    padding: .55rem .5rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
    transition: background .12s, opacity .12s;
}
.bj-btn:disabled { opacity: .35; cursor: default; }

#bj-deal   { background: #f59e0b; color: #1c1917; }
#bj-deal:hover:not(:disabled)   { background: #d97706; }
#bj-hit    { background: #22c55e; color: #14532d; }
#bj-hit:hover:not(:disabled)    { background: #16a34a; color: #fff; }
#bj-stand  { background: #ef4444; color: #fff; }
#bj-stand:hover:not(:disabled)  { background: #dc2626; }
#bj-double { background: #8b5cf6; color: #fff; }
#bj-double:hover:not(:disabled) { background: #7c3aed; }
#bj-clear-bet { background: rgba(255,255,255,.15); color: #f1f5f9; flex: 0 0 auto; padding: .55rem .9rem; }
#bj-clear-bet:hover:not(:disabled) { background: rgba(255,255,255,.25); }

/* ── Side column ──────────────────────────────────────────────────────────── */
.bj-side {
    flex: 0 0 auto;
    width: 150px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bj-how {
    font-size: .78rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.6;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: .75rem 1rem;
}
.bj-how strong { display: block; margin-bottom: .3rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }

/* ── Dark theme ───────────────────────────────────────────────────────────── */
[data-theme="dark"] .stat-box { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .stat-box .value { color: #f1f5f9; }
[data-theme="dark"] .bj-how { border-color: #334155; }

@media (max-width: 520px) {
    .bj-table { min-width: unset; width: 100%; }
    .bj-side  { flex-direction: row; width: 100%; flex-wrap: wrap; }
    .bj-side .stat-box { flex: 1 1 auto; }
}
