/* =====================================================================
   MOTORA 2 — game page styles
   ===================================================================== */


/* ============================================================
   game zone wrapper
   ============================================================ */

.game-zone {
    max-width: 1400px;
    margin: 0 auto;
    padding: 56px 28px 110px;
}

.game-zone__head {
    text-align: center;
    margin-bottom: 42px;
}

.game-zone__h {
    font-family: var(--type-display);
    font-weight: 400;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1;
    color: var(--paint);
    text-transform: lowercase;
    letter-spacing: -0.01em;
    margin: 10px 0 18px;
}

.game-zone__sub {
    font-family: var(--type-mono);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--paint-low);
}


/* ============================================================
   stage layout — cabinet + side panel
   ============================================================ */

.game-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
}


/* ============================================================
   cabinet
   ============================================================ */

.cabinet {
    position: relative;
    background:
        linear-gradient(180deg, #11151c 0%, #07090d 100%);
    border: 1px solid var(--line-sharp);
    border-radius: var(--rad-3);
    padding: 28px 28px 24px;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.05) inset,
        0 40px 80px -30px rgba(0,0,0,0.9),
        0 0 0 1px rgba(255,64,25,0.08);
    overflow: hidden;
}

.cabinet:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--flare) 50%, transparent);
    opacity: 0.7;
}

/* HUD bar */
.cab-hud {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 0;
    border: 1px solid var(--line-sharp);
    border-radius: var(--rad-1);
    background: rgba(7,9,13,0.5);
    margin-bottom: 22px;
    overflow: hidden;
}

.hud-cell {
    padding: 14px 22px;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hud-cell:last-child { border-right: 0; }

.hud-cell--center { text-align: center; align-items: center; }

.hud-cell__k {
    font-family: var(--type-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--paint-low);
    text-transform: uppercase;
}

.hud-cell__v {
    font-family: var(--type-display);
    font-size: 26px;
    color: var(--flare);
    line-height: 1.05;
}

.hud-cell__v--small {
    font-family: var(--type-mono);
    font-size: 13px;
    color: var(--paint);
    letter-spacing: 0.04em;
    font-weight: 600;
}


/* reels area */
.reels {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    background: #050709;
    border: 1px solid var(--line-sharp);
    border-radius: var(--rad-2);
    padding: 14px;
    aspect-ratio: 5 / 3;
    overflow: hidden;
}

.reel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background:
        linear-gradient(180deg, #0a0d12 0%, #11151c 50%, #0a0d12 100%);
    border-radius: var(--rad-1);
    border: 1px solid rgba(255,255,255,0.04);
    overflow: hidden;
    position: relative;
}

.reel__cell {
    flex: 1;
    background-color: transparent;
    background-size: 70% 70%;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background-color .2s ease, transform .25s ease, box-shadow .25s ease;
}

.reel__cell:last-child { border-bottom: 0; }

.reel__cell.is-hit {
    background-color: rgba(255, 64, 25, 0.18);
    box-shadow: 0 0 0 2px var(--flare) inset, 0 0 18px rgba(255,64,25,0.5) inset;
    animation: pz-hit-flash 0.9s ease-in-out infinite;
}

@keyframes pz-hit-flash {
    0%, 100% { background-color: rgba(255, 64, 25, 0.18); }
    50%      { background-color: rgba(255, 64, 25, 0.36); }
}

/* spinning reel — blurred motion strip */
.reel.is-rolling .reel__cell {
    background-image: linear-gradient(180deg,
        var(--flare) 0%,
        var(--ink) 12%,
        var(--paint-low) 24%,
        var(--ink) 36%,
        var(--flare-deep) 48%,
        var(--ink) 60%,
        var(--paint) 72%,
        var(--ink) 84%,
        var(--flare) 100%);
    background-size: 100% 1200%;
    animation: pz-reel-roll 0.12s linear infinite;
}

@keyframes pz-reel-roll {
    0%   { background-position: 0 0; }
    100% { background-position: 0 1200%; }
}

/* SVG payline overlay */
.reel-lines {
    position: absolute;
    inset: 14px;
    pointer-events: none;
    z-index: 2;
}


/* win / lose overlay */
.reel-result {
    position: absolute;
    inset: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7,9,13,0.78);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 3;
    border-radius: var(--rad-2);
}

