.ww-bmen-wrap {
    --ww-bmen-size-desktop: 58px;
    --ww-bmen-size-tablet: 54px;
    --ww-bmen-size-phone: 50px;
    --ww-bmen-size: var(--ww-bmen-size-desktop);
    position: fixed;
    right: max(22px, env(safe-area-inset-right));
    bottom: max(22px, env(safe-area-inset-bottom));
    z-index: 999999;
    width: var(--ww-bmen-size);
    height: var(--ww-bmen-size);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

.ww-bmen-button {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1877f2;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .12);
    text-decoration: none !important;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,.92);
    transition: transform .18s ease, box-shadow .18s ease;
    -webkit-tap-highlight-color: transparent;
    cursor: grab;
    touch-action: none;
    box-sizing: border-box;
}

.ww-bmen-button:hover,
.ww-bmen-button:focus-visible {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28), 0 3px 8px rgba(0, 0, 0, .12);
    outline: none;
}

.ww-bmen-wrap.is-dragging .ww-bmen-button {
    cursor: grabbing;
    transform: scale(1.04);
    transition: none;
}

.ww-bmen-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(24,119,242,.25), 0 10px 30px rgba(0,0,0,.28);
}

.ww-bmen-default-icon {
    width: 100%;
    height: 100%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ww-bmen-default-icon svg {
    width: 52%;
    height: 52%;
    fill: currentColor;
    opacity: .96;
}

.ww-bmen-code {
    position: absolute;
    right: 5%;
    bottom: 7%;
    min-width: 40%;
    height: 31%;
    padding: 0 5%;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #1877f2;
    font-size: clamp(8px, calc(var(--ww-bmen-size) * .16), 15px);
    line-height: 1;
    font-weight: 800;
    letter-spacing: .2px;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    box-sizing: border-box;
}

.ww-bmen-custom-icon {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    pointer-events: none;
}

.ww-bmen-tooltip {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translate(8px, -50%);
    max-width: 180px;
    white-space: nowrap;
    background: rgba(20, 24, 32, .94);
    color: #fff;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    box-shadow: 0 5px 18px rgba(0,0,0,.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.ww-bmen-wrap.is-left-side .ww-bmen-tooltip {
    right: auto;
    left: calc(100% + 10px);
    transform: translate(-8px, -50%);
}

.ww-bmen-wrap:hover .ww-bmen-tooltip,
.ww-bmen-wrap:focus-within .ww-bmen-tooltip {
    opacity: 1;
    transform: translate(0, -50%);
}

.ww-bmen-wrap.is-dragging .ww-bmen-tooltip {
    opacity: 0;
}


@media (min-width: 768px) and (max-width: 1024px) {
    .ww-bmen-wrap {
        --ww-bmen-size: var(--ww-bmen-size-tablet);
    }
}

@media (max-width: 767px) {
    .ww-bmen-wrap {
        --ww-bmen-size: var(--ww-bmen-size-phone);
    }
}

@media (max-width: 767px) {
    .ww-bmen-tooltip {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ww-bmen-button,
    .ww-bmen-tooltip {
        transition: none;
    }
}

.ww-bmen-wrap.is-bouncing .ww-bmen-button {
    transition: none;
}

.ww-bmen-wrap.is-bouncing .ww-bmen-tooltip {
    opacity: 0;
}

/* Mini Air Hockey — Idea Afiq bin Tariq */
/* Mini Air Hockey — Idea Afiq bin Tariq */
.ww-bmen-hockey-trigger {
    position: fixed;
    z-index: 999998;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0 !important;
    outline: 0;
    border-radius: 50%;
    background: transparent !important;
    box-shadow: none !important;
    cursor: default;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity .2s ease, transform .2s ease;
}

.ww-bmen-hockey-trigger:focus,
.ww-bmen-hockey-trigger:active {
    border: 0 !important;
    outline: 0;
    background: transparent !important;
    box-shadow: none !important;
}

.ww-bmen-hockey-trigger:focus-visible > span {
    box-shadow: 0 0 0 3px rgba(255,153,0,.26), 0 0 18px rgba(255,145,0,.82), 0 6px 16px rgba(0,0,0,.22);
}

.ww-bmen-hockey-trigger > span {
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 28%, #fff3d6 0 14%, #ffbd5a 34%, #ff8a00 68%, #db5f00 100%);
    border: 0;
    box-shadow: 0 0 10px rgba(255,145,0,.74), 0 0 24px rgba(255,122,0,.40), 0 6px 16px rgba(0,0,0,.20), inset 0 1px 2px rgba(255,245,220,.88);
    will-change: transform, box-shadow;
}

/* Tiada label/kotak di sekeliling bola pencetus. */
.ww-bmen-hockey-trigger::before,
.ww-bmen-hockey-trigger::after {
    content: none !important;
    display: none !important;
}

.ww-bmen-hockey-trigger:not(.is-hidden) > span {
    animation: ww-bmen-puck-float 3.4s ease-in-out infinite;
}

.ww-bmen-hockey-trigger.is-hit {
    transform: scale(1.35);
    opacity: 0;
}

.ww-bmen-hockey-trigger.is-hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes ww-bmen-puck-float {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        box-shadow: 0 0 9px rgba(255,145,0,.68), 0 0 20px rgba(255,122,0,.30), 0 6px 16px rgba(0,0,0,.20), inset 0 1px 2px rgba(255,245,220,.88);
    }
    50% {
        transform: translate3d(0, -5px, 0) scale(1.025);
        box-shadow: 0 0 15px rgba(255,145,0,.90), 0 0 30px rgba(255,122,0,.46), 0 10px 18px rgba(0,0,0,.16), inset 0 1px 2px rgba(255,245,220,.95);
    }
}

body.ww-bmen-hockey-open {
    overflow: hidden !important;
}

.ww-bmen-hockey-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
    box-sizing: border-box;
}

