/* =========================================
   KENO — BLACKJACK
   PREMIUM EDITION
   ========================================= */

:root {
    --bj-bg: #0b0c10;
    --bj-panel: #111319;
    --bj-panel-2: #151820;
    --bj-border: #252933;
    --bj-border-light: #30343e;

    --bj-text: #f2f2f4;
    --bj-muted: #777c88;

    --bj-green: #59d99a;
    --bj-green-dark: #163c2d;

    --bj-red: #ff6674;

    --bj-gold: #d7b36a;
}


/* =========================================
   GLOBAL
   ========================================= */

* {
    box-sizing: border-box;
}

body {
    background:
        radial-gradient(
            circle at 50% 25%,
            rgba(40, 49, 42, .20),
            transparent 38%
        ),
        #0b0c10;
}


/* =========================================
   PAGE
   ========================================= */

.blackjack-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;
}


/* =========================================
   ROUND 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:
        color .2s ease,
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.round-status.playing {
    color:
        var(--bj-green);

    border-color:
        rgba(89,217,154,.25);

    background:
        rgba(89,217,154,.05);
}

.round-status.win {
    color:
        var(--bj-green);

    border-color:
        rgba(89,217,154,.24);

    background:
        rgba(89,217,154,.055);

    box-shadow:
        0 0 20px
        rgba(89,217,154,.05);
}

.round-status.loss {
    color:
        var(--bj-red);

    border-color:
        rgba(255,102,116,.22);

    background:
        rgba(255,102,116,.045);
}


/* =========================================
   MAIN LAYOUT
   ========================================= */

.blackjack-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        310px;

    gap: 18px;

    align-items:
        stretch;
}


/* =========================================
   TABLE
   ========================================= */

.table-panel {
    min-height: 590px;

    position: relative;

    overflow: hidden;

    padding:
        42px 42px 30px;

    border:
        1px solid var(--bj-border);

    border-radius: 14px;

    background:
        radial-gradient(
            circle at 50% 38%,
            rgba(57,117,82,.24),
            transparent 46%
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(0,0,0,.45),
            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);
}

.table-panel::before {
    content: "";

    position: absolute;

    inset: 10px;

    border:
        1px solid
        rgba(89,217,154,.055);

    border-radius: 9px;

    pointer-events: none;
}


/* =========================================
   HANDS
   ========================================= */

.dealer-section,
.player-section {
    position: relative;

    z-index: 1;
}

.hand-header {
    display: flex;

    justify-content:
        space-between;

    align-items:
        center;

    margin-bottom:
        20px;
}

.hand-header > div {
    display: flex;

    align-items:
        baseline;

    gap: 10px;
}

.hand-label {
    color: #777c88;

    font-size: 9px;
    font-weight: 800;

    letter-spacing:
        2px;
}

.hand-header strong {
    color: #e9e9eb;

    font-size: 21px;

    letter-spacing:
        -.4px;
}

.hand-result {
    min-height: 14px;

    color: #858a95;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1px;

    text-transform:
        uppercase;
}


/* =========================================
   CARDS AREA
   ========================================= */

.cards {
    min-height: 165px;

    display: flex;

    align-items:
        center;

    gap: 10px;

    flex-wrap: wrap;

    padding:
        4px 0;
}


/* =========================================
   DIVIDER
   ========================================= */

.table-divider {
    height: 1px;

    margin:
        26px 0;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.08),
            transparent
        );
}


/* =========================================
   PLAYING CARD
   ========================================= */