.reel-result.is-shown {
    opacity: 1;
}

.reel-result__inner {
    text-align: center;
    transform: scale(0.85);
    transition: transform .35s cubic-bezier(.2,.7,.2,1.2);
}

.reel-result.is-shown .reel-result__inner {
    transform: scale(1);
}

.reel-result__badge {
    font-family: var(--type-display);
    font-size: clamp(34px, 6vw, 72px);
    color: var(--flare);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-shadow: 0 0 24px rgba(255,64,25,0.5);
}

.reel-result[data-state="lose"] .reel-result__badge {
    color: var(--paint-low);
    text-shadow: none;
}

.reel-result__amount {
    font-family: var(--type-mono);
    font-size: 16px;
    color: var(--paint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
}

.reel-result[data-state="win"] .reel-result__amount {
    color: var(--pit-green);
}


/* payline picker */
.lines-picker {
    margin: 22px 0 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: rgba(7,9,13,0.5);
    border: 1px solid var(--line);
    border-radius: var(--rad-1);
}

.lines-picker__k {
    font-family: var(--type-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--paint-low);
}

.lines-picker__row {
    display: flex;
    gap: 8px;
}

.line-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--rad-1);
    border: 1px solid var(--line-sharp);
    background: var(--ink-mid);
    color: var(--paint-low);
    font-family: var(--type-display);
    font-size: 16px;
    transition: all .18s ease;
}

.line-btn:hover {
    border-color: var(--paint);
    color: var(--paint);
}

.line-btn.is-on {
    background: var(--flare);
    color: var(--ink-deep);
    border-color: var(--flare);
    box-shadow: 0 6px 18px -8px rgba(255,64,25,0.5);
}

.lines-picker__v {
    margin-left: auto;
    font-family: var(--type-mono);
    font-size: 12px;
    color: var(--flare);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
}


/* controls row */
.cab-controls {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 18px;
    align-items: stretch;
}

/* bet stepper */
.bet-stepper {
    background: rgba(7,9,13,0.5);
    border: 1px solid var(--line);
    border-radius: var(--rad-1);
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bet-stepper__k {
    font-family: var(--type-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--paint-low);
}

.bet-stepper__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.bet-stepper__btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line-sharp);
    background: var(--ink-mid);
    color: var(--paint);
    font-family: var(--type-display);
    font-size: 18px;
    border-radius: var(--rad-1);
    transition: all .18s ease;
}

.bet-stepper__btn:hover {
    background: var(--flare);
    color: var(--ink-deep);
    border-color: var(--flare);
}

.bet-stepper__v {
    font-family: var(--type-display);
    font-size: 24px;
    color: var(--paint);
    min-width: 50px;
    text-align: center;
}

/* spin button — the big red */
.spin-btn {
    position: relative;
    padding: 18px 44px;
    background:
        linear-gradient(180deg, #ff5530 0%, #ff4019 50%, #b22a0f 100%);
    color: var(--ink-deep);
    font-family: var(--type-display);
    font-size: 22px;
    letter-spacing: 0.08em;
    border: 1px solid var(--flare);
    border-radius: var(--rad-1);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.25) inset,
        0 -2px 6px rgba(0,0,0,0.4) inset,
        0 30px 50px -18px rgba(255,64,25,0.5);
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-transform: uppercase;
    min-width: 170px;
}

.spin-btn:hover {
    transform: translateY(-2px);
}

.spin-btn:active {
    transform: translateY(1px);
}

.spin-btn:disabled {
    filter: grayscale(0.7) brightness(0.7);
    cursor: wait;
}

.spin-btn.is-spinning {
    animation: pz-spin-pulse 0.6s ease-in-out infinite;
}

@keyframes pz-spin-pulse {
    0%, 100% { box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 30px 50px -18px rgba(255,64,25,0.5); }
    50%      { box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 30px 80px -18px rgba(255,64,25,0.95); }
}

