/* =========================================
   KENO — CRASH
   PREMIUM EDITION
   ========================================= */

:root {
    --crash-bg: #0b0c10;
    --crash-panel: #111319;
    --crash-border: #252933;

    --crash-text: #f2f2f4;
    --crash-muted: #777c88;

    --crash-green: #59d99a;
    --crash-green-light: #8bf0bc;

    --crash-red: #ff6674;
    --crash-gold: #d7b36a;
}


/* =========================================
   GLOBAL
   ========================================= */

* {
    box-sizing: border-box;
}


body {
    background:
        radial-gradient(
            circle at 50% 25%,
            rgba(40, 49, 42, .20),
            transparent 38%
        ),
        #0b0c10;
}


/* =========================================
   PAGE
   ========================================= */

.crash-page {
    width: min(
        1240px,
        calc(100% - 40px)
    );

    margin: 0 auto;

    padding:
        42px 0 80px;
}


/* =========================================
   BACK
   ========================================= */

.back-row {
    margin-bottom: 25px;
}


.back-button {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    color: #858a96;

    text-decoration: none;

    font-size: 12px;
    font-weight: 700;

    transition:
        color .2s ease,
        transform .2s ease;
}


.back-button:hover {
    color: #fff;

    transform:
        translateX(-2px);
}


/* =========================================
   HEADING
   ========================================= */

.game-heading {
    display: flex;

    justify-content:
        space-between;

    align-items:
        flex-end;

    gap: 30px;

    margin-bottom: 28px;
}


.eyebrow {
    margin:
        0 0 8px;

    color: #666b76;

    font-size: 10px;
    font-weight: 800;

    letter-spacing:
        2.5px;
}


.game-heading h1 {
    margin: 0;

    color: #f5f5f6;

    font-size:
        clamp(32px, 5vw, 52px);

    line-height: 1;

    letter-spacing:
        -2px;
}


.game-heading p:not(.eyebrow) {
    margin:
        12px 0 0;

    color: #777c88;

    font-size: 13px;
}


/* =========================================
   STATUS
   ========================================= */

.round-status {
    padding:
        9px 13px;

    border:
        1px solid #292d35;

    border-radius: 7px;

    background:
        #111319;

    color:
        #777c88;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1px;

    white-space: nowrap;

    transition:
        .2s ease;
}


.round-status.playing {
    color:
        var(--crash-green);

    border-color:
        rgba(89,217,154,.25);

    background:
        rgba(89,217,154,.05);
}


.round-status.win {
    color:
        var(--crash-green);

    border-color:
        rgba(89,217,154,.25);

    background:
        rgba(89,217,154,.055);
}


.round-status.loss {
    color:
        var(--crash-red);

    border-color:
        rgba(255,102,116,.22);

    background:
        rgba(255,102,116,.045);
}


/* =========================================
   LAYOUT
   ========================================= */

.crash-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        310px;

    gap: 18px;

    align-items:
        stretch;
}


/* =========================================
   CRASH PANEL
   ========================================= */

.crash-panel {
    min-height: 590px;

    overflow: hidden;

    position: relative;

    border:
        1px solid
        var(--crash-border);

    border-radius: 14px;

    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(53,119,82,.22),
            transparent 48%
        ),

        radial-gradient(
            circle at 50% 100%,
            rgba(0,0,0,.55),
            transparent 55%
        ),

        linear-gradient(
            145deg,
            #141a19,
            #0c1010
        );

    box-shadow:
        inset 0 1px 0
            rgba(255,255,255,.035),

        inset 0 0 80px
            rgba(0,0,0,.25),

        0 25px 70px
            rgba(0,0,0,.42);
}


/* =========================================
   GRAPH
   ========================================= */

.graph-area {
    height: 520px;

    position: relative;

    overflow: hidden;
}


.graph-area::before {
    content: "";

    position: absolute;

    inset: 10px;

    border:
        1px solid
        rgba(89,217,154,.055);

    border-radius: 9px;

    pointer-events: none;

    z-index: 10;
}


/* =========================================
   GRID
   ========================================= */

.grid-lines {
    position: absolute;

    inset: 0;

    opacity: .65;

    background-image:
        linear-gradient(
            rgba(255,255,255,.035) 1px,
            transparent 1px
        ),

        linear-gradient(
            90deg,
            rgba(255,255,255,.035) 1px,
            transparent 1px
        );

    background-size:
        70px 70px;

    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 90%
        );
}


/* =========================================
   GLOW
   ========================================= */

.graph-glow {
    position: absolute;

    width: 320px;
    height: 320px;

    left: 20%;
    bottom: -150px;

    border-radius: 50%;

    background:
        rgba(89,217,154,.10);

    filter:
        blur(80px);

    opacity: .7;

    transition:
        left .1s linear,
        bottom .1s linear;
}


