.rz-stage {
    --rz-deep: #064e3b;
    --rz-dark: #0b3b2c;
    --rz-green: #16a34a;
    --rz-light: #22c55e;
    --rz-gold: #fbbf24;
    position: fixed;
    inset: 0;
    overflow: hidden;
    overflow: clip;
    display: flex;
    flex-direction: column;
    color: var(--rz-deep);
    font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
    background: #0b4f3a;
    outline: none;
    user-select: none;
}

.rz-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
}

.rz-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
}

.rz-top {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(16px, 2.2vw, 34px) clamp(20px, 4vw, 70px) 0;
}

.rz-logo {
    height: clamp(30px, 2.8vw, 48px);
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.25));
}

.rz-top-actions {
    display: flex;
    gap: 12px;
}

.rz-icon {
    width: clamp(44px, 3.4vw, 60px);
    height: clamp(44px, 3.4vw, 60px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.rz-icon:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: translateY(-1px);
}

.rz-icon .mud-icon-root {
    font-size: clamp(22px, 1.7vw, 30px);
}

.rz-center {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 0 24px clamp(16px, 2vw, 32px);
    min-height: 0;
    margin-top: clamp(-64px, -3.4vw, -26px);
}

.rz-gift {
    position: relative;
    width: clamp(96px, 7.6vw, 146px);
    height: clamp(86px, 6.8vw, 131px);
    animation: rz-hover 3.2s ease-in-out infinite;
}

.rz-gift-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.3));
}