.spin-btn__label {
    line-height: 1;
}

.spin-btn__sub {
    font-family: var(--type-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    font-weight: 600;
    opacity: 0.8;
}

/* reset button */
.reset-btn {
    padding: 0 18px;
    border: 1px solid var(--line-sharp);
    background: transparent;
    color: var(--paint-dim);
    border-radius: var(--rad-1);
    font-family: var(--type-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 70px;
    transition: all .18s ease;
}

.reset-btn:hover {
    color: var(--paint);
    border-color: var(--paint);
}

.reset-btn span:first-child {
    font-size: 18px;
}

.reset-btn__label {
    font-size: 9px;
}


/* ============================================================
   side panel — rules + paytable
   ============================================================ */

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 96px;
}

.panel-card {
    background:
        linear-gradient(180deg, var(--ink-soft) 0%, var(--ink) 100%);
    border: 1px solid var(--line-sharp);
    border-radius: var(--rad-2);
    padding: 22px 24px;
}

.panel-card--warn {
    border-left: 3px solid var(--signal);
}

.panel-card__h {
    font-family: var(--type-display);
    font-weight: 400;
    font-size: 18px;
    color: var(--paint);
    margin-bottom: 14px;
    text-transform: lowercase;
    letter-spacing: -0.005em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.panel-card__rules {
    list-style: none;
    padding: 0;
    margin: 0;
}

.panel-card__rules li {
    position: relative;
    padding: 8px 0 8px 22px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--paint-dim);
    border-bottom: 1px dashed var(--line);
}

.panel-card__rules li:last-child { border-bottom: 0; }

.panel-card__rules li:before {
    content: '//';
    position: absolute;
    left: 0;
    top: 8px;
    color: var(--flare);
    font-family: var(--type-mono);
    font-size: 11px;
    font-weight: 700;
}

.panel-card__rules strong {
    color: var(--paint);
    font-weight: 700;
}

.panel-card--warn p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--paint-dim);
}

.panel-card--warn a {
    color: var(--signal);
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    display: inline-block;
    margin-top: 6px;
}


/* paytable */
.paytable {
    display: flex;
    flex-direction: column;
}

.paytable__row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
}

.paytable__row:last-child { border-bottom: 0; }

.paytable__icon {
    width: 32px;
    height: 32px;
    display: block;
}

.paytable__name {
    font-family: var(--type-mono);
    font-size: 12px;
    color: var(--paint);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.paytable__mult {
    font-family: var(--type-mono);
    font-size: 11px;
    color: var(--flare);
    letter-spacing: 0.06em;
    font-weight: 600;
}

.paytable__note {
    margin-top: 14px;
    font-size: 11px;
    color: var(--paint-low);
    line-height: 1.5;
    font-style: italic;
}


/* ============================================================
   responsive
   ============================================================ */

@media (max-width: 1100px) {
    .game-stage {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

@media (max-width: 760px) {

    .game-zone {
        padding: 36px 16px 80px;
    }

    .cabinet {
        padding: 18px 16px 16px;
    }

    .cab-hud {
        grid-template-columns: 1fr 1fr;
    }

    .hud-cell {
        padding: 10px 14px;
    }

    .hud-cell--center {
        grid-column: 1 / -1;
        border-top: 1px solid var(--line);
        border-right: 0;
    }

    .hud-cell__v { font-size: 22px; }

    .reels {
        padding: 8px;
        gap: 5px;
    }

    .reel-lines { inset: 8px; }
    .reel-result { inset: 8px; }

    .lines-picker {
        padding: 12px 14px;
        gap: 10px;
    }

    .lines-picker__v {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .line-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .cab-controls {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .spin-btn {
        grid-column: 1 / -1;
        min-width: 0;
        font-size: 20px;
        padding: 16px 20px;
    }

    .reset-btn {
        min-width: 0;
    }

    .bet-stepper__v { font-size: 20px; }

    .reel-result__badge {
        font-size: clamp(26px, 8vw, 44px);
    }

    .panel-card {
        padding: 18px 18px;
    }
}
