/* ── Floating Button ── */
#bgm-open-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: #1e1e2e;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0,0,0,.45);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
#bgm-open-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 24px rgba(0,0,0,.55);
}

/* ── Overlay ── */
#bgm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}
#bgm-overlay.bgm-visible {
    display: flex;
}

/* ── Modal ── */
#bgm-modal {
    position: relative;
    background: #1e1e2e;
    border-radius: 16px;
    padding: 28px 32px 32px;
    text-align: center;
    color: #cdd6f4;
    box-shadow: 0 16px 60px rgba(0,0,0,.7);
    user-select: none;
    min-width: 340px;
}
#bgm-modal h2 {
    margin: 0 0 4px;
    font-size: 1.3rem;
    color: #cba6f7;
}
.bgm-hint {
    margin: 0 0 16px;
    font-size: .85rem;
    opacity: .7;
}

/* ── Close button ── */
#bgm-close-btn {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: #cdd6f4;
    font-size: 18px;
    cursor: pointer;
    opacity: .6;
    transition: opacity .15s;
    line-height: 1;
    padding: 4px;
}
#bgm-close-btn:hover { opacity: 1; }

/* ── Arena ── */
#bgm-arena {
    position: relative;
    width: 480px;
    height: 320px;
    background: #181825;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #313244;
    margin: 0 auto;
}

/* ── Ball ── */
#bgm-ball {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #f38ba8, #e64553);
    box-shadow: 0 4px 14px rgba(230,69,83,.5);
    transform: translate(-50%, -50%);
    transition: left .05s linear, top .05s linear;
}

/* ── Mobile ── */
@media (max-width: 540px) {
    #bgm-arena { width: 290px; height: 220px; }
    #bgm-modal { padding: 20px 16px 24px; min-width: unset; }
}
