/* Classic three-reel cabinet (engine "classic"): chrome rim, cream drums, five lines. */

.dgs-classic-head {
    display: flex;
    justify-content: center;
    min-height: 2.1rem;
    margin-bottom: 10px;
}

.dgs-classic-meta,
.dgs-classic-counter {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35em 0.9em;
    margin: 0;
    padding: 0.4em 1em;
    border-radius: 10px;
    background: linear-gradient(180deg, #3a1d5e, var(--dgs-night, #1e0b33));
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--dgs-on-night, #fff4e6);
    font: 700 clamp(0.75rem, 2.4vw, 0.9rem) / 1.25 var(--dgs-body, system-ui, sans-serif);
    letter-spacing: 0.02em;
}

.dgs-classic-meta[hidden],
.dgs-classic-counter[hidden] {
    display: none;
}

.dgs-classic-meta-bet {
    color: #ffd23f;
}

/* Cabinet: brushed chrome around a tone-coloured inner bezel. */
.dgs-classic-frame {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
    padding: clamp(8px, 2vw, 16px);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, 0.12) 70%, rgba(255, 255, 255, 0.4)),
        linear-gradient(90deg, #9aa3b5, #eef1f7 30%, #b4bccb 55%, #f6f8fc 80%, #8e97aa);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.dgs-classic-frame::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 32px;
    box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.9), 0 0 30px rgba(255, 210, 63, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease-out;
}

.dgs-classic-frame.is-glad::after {
    opacity: 1;
}

.dgs-classic-window {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
    gap: clamp(5px, 1.4vw, 10px);
    padding: clamp(6px, 1.6vw, 12px);
    border-radius: 18px;
    background: linear-gradient(160deg, var(--tone, #dc2626), color-mix(in srgb, var(--tone, #dc2626) 55%, #1e0b33));
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.45);
}

/* Drums: cream paper with a curved shade top and bottom. */
.dgs-classic-reel {
    position: relative;
    aspect-ratio: 1 / 3;
    overflow: hidden;
    border-radius: 10px;
    container-type: inline-size;
    background: linear-gradient(90deg, #e9dfcc, #fffaf0 35%, #fffdf7 60%, #e4d8c2);
}

.dgs-classic-reel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(40, 18, 60, 0.45), transparent 16%, transparent 84%, rgba(40, 18, 60, 0.45));
}

.dgs-classic-band {
    position: absolute;
    inset: 0 0 auto;
    will-change: transform;
}

.dgs-classic-tile {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 8%;
    transition: opacity 0.2s ease-out;
}

.dgs-classic-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 3px 3px rgba(60, 30, 10, 0.3));
    user-select: none;
}

.dgs-classic-name {
    position: absolute;
    inset: 9%;
    display: grid;
    place-items: center;
    padding: 6%;
    border-radius: 16px;
    color: #fff;
    font: 800 clamp(9px, 12cqi, 17px) / 1.1 var(--dgs-display, system-ui, sans-serif);
    text-align: center;
    overflow-wrap: anywhere;
    opacity: 0;
}

.dgs-classic-tile.is-bare .dgs-classic-img {
    display: none;
}

.dgs-classic-tile.is-bare .dgs-classic-name {
    opacity: 1;
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35), inset 0 -4px 0 rgba(0, 0, 0, 0.2);
}

.dgs-classic-tile--h.is-bare .dgs-classic-name { background: linear-gradient(160deg, #ff6b6b, #b91c1c); }
.dgs-classic-tile--l.is-bare .dgs-classic-name { background: linear-gradient(160deg, #c77dff, var(--dgs-grape, #7b2ff7)); }
.dgs-classic-tile--wild.is-bare .dgs-classic-name { background: linear-gradient(160deg, #ffe066, var(--dgs-sun, #ff8a00)); color: #3a1600; }

.dgs-classic-tile.is-hit::before {
    content: "";
    position: absolute;
    inset: 5%;
    border-radius: 16px;
    background: rgba(255, 210, 63, 0.3);
    box-shadow: inset 0 0 0 3px #e0a400;
}

.dgs-classic-window.has-wins .dgs-classic-tile:not(.is-hit) {
    opacity: 0.4;
}

.dgs-classic-frame.is-glad .dgs-classic-tile.is-hit .dgs-classic-img {
    animation: dgs-classic-pop 0.28s ease-out;
}

@keyframes dgs-classic-pop {
    from { transform: scale(0.93); }
    to { transform: scale(1); }
}

.dgs-classic-lines {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.dgs-classic-path {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
    filter: drop-shadow(0 0 2px rgba(30, 11, 51, 0.8));
}

.dgs-classic-badge text {
    fill: var(--dgs-night, #1e0b33);
    font-family: var(--dgs-display, system-ui, sans-serif);
    font-weight: 800;
    text-anchor: middle;
    dominant-baseline: central;
}

.dgs-classic-badge circle {
    stroke: #fff;
    stroke-width: 2;
}

/* Not used by the classic maths (no scatter), kept so the shared board never shows raw text. */
.dgs-classic-flash {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.dgs-classic-wins {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    min-height: 2rem;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.dgs-classic-win {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    padding: 0.3em 0.75em;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--hue, #ffd23f);
    color: var(--dgs-on-night, #fff4e6);
    font: 500 clamp(0.72rem, 2.3vw, 0.85rem) / 1.2 var(--dgs-body, system-ui, sans-serif);
}

.dgs-classic-win-line {
    font-weight: 800;
}

.dgs-classic-win-amt {
    color: #ffd23f;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
    .dgs-classic-tile,
    .dgs-classic-frame::after {
        transition: none;
    }

    .dgs-classic-frame.is-glad .dgs-classic-tile.is-hit .dgs-classic-img {
        animation: none;
    }
}