/* =========================================
   SVG GRAPH
   ========================================= */

.graph-line {
    position: absolute;

    inset: 0;

    z-index: 2;
}


.graph-line svg {
    width: 100%;
    height: 100%;

    overflow: visible;
}


.graph-path {
    fill: none;

    stroke:
        url(#lineGradient);

    stroke-width: 5;

    stroke-linecap: round;

    stroke-linejoin: round;

    filter:
        drop-shadow(
            0 0 8px
            rgba(89,217,154,.45)
        );
}


.area-path {
    fill:
        url(#areaGradient);

    stroke: none;
}


/* =========================================
   MULTIPLIER
   ========================================= */

.crash-multiplier {
    position: absolute;

    left: 50%;
    top: 45%;

    transform:
        translate(-50%, -50%);

    z-index: 5;

    color:
        #f4f5f5;

    font-size:
        clamp(48px, 7vw, 82px);

    font-weight: 900;

    letter-spacing:
        -4px;

    text-shadow:
        0 0 35px
        rgba(89,217,154,.16);

    transition:
        color .2s ease,
        transform .2s ease;
}


.crash-multiplier.playing {
    color:
        var(--crash-green);

    text-shadow:
        0 0 40px
        rgba(89,217,154,.25);

    animation:
        multiplierPulse 1.2s ease-in-out infinite;
}


.crash-multiplier.crashed {
    color:
        var(--crash-red);

    text-shadow:
        0 0 40px
        rgba(255,102,116,.22);

    animation:
        crashShake .35s ease;
}


@keyframes multiplierPulse {

    0%,
    100% {
        transform:
            translate(-50%, -50%)
            scale(1);
    }

    50% {
        transform:
            translate(-50%, -50%)
            scale(1.025);
    }
}


@keyframes crashShake {

    0% {
        transform:
            translate(-50%, -50%);
    }

    25% {
        transform:
            translate(calc(-50% - 5px), -50%);
    }

    50% {
        transform:
            translate(calc(-50% + 5px), -50%);
    }

    75% {
        transform:
            translate(calc(-50% - 3px), -50%);
    }

    100% {
        transform:
            translate(-50%, -50%);
    }
}


/* =========================================
   MESSAGE
   ========================================= */

.crash-message {
    position: absolute;

    left: 50%;
    top: calc(45% + 65px);

    transform:
        translateX(-50%);

    z-index: 5;

    color:
        #626873;

    font-size: 10px;
    font-weight: 800;

    letter-spacing:
        1px;

    text-transform:
        uppercase;

    white-space: nowrap;
}


.crash-message.win {
    color:
        var(--crash-green);
}


.crash-message.loss {
    color:
        var(--crash-red);
}


/* =========================================
   CRASH POINT
   ========================================= */

.crash-point {
    position: absolute;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    background:
        var(--crash-red);

    box-shadow:
        0 0 0 5px
        rgba(255,102,116,.08),

        0 0 22px
        rgba(255,102,116,.45);

    opacity: 0;

    transform:
        scale(.4);

    z-index: 6;

    transition:
        opacity .2s ease,
        transform .2s ease;
}


.crash-point.show {
    opacity: 1;

    transform:
        scale(1);
}


/* =========================================
   GRAPH FOOTER
   ========================================= */

.graph-footer {
    height: 70px;

    display: flex;

    justify-content:
        space-between;

    align-items:
        center;

    padding:
        0 24px;

    border-top:
        1px solid
        rgba(255,255,255,.05);

    background:
        rgba(0,0,0,.14);
}


.graph-footer div {
    display: flex;

    flex-direction:
        column;

    gap: 4px;
}


.graph-footer span {
    color:
        #60656f;

    font-size: 7px;
    font-weight: 800;

    letter-spacing:
        1.2px;
}


.graph-footer strong {
    color:
        #bfc1c5;

    font-size: 11px;
}


/* =========================================
   CONTROL PANEL
   ========================================= */

.control-panel {
    padding: 22px;

    border:
        1px solid
        var(--crash-border);

    border-radius: 14px;

    background:
        linear-gradient(
            160deg,
            #14171e 0%,
            #101218 65%
        );

    box-shadow:
        inset 0 1px 0
            rgba(255,255,255,.025),

        0 25px 60px
            rgba(0,0,0,.32);
}


/* =========================================
   PANEL TITLE
   ========================================= */

.panel-title {
    display: flex;

    align-items:
        center;

    justify-content:
        space-between;

    margin-bottom:
        12px;

    padding-bottom:
        13px;

    border-bottom:
        1px solid
        rgba(255,255,255,.045);
}


.panel-title span {
    color:
        #6d727e;

    font-size: 9px;
    font-weight: 800;

    letter-spacing:
        1.7px;
}


.panel-title strong {
    color:
        #e6e6e8;

    font-size: 18px;
}


/* =========================================
   INPUT
   ========================================= */

.bet-input-wrap {
    height: 48px;

    display: flex;

    align-items:
        center;

    padding:
        0 13px;

    border:
        1px solid
        #2a2e37;

    border-radius: 7px;

    background:
        linear-gradient(
            180deg,
            #181b23,
            #14171d
        );

    box-shadow:
        inset 0 1px 0
        rgba(255,255,255,.025);

    transition:
        border-color .2s ease;
}


.bet-input-wrap:focus-within {
    border-color:
        #444a56;
}


.bet-input-wrap span {
    color:
        #676c77;

    font-size: 14px;
    font-weight: 700;
}


.bet-input-wrap input {
    width: 100%;
    height: 100%;

    padding-left: 7px;

    border: 0;
    outline: 0;

    background:
        transparent;

    color:
        #eeeef0;

    font-family:
        inherit;

    font-size: 15px;
    font-weight: 700;
}


.bet-input-wrap input::-webkit-inner-spin-button,
.bet-input-wrap input::-webkit-outer-spin-button {
    appearance: none;
}


/* =========================================
   QUICK BETS
   ========================================= */

.quick-bets {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 6px;

    margin-top: 8px;
}


.quick-bets button {
    height: 32px;

    border:
        1px solid
        #292d35;

    border-radius: 6px;

    background:
        #171a21;

    color:
        #858a96;

    cursor: pointer;

    font-family:
        inherit;

    font-size: 10px;
    font-weight: 800;

    transition:
        .15s ease;
}


.quick-bets button:hover {
    border-color:
        #3b404b;

    background:
        #1d2028;

    color:
        #e7e7e9;
}


.quick-bets button:active {
    transform:
        scale(.96);
}


/* =========================================
   MAIN ACTION
   ========================================= */

.main-action {
    width: 100%;

    height: 51px;

    margin-top: 15px;

    border:
        1px solid
        rgba(89,217,154,.28);

    border-radius: 7px;

    background:
        linear-gradient(
            180deg,
            #1c4735,
            #163727
        );

    color:
        #6de0a5;

    cursor: pointer;

    font-family:
        inherit;

    font-size: 11px;
    font-weight: 900;

    letter-spacing:
        1px;

    box-shadow:
        0 8px 20px
            rgba(24,82,57,.12),

        inset 0 1px 0
            rgba(255,255,255,.04);

    transition:
        .18s ease;
}


.main-action:hover:not(:disabled) {
    background:
        linear-gradient(
            180deg,
            #22523e,
            #19432f
        );

    border-color:
        rgba(89,217,154,.42);

    transform:
        translateY(-1px);
}


.main-action.cashout {
    border-color:
        rgba(215,179,106,.35);

    background:
        linear-gradient(
            180deg,
            #44391f,
            #342b19
        );

    color:
        var(--crash-gold);
}


.main-action.cashout:hover {
    border-color:
        rgba(215,179,106,.55);

    background:
        linear-gradient(
            180deg,
            #514323,
            #3d321c
        );
}


.main-action:disabled {
    opacity:
        .38;

    cursor:
        not-allowed;
}


/* =========================================
   CURRENT INFO
   ========================================= */

.current-info {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 7px;

    margin-top: 8px;
}


.current-info div {
    padding:
        11px;

    border:
        1px solid
        #242832;

    border-radius: 7px;

    background:
        linear-gradient(
            145deg,
            #161920,
            #12151b
        );
}


.current-info span {
    display: block;

    color:
        #626771;

    font-size: 7px;
    font-weight: 800;

    letter-spacing:
        1px;
}


.current-info strong {
    display: block;

    margin-top: 5px;

    color:
        #dfe0e2;

    font-size: 12px;
}


.current-info strong.active {
    color:
        var(--crash-green);
}


/* =========================================
   RULES
   ========================================= */

.rules {
    margin-top: 18px;

    padding-top: 17px;

    border-top:
        1px solid
        #242730;
}


.rules-title {
    margin-bottom:
        11px;

    color:
        #626771;

    font-size: 8px;
    font-weight: 900;

    letter-spacing:
        1.5px;
}


.rule-row {
    display: flex;

    justify-content:
        space-between;

    padding:
        6px 0;

    color:
        #6e737e;

    font-size: 9px;
}


.rule-row strong {
    color:
        #b7bac0;

    font-size: 9px;
}


/* =========================================
   HISTORY
   ========================================= */

.history-section {
    margin-top: 45px;
}


.section-heading {
    display: flex;

    justify-content:
        space-between;

    align-items:
        flex-end;

    margin-bottom: 14px;
}


.section-heading p {
    margin:
        0 0 5px;

    color:
        #626771;

    font-size: 8px;
    font-weight: 900;

    letter-spacing:
        2px;
}


.section-heading h2 {
    margin: 0;

    color:
        #e8e8ea;

    font-size: 21px;

    letter-spacing:
        -.5px;
}


.section-heading > span {
    color:
        #656a75;

    font-size: 9px;
    font-weight: 700;
}


.history-list {
    display: grid;

    gap: 6px;
}


.empty-history {
    padding: 24px;

    border:
        1px dashed
        #282c34;

    border-radius: 8px;

    color:
        #565b65;

    font-size: 10px;

    text-align:
        center;
}


.history-item {
    display: grid;

    grid-template-columns:
        80px
        1fr
        110px
        100px;

    align-items:
        center;

    gap: 15px;

    min-height: 55px;

    padding:
        10px 15px;

    border:
        1px solid
        #20242c;

    border-radius: 7px;

    background:
        linear-gradient(
            145deg,
            #13161c,
            #101218
        );

    transition:
        border-color .18s ease,
        transform .18s ease;
}


.history-item:hover {
    transform:
        translateY(-1px);

    border-color:
        #2d323c;
}


.history-id {
    color:
        #646974;

    font-size: 9px;
    font-weight: 800;
}


.history-multiplier {
    color:
        #bfc1c5;

    font-size: 11px;
    font-weight: 800;
}


.history-result {
    font-size: 9px;
    font-weight: 900;

    text-align:
        center;

    letter-spacing:
        .5px;
}


.history-result.win {
    color:
        var(--crash-green);
}


.history-result.loss {
    color:
        var(--crash-red);
}


.history-profit {
    font-size: 10px;
    font-weight: 900;

    text-align:
        right;
}


.history-profit.positive {
    color:
        var(--crash-green);
}


.history-profit.negative {
    color:
        var(--crash-red);
}


/* =========================================
   NOTIFICATION
   ========================================= */

.notification {
    position: fixed;

    left: 50%;
    bottom: 25px;

    z-index: 100;

    transform:
        translate(-50%, 20px);

    padding:
        11px 16px;

    border:
        1px solid
        #2c3038;

    border-radius: 7px;

    background:
        #15181f;

    color:
        #d9dade;

    font-size: 10px;
    font-weight: 700;

    opacity: 0;

    pointer-events:
        none;

    transition:
        .25s ease;

    box-shadow:
        0 12px 35px
        rgba(0,0,0,.4);
}


.notification.show {
    opacity: 1;

    transform:
        translate(-50%, 0);
}


/* =========================================
   TABLET
   ========================================= */

@media (max-width: 900px) {

    .crash-layout {
        grid-template-columns:
            1fr;
    }

    .control-panel {
        order: 2;
    }

    .crash-panel {
        min-height:
            560px;
    }
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 650px) {

    .crash-page {
        width:
            min(
                100% - 22px,
                1240px
            );

        padding-top:
            25px;
    }


    .game-heading {
        align-items:
            flex-start;

        flex-direction:
            column;

        gap: 15px;
    }


    .game-heading h1 {
        font-size:
            38px;
    }


    .crash-panel {
        min-height:
            500px;
    }


    .graph-area {
        height:
            430px;
    }


    .crash-multiplier {
        font-size:
            52px;
    }


    .history-item {
        grid-template-columns:
            55px
            1fr
            75px;
    }


    .history-profit {
        display:
            none;
    }
}


/* =========================================
   AUTO CASH OUT
   ========================================= */

.auto-cashout {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.auto-cashout-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auto-cashout-top > span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--muted);
}

.auto-cashout-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(0, 0, 0, .18);
}

.auto-cashout-input span {
    color: var(--green);
    font-weight: 800;
}

.auto-cashout-input input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.auto-cashout-input input:disabled {
    opacity: .45;
}


/* SWITCH */

.switch {
    position: relative;
    width: 42px;
    height: 23px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: 999px;
    background: #292c33;
    transition: .2s;
}

.slider::before {
    content: "";
    position: absolute;
    width: 17px;
    height: 17px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #8b8f98;
    transition: .2s;
}

.switch input:checked + .slider {
    background: rgba(89, 217, 154, .25);
}

.switch input:checked + .slider::before {
    transform: translateX(19px);
    background: var(--green);
}

/* =========================================
   SMALL PHONES
   ========================================= */

@media (max-width: 420px) {

    .control-panel {
        padding:
            16px;
    }


    .graph-area {
        height:
            390px;
    }


    .crash-multiplier {
        font-size:
            43px;

        letter-spacing:
            -2px;
    }


    .current-info {
        grid-template-columns:
            1fr;
    }

}