.ww-bmen-hockey-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ww-bmen-hockey-stage {
    width: min(92vw, 620px);
    height: min(90vh, 820px);
    min-height: 480px;
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    overflow: hidden;
    background: transparent;
    border: 1px solid rgba(255,255,255,.24);
    box-shadow: none;
    transform: scale(.95);
    transition: transform .25s cubic-bezier(.2,.75,.25,1);
}

.ww-bmen-hockey-overlay.is-active .ww-bmen-hockey-stage {
    transform: scale(1);
}

.ww-bmen-hockey-hud {
    min-height: 62px;
    padding: 10px 14px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    color: #fff;
    background: rgba(8,17,29,.46);
    box-sizing: border-box;
}

.ww-bmen-hockey-credit {
    font-size: 11px;
    font-weight: 650;
    opacity: .68;
}

.ww-bmen-hockey-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.ww-bmen-hockey-score b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 10px;
    background: #fff;
    color: #08111d;
    font-size: 18px;
    box-sizing: border-box;
}

.ww-bmen-hockey-score-sep { opacity: .45; }

.ww-bmen-hockey-close {
    justify-self: end;
    width: 38px;
    height: 38px;
    border: 2px solid #b91c1c !important;
    border-radius: 50%;
    background: #dc2626 !important;
    background-color: #dc2626 !important;
    color: #fff !important;
    opacity: 1 !important;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(127, 29, 29, .35) !important;
    transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.ww-bmen-hockey-close:hover,
.ww-bmen-hockey-close:focus-visible,
.ww-bmen-hockey-close:active {
    background: #b91c1c !important;
    background-color: #b91c1c !important;
    color: #fff !important;
    opacity: 1 !important;
    box-shadow: 0 5px 16px rgba(127, 29, 29, .45) !important;
    outline: 2px solid rgba(255,255,255,.82);
    outline-offset: 2px;
}

.ww-bmen-hockey-close:hover {
    transform: scale(1.06);
}

.ww-bmen-hockey-rink {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    touch-action: none;
    background: transparent;
    border-left: 3px solid rgba(10,109,168,.82);
    border-right: 3px solid rgba(10,109,168,.82);
    border-top: 0;
    border-bottom: 0;
    box-shadow: inset 0 0 28px rgba(0,50,90,.08);
    box-sizing: border-box;
}

.ww-bmen-hockey-rink::before,
.ww-bmen-hockey-rink::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    transform: none;
    background: linear-gradient(90deg, rgba(10,109,168,.82) 0 31%, transparent 31% 69%, rgba(10,109,168,.82) 69% 100%);
    z-index: 2;
}
.ww-bmen-hockey-rink::before { top: 0; }
.ww-bmen-hockey-rink::after { bottom: 0; }

.ww-bmen-hockey-center-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: rgba(219,31,62,.56);
    transform: translateY(-1px);
}

.ww-bmen-hockey-center-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(30%, 170px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(219,31,62,.38);
    border-radius: 50%;
    box-sizing: border-box;
}