.card {
    width: 94px;
    height: 136px;

    position: relative;

    flex: 0 0 auto;

    border:
        1px solid #c9c9c9;

    border-radius: 10px;

    background:
        linear-gradient(
            145deg,
            #fafaf8,
            #e9e9e5
        );

    box-shadow:
        0 12px 25px
            rgba(0,0,0,.35),

        0 3px 7px
            rgba(0,0,0,.22),

        inset 0 0 0 1px
            rgba(255,255,255,.18);

    animation:
        cardIn .32s
        cubic-bezier(.2,.8,.2,1);

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

.card:hover {
    transform:
        translateY(-5px);

    box-shadow:
        0 17px 32px
            rgba(0,0,0,.42),

        0 4px 9px
            rgba(0,0,0,.25),

        inset 0 0 0 1px
            rgba(255,255,255,.2);
}

@keyframes cardIn {
    from {
        opacity: 0;

        transform:
            translateY(-14px)
            scale(.94);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

.card.red {
    color: #d93848;
}

.card.black {
    color: #191a1e;
}


/* =========================================
   CARD CORNERS
   ========================================= */

.card-corner {
    position: absolute;

    top: 8px;
    left: 9px;

    display: flex;

    flex-direction:
        column;

    align-items:
        center;

    line-height:
        .95;
}

.card-corner.bottom {
    top: auto;
    left: auto;

    right: 9px;
    bottom: 8px;

    transform:
        rotate(180deg);
}

.card-rank {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 22px;

    font-weight: 700;
}

.card-suit {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 17px;

    margin-top: 2px;
}

.card-center {
    position: absolute;

    inset: 0;

    display: flex;

    align-items:
        center;

    justify-content:
        center;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 48px;
}


/* =========================================
   CARD BACK
   ========================================= */

.card.back {
    border-color:
        #343842;

    background:
        radial-gradient(
            circle at center,
            rgba(215,179,106,.10),
            transparent 45%
        ),

        repeating-linear-gradient(
            45deg,
            rgba(255,255,255,.035) 0,
            rgba(255,255,255,.035) 2px,
            transparent 2px,
            transparent 7px
        ),

        #171a20;

    box-shadow:
        0 12px 25px
            rgba(0,0,0,.38),

        inset 0 0 25px
            rgba(0,0,0,.5);
}

.card.back::before {
    content:
        "K";

    position: absolute;

    inset: 9px;

    display: flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid
        rgba(215,179,106,.35);

    border-radius: 5px;

    color:
        #d7b36a;

    font-family:
        Georgia,
        serif;

    font-size: 30px;

    font-weight: 700;

    box-shadow:
        inset 0 0 15px
        rgba(215,179,106,.05);
}


/* =========================================
   MESSAGE
   ========================================= */

.game-message {
    position: absolute;

    left: 50%;
    bottom: 27px;

    transform:
        translateX(-50%);

    width:
        calc(100% - 84px);

    padding: 12px;

    border:
        1px solid
        rgba(255,255,255,.055);

    border-radius: 7px;

    background:
        rgba(5,8,8,.28);

    backdrop-filter:
        blur(8px);

    color:
        #6f7480;

    font-size: 10px;
    font-weight: 700;

    text-align:
        center;

    letter-spacing:
        .4px;

    box-shadow:
        inset 0 1px 0
        rgba(255,255,255,.02);

    transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease;
}

.game-message.win {
    color:
        #6de0a5;

    border-color:
        rgba(89,217,154,.24);

    background:
        linear-gradient(
            90deg,
            rgba(89,217,154,.035),
            rgba(89,217,154,.09),
            rgba(89,217,154,.035)
        );

    box-shadow:
        0 0 30px
            rgba(89,217,154,.06),

        inset 0 1px 0
            rgba(255,255,255,.025);
}

.game-message.loss {
    color:
        var(--bj-red);

    background:
        linear-gradient(
            90deg,
            rgba(255,102,116,.025),
            rgba(255,102,116,.07),
            rgba(255,102,116,.025)
        );
}

.game-message.push {
    color:
        var(--bj-gold);
}


/* =========================================
   CONTROL PANEL
   ========================================= */

.control-panel {
    padding: 22px;

    border:
        1px solid
        var(--bj-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);
}


/* =========================================
   BET 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:
        transform .15s ease,
        background .15s ease,
        border-color .15s ease,
        color .15s ease;
}

.quick-bets button:hover {
    border-color:
        #3b404b;

    background:
        #1d2028;

    color:
        #e7e7e9;
}

.quick-bets button:active {
    transform:
        scale(.96);
}


/* =========================================
   DEAL
   ========================================= */

.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);

    box-shadow:
        0 10px 25px
            rgba(35,111,77,.20),

        inset 0 1px 0
            rgba(255,255,255,.06);
}

.main-action:disabled {
    opacity:
        .38;

    cursor:
        not-allowed;
}


/* =========================================
   ACTION BUTTONS
   ========================================= */

.play-actions {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 7px;

    margin-top: 8px;
}

.action-button {
    min-height: 54px;

    padding: 7px;

    border:
        1px solid
        #292d35;

    border-radius: 7px;

    background:
        linear-gradient(
            180deg,
            #1a1d25,
            #161920
        );

    color:
        #858a95;

    cursor: pointer;

    font-family:
        inherit;

    box-shadow:
        inset 0 1px 0
        rgba(255,255,255,.025);

    transition:
        .18s ease;
}

.action-button:hover:not(:disabled) {
    border-color:
        #424752;

    background:
        #1c2028;

    color:
        #eee;

    transform:
        translateY(-1px);

    box-shadow:
        0 7px 18px
            rgba(0,0,0,.22),

        inset 0 1px 0
            rgba(255,255,255,.035);
}

.action-button:disabled {
    opacity:
        .27;

    cursor:
        not-allowed;
}

.action-button span {
    display: block;

    font-size: 10px;
    font-weight: 900;

    letter-spacing:
        .8px;
}

.action-button small {
    display: block;

    margin-top: 4px;

    color:
        #60656f;

    font-size: 8px;
    font-weight: 600;
}

.double-button {
    grid-column:
        1 / -1;

    border-color:
        rgba(215,179,106,.16);
}

.double-button:hover:not(:disabled) {
    border-color:
        rgba(215,179,106,.35);

    color:
        #d7b36a;

    background:
        linear-gradient(
            180deg,
            #201f1c,
            #191a1c
        );
}

/* =========================================
   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
   ========================================= */

.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
        100px
        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,
        background .18s ease;
}

