/* ============================================================
   Maple River Bend TR1 // game page styles
   ============================================================ */


.tr-stage {
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 28px 100px;
}

.tr-stage-head {
    text-align: center;
    margin-bottom: 44px;
}

.tr-stage-h {
    font-family: var(--rg-font-d);
    font-weight: 400;
    font-size: clamp(40px, 6.4vw, 84px);
    line-height: 0.96;
    color: var(--rg-paint);
    text-transform: uppercase;
    margin: 12px 0 16px;
    letter-spacing: -0.01em;
}

.tr-stage-h em {
    color: var(--rg-ignite);
    font-style: normal;
}

.tr-stage-sub {
    font-family: var(--rg-font-m);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rg-paint-3);
}


/* ---- layout ---- */

.tr-bay {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}


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

.tr-cab {
    position: relative;
    background:
        linear-gradient(180deg, var(--rg-ink-2) 0%, var(--rg-ink-0) 100%);
    border: 1px solid var(--rg-line-2);
    border-top: 3px solid var(--rg-ignite);
    border-radius: var(--rg-r3);
    padding: 28px 28px 24px;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.04) inset,
        0 40px 80px -28px rgba(0,0,0,0.8);
    overflow: hidden;
}


/* HUD */

.tr-hud {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    border: 1px solid var(--rg-line-2);
    background: rgba(7,9,11,0.55);
    border-radius: var(--rg-r1);
    margin-bottom: 22px;
    overflow: hidden;
}

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

.tr-hud-c:last-child { border-right: 0; }
.tr-hud-c-mid { text-align: center; align-items: center; }

.tr-hud-k {
    font-family: var(--rg-font-m);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rg-paint-3);
}

.tr-hud-v {
    font-family: var(--rg-font-d);
    font-size: 26px;
    color: var(--rg-ignite);
    line-height: 1.04;
}

.tr-hud-v-sm {
    font-family: var(--rg-font-m);
    font-size: 13px;
    color: var(--rg-paint);
    letter-spacing: 0.04em;
    font-weight: 600;
}


/* reel area */

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

.tr-reel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background:
        linear-gradient(180deg, var(--rg-ink-1) 0%, var(--rg-ink-2) 50%, var(--rg-ink-1) 100%);
    border-radius: var(--rg-r1);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    position: relative;
}

.tr-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, box-shadow .25s ease;
}

.tr-cell:last-child { border-bottom: 0; }

.tr-cell.is-hit {
    background-color: rgba(204,255,0,0.16);
    box-shadow: 0 0 0 2px var(--rg-ignite) inset, 0 0 18px rgba(204,255,0,0.45) inset;
    animation: tr-flash 0.95s ease-in-out infinite;
}

@keyframes tr-flash {
    0%, 100% { background-color: rgba(204,255,0,0.16); }
    50%      { background-color: rgba(204,255,0,0.34); }
}

/* rolling reel motion strip */
.tr-reel.is-rolling .tr-cell {
    background-image: linear-gradient(180deg,
        var(--rg-ignite) 0%,
        var(--rg-ink-1) 14%,
        var(--rg-paint-3) 28%,
        var(--rg-ink-1) 42%,
        var(--rg-ignite-dim) 56%,
        var(--rg-ink-1) 70%,
        var(--rg-paint) 84%,
        var(--rg-ignite) 100%);
    background-size: 100% 1200%;
    animation: tr-roll 0.12s linear infinite;
}

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

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


/* win / lose overlay */
.tr-out {
    position: absolute;
    inset: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7,9,11,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(--rg-r2);
}

.tr-out.is-on { opacity: 1; }

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

.tr-out.is-on .tr-out-inner { transform: scale(1); }

.tr-out-tag {
    font-family: var(--rg-font-d);
    font-size: clamp(34px, 6vw, 72px);
    color: var(--rg-ignite);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: 0 0 24px rgba(204,255,0,0.45);
}

.tr-out[data-s="lose"] .tr-out-tag {
    color: var(--rg-paint-3);
    text-shadow: none;
}

.tr-out-amt {
    font-family: var(--rg-font-m);
    font-size: 16px;
    color: var(--rg-paint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
}


/* line picker */
.tr-pick {
    margin: 22px 0 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: rgba(7,9,11,0.55);
    border: 1px solid var(--rg-line);
    border-radius: var(--rg-r1);
}

.tr-pick-k {
    font-family: var(--rg-font-m);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--rg-paint-3);
}

.tr-pick-row {
    display: flex;
    gap: 8px;
}

.tr-line-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--rg-r1);
    border: 1px solid var(--rg-line-2);
    background: var(--rg-surface);
    color: var(--rg-paint-3);
    font-family: var(--rg-font-d);
    font-size: 16px;
    transition: all .18s ease;
}

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

.tr-line-btn.is-on {
    background: var(--rg-ignite);
    color: var(--rg-ink-0);
    border-color: var(--rg-ignite);
    box-shadow: 0 6px 18px -8px rgba(204,255,0,0.5);
}

.tr-pick-v {
    margin-left: auto;
    font-family: var(--rg-font-m);
    font-size: 12px;
    color: var(--rg-ignite);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
}


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

.tr-bet {
    background: rgba(7,9,11,0.55);
    border: 1px solid var(--rg-line);
    border-radius: var(--rg-r1);
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tr-bet-k {
    font-family: var(--rg-font-m);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rg-paint-3);
}

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

