.spin-wheel-modal {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-index-modal-layout, 1100) + 30);
    display: grid;
    place-items: center;
    padding: 16px;
}

.spin-wheel-modal.is-hidden,
.spin-wheel-modal[hidden] {
    display: none !important;
}

.spin-wheel-modal.is-open {
    display: grid;
}

.spin-wheel-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 16, 0.72);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.spin-wheel-modal.is-open .spin-wheel-modal__backdrop {
    opacity: 1;
}

.spin-wheel-modal__panel {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 28px 22px 22px;
    border-radius: 24px;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(18, 184, 87, 0.28), transparent 55%),
        #121821;
    color: #f4f6fb;
    border: 1px solid rgba(18, 184, 87, 0.28);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    transform: scale(0.92) translateY(12px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
    text-align: center;
    overflow: hidden;
}

.spin-wheel-modal.is-open .spin-wheel-modal__panel {
    transform: none;
    opacity: 1;
}

.spin-wheel-modal.is-leaving .spin-wheel-modal__panel {
    transform: scale(0.94) translateY(8px);
    opacity: 0;
}

.spin-wheel-modal.is-leaving .spin-wheel-modal__backdrop {
    opacity: 0;
}

.spin-wheel-modal__glow {
    position: absolute;
    inset: -40% -20% auto;
    height: 60%;
    background: radial-gradient(circle, rgba(18, 184, 87, 0.35), transparent 70%);
    pointer-events: none;
}

.spin-wheel-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.spin-wheel-modal__close:hover {
    background: rgba(255, 255, 255, 0.14);
}

.spin-wheel-modal__eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #12b857;
}

.spin-wheel-modal__title {
    margin: 0 0 8px;
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.spin-wheel-modal__text {
    margin: 0 auto 16px;
    max-width: 32rem;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(244, 246, 251, 0.72);
}

.spin-wheel-modal__stage {
    position: relative;
    width: min(320px, 86vw);
    margin: 0 auto 18px;
}

.spin-wheel-modal__pointer {
    position: absolute;
    top: -4px;
    left: 50%;
    z-index: 2;
    width: 0;
    height: 0;
    margin-left: -10px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 18px solid #12b857;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.spin-wheel-modal__canvas {
    width: 100%;
    aspect-ratio: 1;
    margin: 0 auto;
}

.spin-wheel-modal__actions {
    display: grid;
    gap: 8px;
}

.spin-wheel-modal__btn {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.spin-wheel-modal__btn:active {
    transform: scale(0.98);
}

.spin-wheel-modal__btn[disabled] {
    opacity: 0.55;
    cursor: default;
}

.spin-wheel-modal__btn--primary {
    background: linear-gradient(180deg, #1ad966, #0f9e4a);
    color: #04140a;
}

.spin-wheel-modal__btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.spin-wheel-modal__btn.is-hidden,
.spin-wheel-modal__btn[hidden] {
    display: none !important;
}

.spin-wheel-modal__result {
    margin: 12px 0 0;
    font-size: 15px;
    font-weight: 700;
    color: #7dffb0;
}

html.is-spin-open {
    overflow: hidden;
}