.history-item:hover {
    transform:
        translateY(-1px);

    border-color:
        #2d323c;

    background:
        linear-gradient(
            145deg,
            #161920,
            #12151b
        );
}

.history-id {
    color:
        #646974;

    font-size: 9px;
    font-weight: 800;

    font-variant-numeric:
        tabular-nums;
}

.history-cards {
    display: flex;

    gap: 4px;
}

.mini-card {
    min-width: 27px;
    height: 31px;

    display: inline-flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        0 5px;

    border-radius: 4px;

    background:
        #e9e9e6;

    color:
        #18191c;

    font-family:
        Georgia,
        serif;

    font-size: 10px;
    font-weight: 700;

    border:
        1px solid
        rgba(0,0,0,.08);

    box-shadow:
        0 2px 5px
        rgba(0,0,0,.18);
}

.mini-card.red {
    color:
        #d93848;
}

.history-result {
    font-size: 9px;
    font-weight: 900;

    text-align:
        center;

    letter-spacing:
        .5px;
}

.history-result.win {
    color:
        var(--bj-green);
}

.history-result.loss {
    color:
        var(--bj-red);
}

.history-result.push {
    color:
        var(--bj-gold);
}

.history-profit {
    font-size: 10px;
    font-weight: 900;

    text-align:
        right;
}

.history-profit.positive {
    color:
        var(--bj-green);
}

.history-profit.negative {
    color:
        var(--bj-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) {

    .blackjack-layout {
        grid-template-columns:
            1fr;
    }

    .control-panel {
        order: 2;
    }

    .table-panel {
        min-height:
            560px;
    }
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 650px) {

    .blackjack-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;
    }

    .table-panel {
        min-height:
            500px;

        padding:
            28px 18px;
    }

    .cards {
        min-height:
            130px;

        gap: 7px;
    }

    .card {
        width:
            68px;

        height:
            99px;
    }

    .card-rank {
        font-size:
            17px;
    }

    .card-suit {
        font-size:
            13px;
    }

    .card-center {
        font-size:
            35px;
    }

    .card-corner {
        top: 6px;
        left: 6px;
    }

    .card-corner.bottom {
        right: 6px;
        bottom: 6px;
    }

    .game-message {
        width:
            calc(100% - 36px);

        bottom:
            20px;
    }

    .history-item {
        grid-template-columns:
            55px
            1fr
            70px;
    }

    .history-profit {
        display:
            none;
    }
}


/* =========================================
   SMALL PHONES
   ========================================= */

@media (max-width: 420px) {

    .control-panel {
        padding:
            16px;
    }

    .table-panel {
        min-height:
            480px;
    }

    .card {
        width:
            57px;

        height:
            84px;
    }

    .card-rank {
        font-size:
            14px;
    }

    .card-suit {
        font-size:
            11px;
    }

    .card-center {
        font-size:
            29px;
    }

    .card-corner {
        top: 5px;
        left: 5px;
    }

    .card-corner.bottom {
        right: 5px;
        bottom: 5px;
    }

    .hand-header strong {
        font-size:
            16px;
    }
    
}
.all-in-bet {
    background: inherit;
    color: inherit;
    border: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
}

.all-in-bet:hover {
    filter: brightness(1.12);
}

.all-in-bet.active {
    box-shadow: 0 0 0 2px #f5d99b, 0 0 15px #f0cf8366;
}