.ww-bmen-hockey-goal {
    position: absolute;
    left: 31%;
    width: 38%;
    height: 28px;
    border: 4px solid rgba(24,119,242,.96);
    box-shadow: 0 0 12px rgba(24,119,242,.34);
    border-left-width: 3px;
    border-right-width: 3px;
    box-sizing: border-box;
    pointer-events: none;
}
.ww-bmen-hockey-goal-top { top: 0; border-top: 0; border-radius: 0 0 16px 16px; }
.ww-bmen-hockey-goal-bottom { bottom: 0; border-bottom: 0; border-radius: 16px 16px 0 0; }

.ww-bmen-hockey-goal::after {
    content: "GOAL";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(24,119,242,.96);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-shadow: 0 0 8px rgba(24,119,242,.28);
}
.ww-bmen-hockey-goal-top::after { bottom: 4px; }
.ww-bmen-hockey-goal-bottom::after { top: 4px; }

.ww-bmen-hockey-puck,
.ww-bmen-hockey-cpu {
    position: absolute;
    left: 0;
    top: 0;
    will-change: transform;
    pointer-events: none;
    border-radius: 50%;
}

.ww-bmen-hockey-puck {
    width: 24px;
    height: 24px;
    z-index: 8;
    background: radial-gradient(circle at 34% 28%, #fff0cf 0 14%, #ffb84a 33%, #ff8700 68%, #d95c00 100%);
    box-shadow: 0 0 10px rgba(255,145,0,.78), 0 0 20px rgba(255,122,0,.34), 0 4px 8px rgba(0,0,0,.22);
}

.ww-bmen-hockey-cpu {
    width: 58px;
    height: 58px;
    z-index: 7;
    background: radial-gradient(circle at 40% 35%, #9bd0ff 0 11%, #1877f2 34%, #0a4ba8 73%);
    border: 4px solid rgba(255,255,255,.9);
    box-shadow: 0 8px 18px rgba(0,72,170,.30), inset 0 0 0 3px rgba(255,255,255,.15);
    box-sizing: border-box;
}

.ww-bmen-wrap.is-game-paddle {
    position: absolute !important;
    z-index: 20 !important;
    margin: 0 !important;
    right: auto !important;
    bottom: auto !important;
}

.ww-bmen-wrap.is-game-paddle .ww-bmen-button {
    cursor: grab;
    box-shadow: 0 8px 18px rgba(0,70,155,.32), inset 0 0 0 3px rgba(255,255,255,.16);
}
.ww-bmen-wrap.is-game-paddle.is-dragging .ww-bmen-button { cursor: grabbing; }
.ww-bmen-wrap.is-game-paddle .ww-bmen-tooltip { display: none !important; }

.ww-bmen-hockey-message {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 30;
    transform: translate(-50%, -50%) scale(.92);
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(4,15,29,.88);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
.ww-bmen-hockey-message.is-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ww-bmen-hockey-message.is-goal {
    padding: 10px 22px;
    background: rgba(24,119,242,.92);
    font-size: clamp(32px, 8vw, 64px);
    line-height: 1;
    letter-spacing: 2px;
    border: 3px solid rgba(255,255,255,.96);
    box-shadow: 0 0 0 6px rgba(24,119,242,.18), 0 12px 34px rgba(0,0,0,.22);
    animation: ww-bmen-goal-pop .85s ease both;
}

@keyframes ww-bmen-goal-pop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.55); }
    28% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
    60% { transform: translate(-50%, -50%) scale(.98); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 767px) {
    .ww-bmen-hockey-overlay { padding: 0; }
    .ww-bmen-hockey-stage { width: 100vw; height: 100dvh; min-height: 100dvh; border-radius: 0; border: 0; }
    .ww-bmen-hockey-hud { grid-template-columns: auto 1fr auto; min-height: 58px; padding: max(8px, env(safe-area-inset-top)) 10px 8px; }
    .ww-bmen-hockey-credit { font-size: 9px; max-width: 72px; }
    .ww-bmen-hockey-score { gap: 6px; font-size: 11px; }
    .ww-bmen-hockey-score b { min-width: 27px; height: 27px; padding: 0 6px; font-size: 16px; }
    .ww-bmen-hockey-rink { border-left-width: 3px; border-right-width: 3px; border-top-width: 0; border-bottom-width: 0; }
    .ww-bmen-hockey-trigger::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ww-bmen-hockey-trigger > span { animation: none; }
    .ww-bmen-hockey-overlay,
    .ww-bmen-hockey-stage,
    .ww-bmen-hockey-message { transition: none; }
}
