/* Gaming Bureau — classic engine (3 × 3 fruit machine in a chrome cabinet). */

.bx-eng--classic .bx-classic {
    --bx-c-chrome: linear-gradient(180deg, #fbfbfd 0%, #a7acb8 16%, #eef0f4 32%, #6e7383 58%, #d2d5dc 80%, #5b606d 100%);
    --bx-c-enamel: linear-gradient(180deg, #4a1838 0%, #2c1030 55%, #1c0a22 100%);
    --cell: min(calc((100cqw - 132px) / 3), calc((100cqh - 168px) / 3), 132px);
    position: relative;
    container-type: size;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 12px;
}

/* ------------------------------------------------------------- pay glass */

.bx-eng--classic .bx-classic__top {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bx-eng--classic .bx-classic__pay {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 6px;
    border: 1px solid rgba(245, 196, 81, .35);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(40, 18, 40, .9), rgba(18, 9, 22, .9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.bx-eng--classic .bx-classic__pay-syms { display: inline-flex; gap: 1px; }

.bx-eng--classic .bx-classic__pay-img {
    width: 22px;
    height: 22px;
}

.bx-eng--classic .bx-classic__pay-img.bx-sym--text { width: auto; margin-right: 4px; font-size: .62rem; }

.bx-eng--classic .bx-classic__pay-v {
    margin-left: 4px;
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
    color: var(--bx-gold, #f5c451);
}

/* --------------------------------------------------------------- cabinet */

.bx-eng--classic .bx-classic__cabinet {
    position: relative;
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    border: 5px solid transparent;
    border-radius: 26px;
    background: var(--bx-c-enamel) padding-box, var(--bx-c-chrome) border-box;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, .6),
        0 30px 50px -20px rgba(0, 0, 0, .9),
        inset 0 2px 0 rgba(255, 255, 255, .12),
        inset 0 -14px 30px -18px rgba(255, 107, 87, .35);
}

.bx-eng--classic .bx-classic__cabinet::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 26px;
    right: 26px;
    height: 6px;
    background: radial-gradient(circle, #ffe7a8 0 1.6px, rgba(255, 196, 81, .35) 2.4px, transparent 3px) center / 14px 6px repeat-x;
    pointer-events: none;
}

.bx-eng--classic .bx-classic.is-gold .bx-classic__cabinet::before {
    filter: brightness(1.4) drop-shadow(0 0 3px rgba(255, 210, 110, .9));
}

.bx-eng--classic .bx-classic__cabinet::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 30px;
    box-shadow: 0 0 0 2px rgba(255, 224, 138, .8), 0 0 50px 6px rgba(245, 196, 81, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease-out;
}

.bx-eng--classic .bx-classic.is-gold .bx-classic__cabinet::after { opacity: 1; }

.bx-eng--classic .bx-classic__bolt {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff 0 12%, #b9bdc8 40%, #4d5260 100%);
    box-shadow: 0 1px 1px rgba(0, 0, 0, .6);
}

.bx-eng--classic .bx-classic__bolt--tl { top: 6px; left: 6px; }
.bx-eng--classic .bx-classic__bolt--tr { top: 6px; right: 6px; }
.bx-eng--classic .bx-classic__bolt--bl { bottom: 6px; left: 6px; }
.bx-eng--classic .bx-classic__bolt--br { bottom: 6px; right: 6px; }

/* ----------------------------------------------------------------- lamps */

.bx-eng--classic .bx-classic__lamps {
    display: grid;
    grid-template-rows: repeat(3, var(--cell));
    margin-top: 5px;
}

.bx-eng--classic .bx-classic__lamprow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.bx-eng--classic .bx-classic__lamp {
    position: relative;
    display: grid;
    place-items: center;
    width: 26px;
    height: 20px;
    border-radius: 6px;
    font-size: .68rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: rgba(243, 236, 223, .55);
    background: rgba(0, 0, 0, .45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
    isolation: isolate;
}

.bx-eng--classic .bx-classic__lamp--diag { border-radius: 10px; }

.bx-eng--classic .bx-classic__lamp::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(180deg, #ffe39a, var(--bx-gold, #f5c451));
    box-shadow: 0 0 12px rgba(245, 196, 81, .8);
    opacity: 0;
    transition: opacity .18s ease-out;
}

.bx-eng--classic .bx-classic__lamp.is-on { color: #1b1206; }
.bx-eng--classic .bx-classic__lamp.is-on::before { opacity: 1; }

/* ------------------------------------------------------------------ reels */

.bx-eng--classic .bx-classic__glass {
    position: relative;
    padding: 5px;
    border-radius: 16px;
    background: var(--bx-c-chrome);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 6px 14px rgba(0, 0, 0, .5);
}

.bx-eng--classic .bx-classic__glass::after {
    content: "";
    position: absolute;
    inset: 5px;
    z-index: 4;
    border-radius: 11px;
    background:
        linear-gradient(170deg, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, .08) 30%, rgba(255, 255, 255, 0) 31%);
    pointer-events: none;
}

.bx-eng--classic .bx-classic__window {
    display: grid;
    grid-template-columns: repeat(3, var(--cell));
    gap: 4px;
    height: calc(var(--cell) * 3);
    border-radius: 11px;
    overflow: hidden;
    background: #170b18;
}

.bx-eng--classic .bx-classic__reel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #d9cfbf 0%, #fffaf0 26%, #fffdf7 50%, #fffaf0 74%, #d9cfbf 100%);
}

.bx-eng--classic .bx-classic__reel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(40, 14, 30, .55) 0%, rgba(40, 14, 30, 0) 22%, rgba(40, 14, 30, 0) 78%, rgba(40, 14, 30, .55) 100%);
    pointer-events: none;
}

.bx-eng--classic .bx-classic__strip {
    --n: 3;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: calc(100% * var(--n) / 3);
    display: grid;
    grid-auto-rows: 1fr;
    will-change: transform;
}

.bx-eng--classic .bx-classic__cell {
    position: relative;
    display: grid;
    place-items: center;
    padding: 11%;
    transition: opacity .2s ease-out;
}

.bx-eng--classic .bx-classic__img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 3px 3px rgba(60, 20, 30, .35));
}

.bx-eng--classic .bx-classic__cell.is-blur .bx-classic__img { filter: blur(1.8px); opacity: .75; }
.bx-eng--classic .bx-classic__cell .bx-sym--text { color: #5a3a4a; }

.bx-eng--classic .bx-classic__cell::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 12px;
    background: radial-gradient(circle, rgba(255, 210, 110, .45), rgba(255, 210, 110, 0) 72%);
    box-shadow: inset 0 0 0 2px rgba(214, 150, 30, .9);
    opacity: 0;
    transition: opacity .2s ease-out;
}

.bx-eng--classic .bx-classic__cell.is-hit::before { opacity: 1; }
.bx-eng--classic .bx-classic.has-hits .bx-classic__cell:not(.is-hit) { opacity: .5; }
.bx-eng--classic .bx-classic__cell.is-hit .bx-classic__img { animation: bx-classic-pop .9s ease-out 2; }

.bx-eng--classic .bx-classic__lines {
    position: absolute;
    inset: 5px;
    z-index: 3;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    overflow: visible;
    pointer-events: none;
}

.bx-eng--classic .bx-classic__path {
    fill: none;
    stroke: #e8344e;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9));
    opacity: .85;
    transition: opacity .2s ease-out;
    animation: bx-classic-fade .24s ease-out both;
}

.bx-eng--classic .bx-classic.is-cycling .bx-classic__path { opacity: .1; }
.bx-eng--classic .bx-classic.is-cycling .bx-classic__path.is-on { opacity: 1; }

/* --------------------------------------------------------------- readout */

.bx-eng--classic .bx-classic__read {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 10px;
    background: linear-gradient(180deg, #160a0c, #241012);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 179, 71, .25);
}

.bx-eng--classic .bx-classic__read-l {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 179, 71, .7);
}

.bx-eng--classic .bx-classic__read-v {
    min-width: 4ch;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 1.3rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
    color: #ffb347;
    text-shadow: 0 0 10px rgba(255, 140, 40, .6);
}

.bx-eng--classic .bx-classic__read-u { font-size: .72rem; color: rgba(255, 179, 71, .7); }
.bx-eng--classic .bx-classic.is-gold .bx-classic__read-v { color: #ffd76a; text-shadow: 0 0 16px rgba(245, 196, 81, .85); }

.bx-eng--classic .bx-vh {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@keyframes bx-classic-pop {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.08); }
}

@keyframes bx-classic-fade {
    from { opacity: 0; }
}

@media (max-width: 560px) {
    .bx-eng--classic .bx-classic { gap: 8px; padding: 8px; }
    .bx-eng--classic .bx-classic__cabinet { gap: 5px; padding: 12px 6px; border-width: 4px; border-radius: 22px; }
    .bx-eng--classic .bx-classic__lamp { width: 22px; height: 18px; font-size: .62rem; }
    .bx-eng--classic .bx-classic__pay-img { width: 18px; height: 18px; }
}

.bx-eng--classic [data-motion="off"] *,
.bx-eng--classic [data-motion="off"] *::before,
.bx-eng--classic [data-motion="off"] *::after {
    animation: none !important;
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .bx-eng--classic .bx-classic *,
    .bx-eng--classic .bx-classic *::before,
    .bx-eng--classic .bx-classic *::after {
        animation: none !important;
    }
}

.bx-eng--classic .bx-classic__cell .bx-sym--text {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-size: .64rem;
    line-height: 1.2;
    border-radius: 10px;
    background: rgba(90, 58, 74, .08);
}
