/* ===== KENO (Royale Violet) — 40-ball grid, pick & draw ===== */

.keno-stage {
    --acc: #8b5cf6;
    width: 100%;
    max-width: 356px;
    margin: 0 auto;
    background:
        radial-gradient(120% 60% at 50% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(245, 196, 81, 0.22);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 12px;
}

.keno-info {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
/* reuses the .mstat pill shell (self-contained copy of mines' style) */
.keno-stage .mstat {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(245, 196, 81, 0.16);
    border-radius: 12px;
    padding: 6px 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.keno-stage .mstat-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a79fc2;
    font-variant-numeric: tabular-nums;
}
.keno-stage .mstat-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f5f0ff;
    font-variant-numeric: tabular-nums;
    min-height: 1.2em;
}
.keno-stage .mstat-gold {
    background: linear-gradient(180deg, #ffe9a8, #f5c451 55%, #c98f1f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
#keno-picks-list { font-size: 0.72rem; line-height: 1.35; word-break: break-word; }

/* 8 columns × 5 rows of balls — fits 375x667 without scrolling */
.keno-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}
.keno-cell {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03) 65%);
    color: #f5f0ff;
    font-size: 0.78rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.keno-cell:active { transform: scale(0.88); }
/* picked by the player — violet ball */
.keno-cell.picked {
    background: radial-gradient(circle at 35% 30%, #a78bfa, #6d28d9 70%);
    border-color: rgba(196, 181, 253, 0.8);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    color: #fff;
}
/* drawn, not picked — dim gold outline */
.keno-cell.drawn {
    border-color: rgba(245, 196, 81, 0.55);
    background: radial-gradient(circle at 35% 30%, rgba(245, 196, 81, 0.28), rgba(245, 196, 81, 0.08) 70%);
    color: #ffe9a8;
}
/* HIT — gold ball, pops */
.keno-cell.hit {
    background: radial-gradient(circle at 35% 30%, #ffe9a8, #e8a91c 60%, #b9822a);
    border-color: #fff0c2;
    color: #2a1a00;
    box-shadow: 0 0 16px rgba(245, 196, 81, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: keno-hit 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.5);
}
@keyframes keno-hit {
    0% { transform: scale(0.6); }
    60% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

@media (max-height: 700px) {
    .keno-grid { gap: 5px; }
    .keno-info { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .keno-cell.hit { animation: none !important; }
}
