﻿/* =========================================================
   کارت «بازی با بالاهوش» (داشبورد مشتری و صفحه /games)
   ========================================================= */
.bhg {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 22px;
    color: #fff;
    background: radial-gradient(circle at 12% 0%, rgba(0,174,255,.35), transparent 45%), radial-gradient(circle at 100% 100%, rgba(155,93,229,.35), transparent 50%), linear-gradient(135deg, #0b1240 0%, #1b2363 60%, #24186b 100%);
    box-shadow: 0 18px 40px -16px rgba(11,18,64,.7);
}

    .bhg::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        opacity: .5;
        background: radial-gradient(circle, rgba(255,255,255,.5) 1px, transparent 1.6px) 0 0 / 22px 22px;
        -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
        mask-image: linear-gradient(180deg, #000, transparent 70%);
    }

.bhg-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.bhg-title {
    flex: 1;
    min-width: 0;
}

    .bhg-title h3 {
        margin: 0;
        font-size: 1.4rem;
        font-weight: 900;
        color: #fff;
    }

    .bhg-title p {
        margin: 4px 0 0;
        opacity: .8;
        font-size: .9rem;
        color: white;
    }

.bhg-record {
    display: flex;
    gap: 8px;
}

    .bhg-record div {
        background: rgba(255,255,255,.1);
        border: 1px solid rgba(255,255,255,.14);
        border-radius: 16px;
        padding: 8px 14px;
        text-align: center;
        min-width: 64px;
    }

    .bhg-record b {
        display: block;
        font-size: 1.4rem;
        font-weight: 900;
        line-height: 1.2;
        color: white;
    }

    .bhg-record small {
        font-size: .72rem;
        opacity: .75;
        color: white;
    }

    .bhg-record div:last-child b {
        color: #ffd54f;
    }

.bhg-games {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.bhg-game {
    background: #fff;
    color: #1f2340;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 26px -12px rgba(0,0,0,.5);
    transition: transform .2s;
}

    .bhg-game:hover {
        transform: translateY(-3px);
    }

.bhg-art {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.bhg-info {
    padding: 14px 16px 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .bhg-info b {
        font-size: 1.1rem;
        font-weight: 900;
    }

    .bhg-info small {
        color: #7a7f9a;
        font-size: .8rem;
    }

.bhg-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: .75rem;
    font-weight: 700;
    color: #5b5bd6;
}

.bhg-btns {
    display: flex;
    gap: 8px;
    padding: 10px 16px 16px;
    margin-top: auto;
}

.bhg-btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 900;
    font-size: .9rem;
    border-radius: 14px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

    .bhg-btn .mud-icon-root {
        width: 20px;
        height: 20px;
    }

.bhg-play, .bhg-resume {
    flex: 1;
    color: #fff;
}

.bhg-soccer .bhg-play {
    background: linear-gradient(90deg, #0f9d58, #22b8cf);
    box-shadow: 0 8px 18px -8px #0f9d58;
}

.bhg-dots .bhg-play {
    background: linear-gradient(90deg, #5b5bd6, #9b5de5);
    box-shadow: 0 8px 18px -8px #5b5bd6;
}

.bhg-resume {
    background: linear-gradient(90deg, #ffb300, #ff8f00);
    color: #3e2700;
    box-shadow: 0 8px 18px -8px #ff8f00;
}

.bhg-new {
    background: #f1f2f9;
    color: #4a4f6a;
}

/* تصویر کوچک فوتبال */
.bhg-soccer .bhg-art {
    background: repeating-linear-gradient(90deg, #2fb463 0 12.5%, #29a659 12.5% 25%);
}

.bhg-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    border-left: 2px solid rgba(255,255,255,.7);
}

.bhg-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    margin: -28px;
    border: 2px solid rgba(255,255,255,.7);
    border-radius: 50%;
}

.bhg-disc {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 5px 8px rgba(0,0,0,.35);
}

    .bhg-disc.d1 {
        background: radial-gradient(circle at 35% 30%, #7cc0ff, #2f7cf6 60%, #1747a6);
        right: 18%;
        top: 28%;
    }

    .bhg-disc.d2 {
        background: radial-gradient(circle at 35% 30%, #ff9fb3, #ef476f 60%, #a3173d);
        left: 20%;
        top: 22%;
    }

    .bhg-disc.d3 {
        background: radial-gradient(circle at 35% 30%, #ff9fb3, #ef476f 60%, #a3173d);
        left: 30%;
        bottom: 14%;
    }

.bhg-ball {
    position: absolute;
    width: 16px;
    height: 16px;
    left: 50%;
    top: 50%;
    margin: -8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, #dfe3ee 60%, #9aa1b8);
    box-shadow: 0 3px 5px rgba(0,0,0,.35);
    animation: bhg-roll 3s ease-in-out infinite;
}

@keyframes bhg-roll {
    50% {
        transform: translateX(-34px);
    }
}

/* تصویر کوچک نقطه‌بازی */
.bhg-dots .bhg-art {
    background: linear-gradient(135deg, #ece9ff, #f7f3ff);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    padding: 14px 30%;
}

    .bhg-dots .bhg-art i {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #5b5bd6;
        justify-self: center;
        align-self: center;
    }

.bhg-box {
    position: absolute;
    box-sizing: border-box;
    width: 10%;
    height: calc((100% - 28px) / 4);
    border-radius: 3px;
}

    .bhg-box.b1 {
        background: rgba(47,124,246,.35);
        border: 2px solid #2f7cf6;
        left: 35%;
        top: calc(14px + (100% - 28px) * .125);
    }

    .bhg-box.b2 {
        background: rgba(239,71,111,.3);
        border: 2px solid #ef476f;
        left: 45%;
        top: calc(14px + (100% - 28px) * .375);
    }

    .bhg-box.b3 {
        background: rgba(47,124,246,.35);
        border: 2px solid #2f7cf6;
        left: 35%;
        top: calc(14px + (100% - 28px) * .375);
    }

/* صفحه /games */
.bhg-page {
    max-width: 980px;
    margin: 0 auto;
}

.bhg-league {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(31,35,64,.08);
    color: #1f2340 !important;
    text-decoration: none !important;
}

    .bhg-league div {
        flex: 1;
    }

    .bhg-league b {
        display: block;
        font-weight: 900;
    }

    .bhg-league small {
        color: #7a7f9a;
    }

@media (max-width: 640px) {
    .bhg {
        padding: 16px 12px;
        border-radius: 20px;
    }

    .bhg-head {
        flex-wrap: wrap;
        gap: 12px;
    }

        .bhg-head .bh-av {
            width: 56px !important;
            height: 56px !important;
        }

    .bhg-title h3 {
        font-size: 1.15rem;
    }

    .bhg-title p {
        font-size: .8rem;
    }

    .bhg-record {
        width: 100%;
    }

        .bhg-record div {
            flex: 1;
        }

    .bhg-games {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bhg-art {
        height: 96px;
    }
}
