* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.none {
    display: none !important;
}

body {
    background: transparent url(bg.jpg);
    background-size: cover;
    background-position: center;
    font-family: arial, sans-serif;
}

.slot-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

:root {
    --scale: 2;
}

.machine-frame {
    background: #6d28d9;
    border-radius: calc(28px * var(--scale));
    box-shadow: 0 0 0 4px #4c1d95, 0 8px 32px rgba(109, 40, 217, 0.4);
    width: calc(400px * var(--scale));
    max-width: 100%;
}

.bulbs-inner {
    display: flex;
    flex-direction: row;
}

.bulbs-row {
    display: flex;
    justify-content: space-between;
    margin: calc(10px * var(--scale));
    padding: 0 calc(10px * var(--scale));
}

.bulbs-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: calc(5px * var(--scale)) calc(10px * var(--scale));
}

.bulb {
    width: calc(14px * var(--scale));
    height: calc(14px * var(--scale));
    border-radius: 50%;
    background: #fde68a;
    box-shadow: 0 0 6px #fde68a;
    transition: background 0.12s, box-shadow 0.12s;
}

.bulb.off {
    background: #92780a;
    box-shadow: none;
}

.screen-outer {
    background: #1e0a4a;
    border-radius: calc(14px * var(--scale));
    padding: calc(12px * var(--scale));
    border: 3px solid #4c1d95;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.reel-window {
    overflow: hidden;
    height: calc(130px * var(--scale));
    background: linear-gradient(0deg, #b6b6b6 0%, #ececec 25%, #ececec 75%, #b6b6b6 100%);
    border-radius: calc(10px * var(--scale));
}

.reel-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    will-change: transform;
}

.reel-item {
    height: calc(130px * var(--scale));
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: calc(6px * var(--scale));
    padding: calc(8px * var(--scale));
}

.reel-label {
    font-size: 12px;
    font-weight: 500;
    color: #c4b5fd;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.result-text {
    text-align: center;
    font-size: calc(15px * var(--scale));
    margin: calc(12px * var(--scale)) 0 0 0;
    line-height: calc(15px * var(--scale));
    font-weight: 500;
    color: #a78bfa;
    letter-spacing: 0.04em;
}

.result-text.win {
    color: #fde68a;
    font-size: calc(15px * var(--scale));
    animation: pulse 0.5s ease-in-out 4;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* LEVER */
.lever-side {
    align-items: center;
    display: flex;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    width: calc(100px * var(--scale));
    height: calc(100px * var(--scale));
    position: relative;
}

.lever-base {
    z-index: 3;
    position: absolute;
    width: 15%;
    height: 40%;
    left: 0;
    background: linear-gradient(#e5e7eb, #9ca3af, #e5e7eb);
    border-radius: calc(2px * var(--scale)) calc(4px * var(--scale)) calc(4px * var(--scale)) calc(2px * var(--scale));
}

.lever-arm-wrap {
    position: absolute;
    left: calc(3% * var(--scale));
    transform-origin: 0 center;
    transform: rotate(-45deg);
    width: 100%;
    height: 100%;
    transition: transform 0.22s cubic-bezier(.4, 2, .5, 1);
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
}

.lever-arm-wrap.pulled {
    transform: rotate(45deg);
}

.lever-arm-wrap.return {
    transition: transform 0.38s cubic-bezier(.2, 1.5, .4, 1);
}

.lever-arm {
    width: 100%;
    height: calc(10px * var(--scale));
    background: linear-gradient(#e5e7eb, #9ca3af, #e5e7eb);
    border-radius: calc(4px * var(--scale));
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.3);
}

.lever-ball {
    width: calc(32px * var(--scale));
    height: calc(32px * var(--scale));
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fde68a, #d97706);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
    margin-bottom: calc(-4px * var(--scale));
    flex-shrink: 0;
}

.lever-side:hover .lever-ball {
    background: radial-gradient(circle at 35% 35%, #fef9c3, #f59e0b);
}

.no_prize {
    font-size: calc(45px * var(--scale));
    font-weight: 700;
    text-transform: uppercase;
    color: #9b9ce0;
    text-shadow: 0 -2px 4px rgba(0, 0, 0, 0.6),
    -2px 0 4px rgba(0, 0, 0, 0.4),
    0 3px 6px rgba(255, 255, 255, 0.5),
    3px 0 6px rgba(255, 255, 255, 0.3),
    0 0 12px rgba(0, 0, 0, 0.3);
}

#digits {
    height: calc(130px * var(--scale));
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 2rem 1rem;
    align-items: center;
}

#digits input {
    width: calc(140px * var(--scale));
    height: calc(60px * var(--scale));
    text-align: center;
    font-size: calc(24px * var(--scale));
    font-weight: 500;
    border-radius: calc(2px * var(--scale));
    border: calc(2px * var(--scale)) solid #9b9ce0;
    background: #ececec;
    color: #9b9ce0;
    outline: none;
    transition: border-color .15s;
    user-select: none;
}

#digits input:focus {
    outline: none;
}