.rz-gift-lid {
    transform-box: fill-box;
    transform-origin: 20% 100%;
    transition: transform 0.7s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.rz-stage.is-rolling .rz-gift {
    animation: rz-shake 0.35s ease-in-out infinite;
}

.rz-stage.rz-won .rz-gift-lid {
    transform: translate(-6px, -30px) rotate(-14deg);
}

.rz-bit {
    position: absolute;
    width: clamp(10px, 0.9vw, 16px);
    height: clamp(6px, 0.5vw, 9px);
    border-radius: 2px;
    animation: rz-flutter 3.4s ease-in-out infinite;
}

.rz-bit-1 { left: -30%; top: 22%; background: #fbbf24; transform: rotate(32deg); }
.rz-bit-2 { left: -12%; top: 62%; background: #22c55e; transform: rotate(-24deg); animation-delay: -1s; }
.rz-bit-3 { right: -32%; top: 14%; background: #22c55e; transform: rotate(-38deg); animation-delay: -0.6s; }
.rz-bit-4 { right: -18%; top: 50%; background: #fbbf24; transform: rotate(18deg); animation-delay: -1.8s; }
.rz-bit-5 { left: -40%; top: 84%; background: #f97316; transform: rotate(60deg); animation-delay: -2.2s; }
.rz-bit-6 { right: -40%; top: 80%; background: #34d399; transform: rotate(-12deg); animation-delay: -1.4s; }

.rz-title {
    margin: clamp(4px, 0.6vw, 10px) 0 0;
    font-size: clamp(36px, 3.8vw, 74px);
    font-weight: 800;
    line-height: 1.05;
    color: #ffffff;
    letter-spacing: -0.01em;
    text-shadow: 0 6px 26px rgba(0, 0, 0, 0.3);
}

.rz-subtitle {
    margin: clamp(4px, 0.5vw, 10px) 0 clamp(14px, 1.4vw, 24px);
    font-size: clamp(16px, 1.3vw, 24px);
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.rz-card {
    width: min(92vw, clamp(560px, 46vw, 900px));
    padding: clamp(18px, 1.6vw, 30px) clamp(22px, 2.2vw, 40px);
    border-radius: clamp(22px, 1.8vw, 32px);
    background: #ffffff;
    box-shadow: 0 40px 90px -30px rgba(2, 44, 34, 0.55), 0 2px 0 rgba(255, 255, 255, 0.6) inset;
    text-align: left;
}







.rz-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: clamp(14px, 1.05vw, 18px);
    color: #5b7a6d;
}

.rz-meta .mud-icon-root {
    color: var(--rz-green);
}

.rz-draw {
    margin-top: clamp(12px, 1.2vw, 20px);
    width: 100%;
    height: clamp(52px, 3.6vw, 68px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: clamp(17px, 1.35vw, 25px);
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(180deg, #1f9d55 0%, #0f7a40 100%);
    box-shadow: 0 16px 30px -14px rgba(6, 78, 59, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: transform 0.15s, filter 0.2s;
}

.rz-draw .mud-icon-root {
    font-size: clamp(22px, 1.6vw, 30px);
}

.rz-draw:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.rz-draw:disabled {
    cursor: default;
    opacity: 0.75;
}

.rz-result {
    position: relative;
    margin-top: clamp(26px, 2.2vw, 40px);
    padding: clamp(24px, 1.9vw, 36px) 20px clamp(10px, 0.9vw, 18px);
    border-radius: clamp(18px, 1.5vw, 26px);
    background:
        radial-gradient(120% 90% at 50% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, #e9fbf1 0%, #c9f2dc 100%);
    border: 1px solid rgba(34, 197, 94, 0.25);
    box-shadow: 0 18px 40px -22px rgba(22, 163, 74, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rz-crown {
    position: absolute;
    top: clamp(-26px, -1.9vw, -18px);
    left: 50%;
    width: clamp(48px, 3.8vw, 70px);
    margin-left: clamp(-35px, -1.9vw, -24px);
    filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.45));
    transition: transform 0.5s cubic-bezier(0.2, 1.8, 0.4, 1);
}

.rz-stage.rz-won .rz-crown {
    transform: translateY(-6px) scale(1.15) rotate(-6deg);
}

.rz-pill {
    position: relative;
    z-index: 2;
    padding: 6px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    font-size: clamp(14px, 1.05vw, 19px);
    font-weight: 700;
    color: var(--rz-dark);
}

.rz-dot {
    position: absolute;
    width: clamp(9px, 0.8vw, 14px);
    height: clamp(9px, 0.8vw, 14px);
    border-radius: 3px;
    transform: rotate(45deg);
    animation: rz-twinkle 2.6s ease-in-out infinite;
}

.rz-dot-1 { left: 14%; top: 28%; background: #16a34a; transform: rotate(30deg); }
.rz-dot-2 { left: 21%; top: 58%; background: #fbbf24; animation-delay: -0.8s; }
.rz-dot-3 { left: 9%; top: 74%; background: #fbbf24; animation-delay: -1.6s; }
.rz-dot-4 { right: 14%; top: 26%; background: #16a34a; transform: rotate(60deg); animation-delay: -0.4s; }
.rz-dot-5 { right: 22%; top: 60%; background: #fbbf24; animation-delay: -1.2s; }
.rz-dot-6 { right: 10%; top: 76%; background: #fbbf24; animation-delay: -2s; }

.rz-reels {
    --rz-cell: clamp(70px, 6vw, 118px);
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: clamp(0px, 0.2vw, 4px);
    margin-top: 4px;
}

.rz-reel {
    position: relative;
    width: calc(var(--rz-cell) * 0.6);
    height: calc(var(--rz-cell) * 1.3);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}

.rz-strip {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
}

.rz-cell {
    height: var(--rz-cell);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--rz-cell) * 0.92);
    font-weight: 800;
    line-height: 1;
    color: #0b3b2c;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.rz-reel.rz-locked .rz-cell:not(.rz-hit) {
    visibility: hidden;
}


.rz-stage.rz-won .rz-cell {
    color: #065f46;
}

.rz-stage.rz-won .rz-result {
    border-color: rgba(34, 197, 94, 0.55);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12), 0 24px 50px -20px rgba(22, 163, 74, 0.75);
    animation: rz-glow 1.6s ease-in-out infinite;
}

.rz-again {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: clamp(12px, 1.1vw, 18px) auto 0;
    min-width: clamp(200px, 14vw, 260px);
    height: clamp(44px, 2.9vw, 54px);
    padding: 0 26px;
    border-radius: 999px;
    border: 1.5px solid rgba(22, 163, 74, 0.45);
    background: #ffffff;
    font-family: inherit;
    font-size: clamp(16px, 1.2vw, 21px);
    font-weight: 700;
    color: #0f7a40;
    cursor: pointer;
    animation: rz-rise 0.4s ease-out;
}

.rz-again:hover {
    background: #f0fdf4;
}

.rz-note {
    margin-top: clamp(10px, 1vw, 16px);
    padding: 8px 22px;
    max-width: 80vw;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--rz-dark);
    font-size: clamp(13px, 1vw, 18px);
    font-weight: 600;
    box-shadow: 0 10px 24px -14px rgba(2, 44, 34, 0.5);
}

.rz-dots::after {
    content: "";
    display: inline-block;
    width: 1.2em;
    text-align: left;
    animation: rz-dots 1.2s steps(4, end) infinite;
}

@media (max-height: 820px) {
    .rz-gift {
        display: none;
    }

    .rz-center {
        margin-top: 0;
    }
}


@keyframes rz-hover {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes rz-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg) translateY(-3px); }
    75% { transform: rotate(5deg) translateY(-3px); }
}

@keyframes rz-flutter {
    0%, 100% { translate: 0 0; opacity: 1; }
    50% { translate: 0 -8px; opacity: 0.7; }
}

@keyframes rz-twinkle {
    0%, 100% { opacity: 1; scale: 1; }
    50% { opacity: 0.45; scale: 0.8; }
}


@keyframes rz-glow {
    0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12), 0 24px 50px -20px rgba(22, 163, 74, 0.75); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.18), 0 24px 60px -16px rgba(22, 163, 74, 0.85); }
}

@keyframes rz-rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@keyframes rz-dots {
    0% { content: ""; }
    25% { content: "."; }
    50% { content: ".."; }
    75% { content: "..."; }
}
