.wheel-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);

    /* 🔥 THIS IS THE KEY */
    display: flex;
    flex-direction: column;
    align-items: center;      /* horizontal centering */
    justify-content: center;  /* vertical centering */

    z-index: 9999;
}

.wheel-modal-box > .content {
    width: 100%;         /* same as canvas */
    margin: 0 auto;
    z-index: 9999;
    text-align:center;
    position: relative;
}
.wheel-modal-overlay.hidden {
    display: none;
}

/* MAIN CONTAINER */
.wheel-modal-content {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    width: 360px;
    text-align: center;
    z-index: 9999;
}

/* WHEEL */
.wheel-container {
    position: relative;
    max-width: 600px;
    max-height: 600px;
    z-index: 9999;
    width: 100%;
    height: 100%;
    margin: auto;
}

canvas {
    display: block;
    margin: 0 auto;
    border-radius: 50%;
    z-index: 9999;

    width: 100%;
    height: 100%;
    display: block;

    -webkit-tap-highlight-color: transparent; /* mobile blue overlay */
    outline: none;                             /* focus ring */
    user-select: none;                        /* prevent selection */
    touch-action: manipulation;               /* prevent delay */
}

/* wrapper anchors everything */
.wheel-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    overflow: visible;
}

/* pointer triangle */
.wheel-pointer {
    position: absolute;
    top: 50%;
    right: -10px;
    transform: translateY(-50%) rotate(-90deg);
    font-size: 24px;
    z-index: 10;
    pointer-events: none;
}



/* BUTTON */
.wheel-btn-rotate {
    margin-top: 20px;
    width: 100%;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    background-color: #1e3a8a;
    color: white;
}

/* RESULT */
#result {
    margin-top: 12px;
    font-weight: bold;
}

.celebrate {
    animation: pop 0.6s ease-in-out infinite alternate;
    font-weight: bold;
}

@keyframes pop {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