.tr-bet-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--rg-line-2);
    background: var(--rg-surface);
    color: var(--rg-paint);
    font-family: var(--rg-font-d);
    font-size: 18px;
    border-radius: var(--rg-r1);
    transition: all .18s ease;
}

.tr-bet-btn:hover {
    background: var(--rg-ignite);
    color: var(--rg-ink-0);
    border-color: var(--rg-ignite);
}

.tr-bet-v {
    font-family: var(--rg-font-d);
    font-size: 24px;
    color: var(--rg-paint);
    min-width: 56px;
    text-align: center;
}


/* spin button */
.tr-spin {
    position: relative;
    padding: 18px 44px;
    background: linear-gradient(180deg, #d7ff33 0%, #ccff00 50%, #aacc00 100%);
    color: var(--rg-ink-0);
    font-family: var(--rg-font-d);
    font-size: 24px;
    letter-spacing: 0.08em;
    border: 1px solid var(--rg-ignite);
    border-radius: var(--rg-r1);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.3) inset,
        0 -2px 6px rgba(0,0,0,0.3) inset,
        0 30px 50px -20px rgba(204,255,0,0.45);
    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;
}

.tr-spin:hover { transform: translateY(-2px); }
.tr-spin:active { transform: translateY(1px); }
.tr-spin:disabled {
    filter: grayscale(0.6) brightness(0.75);
    cursor: wait;
}
.tr-spin.is-spinning { animation: tr-spin-pulse 0.6s ease-in-out infinite; }

@keyframes tr-spin-pulse {
    0%, 100% { box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 30px 50px -20px rgba(204,255,0,0.45); }
    50%      { box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 30px 80px -20px rgba(204,255,0,0.9); }
}

.tr-spin-lab { line-height: 1; }

.tr-spin-sub {
    font-family: var(--rg-font-m);
    font-size: 11px;
    letter-spacing: 0.16em;
    font-weight: 600;
    opacity: 0.85;
}

.tr-reset {
    padding: 0 18px;
    border: 1px solid var(--rg-line-2);
    background: transparent;
    color: var(--rg-paint-2);
    border-radius: var(--rg-r1);
    font-family: var(--rg-font-m);
    font-size: 10px;
    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;
}

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

.tr-reset-i { font-size: 18px; }


/* ---- side panel ---- */

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

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

.tr-panel-warn {
    border-left: 3px solid var(--rg-alert);
}

.tr-panel-h {
    font-family: var(--rg-font-d);
    font-weight: 400;
    font-size: 18px;
    color: var(--rg-paint);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: -0.005em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rg-line);
}

.tr-rules {
    list-style: none;
}

.tr-rules li {
    position: relative;
    padding: 7px 0 7px 22px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--rg-paint-2);
    border-bottom: 1px dashed var(--rg-line);
}
.tr-rules li:last-child { border-bottom: 0; }

.tr-rules li::before {
    content: '//';
    position: absolute;
    left: 0;
    top: 7px;
    color: var(--rg-ignite);
    font-family: var(--rg-font-m);
    font-size: 11px;
    font-weight: 700;
}

.tr-rules strong {
    color: var(--rg-paint);
    font-weight: 700;
}

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

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


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

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

.tr-pay-i {
    width: 32px;
    height: 32px;
    display: block;
}

.tr-pay-n {
    font-family: var(--rg-font-m);
    font-size: 12px;
    color: var(--rg-paint);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tr-pay-m {
    font-family: var(--rg-font-m);
    font-size: 11px;
    color: var(--rg-ignite);
    letter-spacing: 0.06em;
    font-weight: 600;
}

.tr-pay-note {
    margin-top: 14px;
    font-size: 11px;
    color: var(--rg-paint-3);
    line-height: 1.55;
    font-style: italic;
}


/* ---- responsive ---- */

@media (max-width: 1100px) {
    .tr-bay { grid-template-columns: 1fr; }
    .tr-side { position: static; }
}

@media (max-width: 760px) {

    .tr-stage { padding: 32px 16px 70px; }
    .tr-cab { padding: 18px 16px 16px; }

    .tr-hud { grid-template-columns: 1fr 1fr; }
    .tr-hud-c { padding: 10px 14px; }
    .tr-hud-c-mid {
        grid-column: 1 / -1;
        border-top: 1px solid var(--rg-line);
        border-right: 0;
    }
    .tr-hud-v { font-size: 22px; }

    .tr-reels { padding: 8px; gap: 5px; }
    .tr-lines { inset: 8px; }
    .tr-out { inset: 8px; }

    .tr-pick { padding: 12px 14px; gap: 10px; }
    .tr-pick-v { margin-left: 0; width: 100%; text-align: center; }
    .tr-line-btn { width: 34px; height: 34px; font-size: 14px; }

    .tr-ctl { grid-template-columns: 1fr 1fr; gap: 10px; }
    .tr-spin {
        grid-column: 1 / -1;
        min-width: 0;
        font-size: 22px;
        padding: 16px 20px;
    }
    .tr-reset { min-width: 0; }
    .tr-bet-v { font-size: 20px; }

    .tr-out-tag { font-size: clamp(26px, 8vw, 44px); }
    .tr-panel { padding: 18px 18px; }
}
