/*
 * GameHub Pro — Premium game cards
 *
 * Visual-only overrides for the existing front-page markup.
 * The gh-* selectors below intentionally match the theme's PHP templates.
 */

/* =============================================================
   NOTCH / SAFE-AREA FIX
   Targets the theme's real header (.sticky-header) and content
   wrapper (#main-content), not generic/guessed class names.
   Requires <meta viewport ... viewport-fit=cover> in header.php.
   ============================================================= */
.sticky-header {
    padding-top: calc(10px + env(safe-area-inset-top)) !important;
}

#main-content {
    overflow: visible !important;
    padding-top: max(12px, env(safe-area-inset-top)) !important;
}

body {
    overflow-x: hidden;
}

@supports not (padding: max(0px)) {
    #main-content {
        padding-top: 12px !important;
    }
}

:root {
    --rg-purple: #6d20e8;
    --rg-purple-light: #a13cf4;
    --rg-gold: #f5d76e;
    --rg-card-radius: 24px;
}

/* Keep the existing heading, link, and diamond icon functionality. */
section[aria-labelledby="gh-bonus-heading"] > .d-flex,
section[aria-labelledby="gh-all-games-heading"] > .d-flex {
    align-items: center !important;
    margin-bottom: 0.8rem !important;
}

section[aria-labelledby="gh-bonus-heading"] .gh-section-title,
section[aria-labelledby="gh-all-games-heading"] .gh-section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #1f1740;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.025em;
}

section[aria-labelledby="gh-bonus-heading"] .gh-section-title i,
section[aria-labelledby="gh-all-games-heading"] .gh-section-title i {
    font-size: 0.9em;
    color: var(--rg-purple) !important;
    filter: drop-shadow(0 3px 7px rgba(109, 32, 232, 0.24));
}

section[aria-labelledby="gh-bonus-heading"] > .d-flex > a,
section[aria-labelledby="gh-all-games-heading"] > .d-flex > a {
    color: #6b5c87 !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    white-space: nowrap;
}

section[aria-labelledby="gh-bonus-heading"] > .d-flex > a::after,
section[aria-labelledby="gh-all-games-heading"] > .d-flex > a::after {
    content: " \2192";
    color: var(--rg-purple);
    font-size: 1rem;
}

/* High Bonus Games — four equal desktop cards, scrollable cards on mobile. */
.gh-bonus-scroll {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100%;
    max-width: 880px;
    margin-inline: auto;
    padding: 8px 3px 18px !important;
    overflow: visible !important;
    box-sizing: border-box;
}

.gh-bonus-item,
.gh-bonus-item:nth-child(1),
.gh-bonus-item:nth-child(2),
.gh-bonus-item:nth-child(3),
.gh-bonus-item:nth-child(4) {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-width: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 0.9 / 1;
    padding: 10px 11px !important;
    border: 1px solid rgba(255, 255, 255, 0.64) !important;
    border-radius: var(--rg-card-radius) !important;
    color: #fff !important;
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
    box-shadow:
        0 14px 28px rgba(31, 20, 70, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.gh-bonus-item::before,
.gh-bonus-item::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
}

.gh-bonus-item::before {
    top: -56px !important;
    right: -48px !important;
    width: 150px !important;
    height: 150px !important;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%) !important;
}

.gh-bonus-item::after {
    bottom: -66px !important;
    left: -48px !important;
    width: 132px !important;
    height: 132px !important;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 72%) !important;
}

.gh-bonus-item:hover,
.gh-bonus-item:focus-visible {
    transform: translateY(-4px);
}

.gh-bonus-item:nth-child(1) {
    background: linear-gradient(180deg, #c05cff 0%, #4b0f74 100%) !important;
    box-shadow:
        0 14px 28px rgba(31, 20, 70, 0.22),
        0 0 28px rgba(192, 92, 255, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

.gh-bonus-item:nth-child(2) {
    background: linear-gradient(180deg, #3ef2a5 0%, #0b6e4f 100%) !important;
    box-shadow:
        0 14px 28px rgba(31, 20, 70, 0.22),
        0 0 28px rgba(62, 242, 165, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

.gh-bonus-item:nth-child(3) {
    background: linear-gradient(180deg, #ffb347 0%, #8a5a00 100%) !important;
    box-shadow:
        0 14px 28px rgba(31, 20, 70, 0.22),
        0 0 28px rgba(255, 179, 71, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

.gh-bonus-item:nth-child(4) {
    background: linear-gradient(180deg, #4da6ff 0%, #0a2a6b 100%) !important;
    box-shadow:
        0 14px 28px rgba(31, 20, 70, 0.22),
        0 0 28px rgba(77, 166, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

.gh-bonus-topline {
    position: relative;
    z-index: 1;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100%;
    height: 24px !important;
    margin: 0 !important;
}

.gh-bonus-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 29px !important;
    padding: 5px 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.06em;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.gh-bonus-badge-hot {
    background: #ff2d7a !important;
}

.gh-bonus-item:nth-child(2) .gh-bonus-badge {
    background: #20d95d !important;
}

.gh-bonus-item:nth-child(3) .gh-bonus-badge {
    background: #ff5b1a !important;
}

.gh-bonus-item:nth-child(4) .gh-bonus-badge {
    background: #2638e8 !important;
}

.gh-bonus-circle {
    position: relative;
    z-index: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: min(50%, 104px) !important;
    height: auto !important;
    aspect-ratio: 1;
    margin: 0 auto 5px !important;
    border: 3px solid var(--rg-gold) !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow:
        0 0 22px rgba(245, 215, 110, 0.55),
        0 9px 20px rgba(0, 0, 0, 0.26) !important;
    overflow: hidden;
}

.gh-bonus-circle img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover !important;
}

.gh-bonus-circle > i {
    color: var(--rg-purple);
    font-size: 2.5rem;
}

.gh-bonus-label {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    min-height: 28px !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(0.82rem, 1.1vw, 1rem) !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.gh-bonus-amount {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 1px 0 0 !important;
    color: #fff !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    line-height: 1.25;
    text-align: center;
}

.gh-bonus-amount .rg-percent {
    color: #ffe14d !important;
    font-weight: 900;
}

.gh-bonus-cta {
    position: relative;
    z-index: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px !important;
    margin-top: auto !important;
    padding: 0 12px;
    border-radius: 999px !important;
    background: #fff !important;
    color: var(--rg-purple) !important;
    font-size: 0.84rem !important;
    font-weight: 900 !important;
    line-height: 1;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.19) !important;
}

.gh-bonus-cta i {
    margin-right: 8px !important;
    color: var(--rg-purple) !important;
    font-size: 1rem;
}

/* All Games — preserve the existing Bootstrap column contract. */
#allGamesGrid {
    row-gap: 20px !important;
}

#allGamesGrid > [class*="col-"] {
    display: flex;
    min-width: 0;
}

.gh-game-card {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    min-height: 198px !important;
    padding: 12px !important;
    border: 1px solid rgba(109, 32, 232, 0.09) !important;
    border-radius: var(--rg-card-radius) !important;
    background: linear-gradient(180deg, #fff 0%, #fcfaff 100%) !important;
    box-shadow:
        0 10px 25px rgba(42, 28, 82, 0.09),
        0 0 22px rgba(161, 60, 244, 0.06),
        inset 0 1px 0 #fff !important;
    overflow: hidden;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.gh-game-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 14px 30px rgba(42, 28, 82, 0.13),
        0 0 26px rgba(161, 60, 244, 0.12),
        inset 0 1px 0 #fff !important;
}

.gh-game-card > .d-flex {
    min-width: 0;
}

.gh-game-logo-wrap {
    position: relative;
    flex: 0 0 68px;
    width: 68px !important;
    height: 68px !important;
}

.gh-game-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px !important;
    height: 68px !important;
    border: 2px solid #f0eaff !important;
    border-radius: 19px !important;
    background: #fff;
    box-shadow: 0 7px 16px rgba(36, 26, 74, 0.13) !important;
    overflow: hidden;
}

.gh-game-logo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 16px !important;
    object-fit: cover;
}

.gh-game-logo > i {
    color: #8b5cf6;
    font-size: 1.7rem;
}

.gh-game-logo-wrap .gh-badge {
    position: absolute;
    top: -7px;
    left: -7px;
    z-index: 2;
    max-width: 90px;
    padding: 4px 8px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--rg-purple);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    box-shadow: 0 4px 9px rgba(52, 24, 112, 0.22);
}

.gh-game-name {
    color: #151535 !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    line-height: 1.28 !important;
}

.gh-game-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 4px !important;
    color: #6b6280;
    font-size: 0.75rem !important;
    line-height: 1.3;
}

.gh-game-meta .gh-star-wrap,
.gh-game-meta .star-filled,
.gh-game-meta .fa-star {
    color: #f5a623 !important;
}

.gh-game-meta .gh-star-wrap {
    display: inline-flex !important;
    align-items: center;
    flex-direction: row !important;
    flex: 0 0 auto;
    width: max-content;
    white-space: nowrap;
}

.gh-bonus-chip {
    display: inline-flex !important;
    align-items: center;
    min-height: 29px !important;
    max-width: 100%;
    padding: 4px 11px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #fff4c7, #ffe8a1) !important;
    color: #97430e !important;
    font-size: 0.73rem !important;
    font-weight: 800 !important;
    line-height: 1.2;
    white-space: nowrap;
}

.gh-bonus-chip i {
    color: #bf7a08 !important;
}

.gh-btn-download {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px !important;
    margin-top: auto !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, #6d20e8 0%, #a13cf4 100%) !important;
    color: #fff !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    line-height: 1;
    box-shadow: 0 8px 17px rgba(109, 32, 232, 0.3) !important;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        filter 160ms ease;
}

.gh-btn-download:hover,
.gh-btn-download:focus-visible {
    color: #fff !important;
    filter: saturate(1.08) brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 11px 20px rgba(109, 32, 232, 0.36) !important;
}

.gh-btn-download i {
    margin-right: 8px;
}

/* Bootstrap supplies the 2-up mobile columns. Reinforce it without overflow. */
@media (max-width: 575.98px) {
    #allGamesGrid > .col-6 {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        padding-right: 6px;
        padding-left: 6px;
    }

    .gh-game-card {
        min-height: 202px !important;
        padding: 11px !important;
        border-radius: 20px !important;
    }

    .gh-game-logo-wrap,
    .gh-game-logo {
        width: 62px !important;
        height: 62px !important;
    }

    .gh-game-logo-wrap {
        flex-basis: 62px;
    }

    .gh-game-name {
        font-size: 0.82rem !important;
    }

    .gh-game-meta {
        gap: 3px;
        font-size: 0.64rem !important;
    }

    .gh-bonus-chip {
        min-height: 25px !important;
        padding: 3px 8px !important;
        font-size: 0.61rem !important;
    }

    .gh-btn-download {
        min-height: 41px !important;
        font-size: 0.74rem !important;
    }
}

/* Phones keep the four large bonus cards as a horizontal carousel. */
@media (max-width: 767.98px) {
    .gh-bonus-scroll {
        display: flex !important;
        gap: 12px !important;
        max-width: none;
        margin-inline: 0;
        padding: 8px 2px 18px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
        touch-action: pan-x;
    }

    .gh-bonus-scroll::-webkit-scrollbar {
        display: none;
    }

    .gh-bonus-item,
    .gh-bonus-item:nth-child(1),
    .gh-bonus-item:nth-child(2),
    .gh-bonus-item:nth-child(3),
    .gh-bonus-item:nth-child(4) {
        flex: 0 0 min(44vw, 172px) !important;
        width: min(44vw, 172px) !important;
        min-width: min(44vw, 172px) !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 0.9 / 1;
        scroll-snap-align: start;
    }

    .gh-bonus-circle {
        width: clamp(70px, 20vw, 84px) !important;
        margin-bottom: 2px !important;
    }

    .gh-bonus-topline { height: 20px !important; }
    .gh-bonus-badge {
        min-height: 22px !important;
        padding: 4px 8px !important;
        font-size: 0.6rem !important;
    }
    .gh-bonus-label {
        min-height: 18px !important;
        font-size: 0.82rem !important;
        line-height: 1.15 !important;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .gh-bonus-amount {
        font-size: 0.75rem !important;
        line-height: 1.15;
    }
    .gh-bonus-cta {
        min-height: 36px !important;
        font-size: 0.76rem !important;
    }
}

@media (max-width: 380px) {
    .gh-bonus-item,
    .gh-bonus-item:nth-child(1),
    .gh-bonus-item:nth-child(2),
    .gh-bonus-item:nth-child(3),
    .gh-bonus-item:nth-child(4) {
        flex-basis: min(44vw, 172px) !important;
        width: min(44vw, 172px) !important;
        min-width: min(44vw, 172px) !important;
    }
}

/* At tablet widths, keep the logos readable instead of forcing four tiny squares. */
@media (min-width: 768px) and (max-width: 991.98px) {
    .gh-bonus-scroll {
        display: flex !important;
        gap: 14px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding-bottom: 18px !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
        touch-action: pan-x;
    }

    .gh-bonus-scroll::-webkit-scrollbar {
        display: none;
    }

    .gh-bonus-item,
    .gh-bonus-item:nth-child(1),
    .gh-bonus-item:nth-child(2),
    .gh-bonus-item:nth-child(3),
    .gh-bonus-item:nth-child(4) {
        flex: 0 0 190px !important;
        width: 190px !important;
        min-width: 190px !important;
        aspect-ratio: 0.9 / 1;
        padding: 10px !important;
    }

    .gh-bonus-circle {
        width: 82px !important;
        margin-bottom: 4px !important;
    }

    .gh-bonus-topline { height: 23px !important; }
    .gh-bonus-label {
        min-height: 26px !important;
        font-size: 0.82rem !important;
    }
    .gh-bonus-amount { font-size: 0.76rem !important; }
    .gh-bonus-cta {
        min-height: 38px !important;
        font-size: 0.8rem !important;
    }
}

@media (min-width: 768px) {
    #allGamesGrid > .col-md-4 {
        flex: 0 0 33.333333% !important;
        width: 33.333333% !important;
        max-width: 33.333333% !important;
    }
}

@media (min-width: 992px) {
    #allGamesGrid > .col-lg-3 {
        flex: 0 0 25% !important;
        width: 25% !important;
        max-width: 25% !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gh-bonus-item,
    .gh-game-card,
    .gh-btn-download {
        transition: none !important;
    }
}
/* FINAL COMPACT SIZE OVERRIDES — keep cards premium but never oversized */
@media (max-width: 767.98px) {
    .gh-bonus-scroll {
        gap: 10px !important;
        padding: 6px 2px 14px !important;
    }

    .gh-bonus-item,
    .gh-bonus-item:nth-child(1),
    .gh-bonus-item:nth-child(2),
    .gh-bonus-item:nth-child(3),
    .gh-bonus-item:nth-child(4) {
        flex: 0 0 142px !important;
        width: 142px !important;
        min-width: 142px !important;
        height: 150px !important;
        min-height: 150px !important;
        aspect-ratio: auto !important;
        padding: 8px 9px !important;
        border-radius: 18px !important;
    }

    .gh-bonus-topline {
        height: 19px !important;
    }

    .gh-bonus-badge {
        min-height: 21px !important;
        padding: 3px 8px !important;
        font-size: 0.57rem !important;
    }

    .gh-bonus-circle {
        width: 68px !important;
        height: 68px !important;
        margin: 0 auto 2px !important;
        border-width: 2px !important;
        border-radius: 16px !important;
        box-shadow: 0 0 14px rgba(245, 215, 110, 0.5), 0 6px 12px rgba(0,0,0,.2) !important;
    }

    .gh-bonus-label {
        min-height: 17px !important;
        font-size: 0.69rem !important;
        line-height: 1.1 !important;
    }

    .gh-bonus-amount {
        margin-top: 1px !important;
        font-size: 0.62rem !important;
        line-height: 1.1 !important;
    }

    .gh-bonus-cta {
        min-height: 30px !important;
        padding: 0 8px !important;
        font-size: 0.64rem !important;
    }

    .gh-bonus-cta i {
        margin-right: 5px !important;
        font-size: 0.75rem !important;
    }

    #allGamesGrid > .col-6 {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .gh-game-card {
        min-height: 164px !important;
        padding: 9px !important;
        border-radius: 18px !important;
    }

    .gh-game-logo-wrap,
    .gh-game-logo {
        width: 54px !important;
        height: 54px !important;
    }

    .gh-game-logo-wrap {
        flex-basis: 54px !important;
    }

    .gh-game-name {
        font-size: 0.76rem !important;
        line-height: 1.2 !important;
    }

    .gh-game-meta {
        font-size: 0.58rem !important;
        margin-top: 2px !important;
    }

    .gh-bonus-chip {
        min-height: 22px !important;
        padding: 2px 7px !important;
        font-size: 0.56rem !important;
    }

    .gh-btn-download {
        min-height: 34px !important;
        padding: 0 8px !important;
        font-size: 0.68rem !important;
    }
}

/* If the browser reports a tablet/desktop layout viewport on a phone, keep the
   bonus cards compact instead of allowing the 190px tablet cards to become huge. */
@media (min-width: 768px) and (max-width: 991.98px) {
    .gh-bonus-item,
    .gh-bonus-item:nth-child(1),
    .gh-bonus-item:nth-child(2),
    .gh-bonus-item:nth-child(3),
    .gh-bonus-item:nth-child(4) {
        flex: 0 0 145px !important;
        width: 145px !important;
        min-width: 145px !important;
        height: 155px !important;
        min-height: 155px !important;
        aspect-ratio: auto !important;
        padding: 8px 9px !important;
        border-radius: 18px !important;
    }

    .gh-bonus-circle {
        width: 70px !important;
        height: 70px !important;
        margin-bottom: 2px !important;
    }

    .gh-bonus-label { font-size: 0.7rem !important; min-height: 18px !important; }
    .gh-bonus-amount { font-size: 0.63rem !important; }
    .gh-bonus-cta { min-height: 31px !important; font-size: 0.66rem !important; }
}

/* FINAL MOBILE FIX: show all 4 High Bonus cards at once — no horizontal scrolling */
@media (max-width: 767.98px) {
    .gh-bonus-scroll {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 7px !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 6px 0 12px !important;
        overflow: visible !important;
        scroll-snap-type: none !important;
    }

    .gh-bonus-item,
    .gh-bonus-item:nth-child(1),
    .gh-bonus-item:nth-child(2),
    .gh-bonus-item:nth-child(3),
    .gh-bonus-item:nth-child(4) {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 112px !important;
        min-height: 112px !important;
        aspect-ratio: auto !important;
        padding: 6px 5px !important;
        border-radius: 14px !important;
        box-shadow: 0 7px 14px rgba(31,20,70,.18), inset 0 1px 0 rgba(255,255,255,.35) !important;
    }

    .gh-bonus-topline {
        height: 16px !important;
    }

    .gh-bonus-badge {
        min-height: 18px !important;
        padding: 2px 5px !important;
        font-size: 0.48rem !important;
        letter-spacing: .02em !important;
        border-radius: 999px !important;
    }

    .gh-bonus-circle {
        width: 43px !important;
        height: 43px !important;
        margin: 1px auto 2px !important;
        border-width: 2px !important;
        border-radius: 11px !important;
        box-shadow: 0 0 10px rgba(245,215,110,.48), 0 4px 8px rgba(0,0,0,.18) !important;
    }

    .gh-bonus-label {
        min-height: 15px !important;
        max-height: 15px !important;
        font-size: 0.53rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .gh-bonus-amount {
        min-height: 13px !important;
        max-height: 13px !important;
        margin-top: 1px !important;
        font-size: 0.48rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .gh-bonus-cta {
        min-height: 24px !important;
        height: 24px !important;
        margin-top: auto !important;
        padding: 0 4px !important;
        font-size: 0.5rem !important;
        white-space: nowrap !important;
        border-radius: 999px !important;
    }

    .gh-bonus-cta i {
        margin-right: 3px !important;
        font-size: 0.58rem !important;
    }
}


/* =============================================================
   FINAL MOBILE BONUS FIX — 4 cards visible in one row
   No horizontal scrolling on phones.
   ============================================================= */
@media (max-width: 767.98px) {
    section[aria-labelledby="gh-bonus-heading"] {
        overflow: hidden !important;
    }

    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-scroll {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 5px 0 10px !important;
        overflow: hidden !important;
        overflow-x: hidden !important;
        overflow-y: hidden !important;
        scroll-snap-type: none !important;
        touch-action: auto !important;
    }

    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-item,
    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-item:nth-child(1),
    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-item:nth-child(2),
    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-item:nth-child(3),
    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-item:nth-child(4) {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 105px !important;
        min-height: 105px !important;
        max-height: 105px !important;
        aspect-ratio: auto !important;
        padding: 5px 4px !important;
        border-radius: 13px !important;
        box-sizing: border-box !important;
    }

    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-topline {
        height: 15px !important;
        min-height: 15px !important;
    }

    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-badge {
        min-height: 16px !important;
        height: 16px !important;
        padding: 1px 4px !important;
        font-size: 0.43rem !important;
        line-height: 1 !important;
    }

    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-circle {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        margin: 1px auto 1px !important;
        border-width: 2px !important;
        border-radius: 10px !important;
    }

    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-label {
        min-height: 13px !important;
        max-height: 13px !important;
        font-size: 0.49rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-amount {
        min-height: 11px !important;
        max-height: 11px !important;
        margin-top: 1px !important;
        font-size: 0.44rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-cta {
        min-height: 21px !important;
        height: 21px !important;
        margin-top: auto !important;
        padding: 0 3px !important;
        font-size: 0.45rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        border-radius: 999px !important;
    }

    section[aria-labelledby="gh-bonus-heading"] .gh-bonus-cta i {
        margin-right: 2px !important;
        font-size: 0.5rem !important;
    }
}


/* =============================================================
   HOMEPAGE GAME LIST — REFERENCE STYLE
   Full-width horizontal cards on phones, matching the supplied
   reference: logo left, game details center, Download right.
   ============================================================= */
.gh-home-game-col { display:flex; min-width:0; }
.gh-home-game-col .gh-game-card {
    width:100% !important;
    min-height:160px !important;
    padding:16px !important;
    border-radius:20px !important;
    background:#fff !important;
    border:1px solid #eeeef3 !important;
    box-shadow:0 8px 24px rgba(25,25,55,.07) !important;
}
.gh-game-card-row {
    width:100%; min-width:0; display:flex; align-items:center; gap:14px;
}
.gh-game-card-info { flex:1 1 auto; min-width:0; padding-right:2px; }
.gh-home-game-col .gh-game-logo-wrap,
.gh-home-game-col .gh-game-logo {
    width:78px !important; height:78px !important; flex:0 0 78px !important;
}
.gh-home-game-col .gh-game-logo { border-radius:19px !important; border:0 !important; box-shadow:none !important; }
.gh-home-game-col .gh-game-logo img { border-radius:18px !important; }
.gh-home-game-col .gh-game-name {
    font-size:1rem !important; font-weight:800 !important; line-height:1.25 !important;
    margin:0 0 3px !important; color:#172033 !important;
}
.gh-game-players {
    color:#7b8490; font-size:.76rem; line-height:1.25; margin-bottom:5px;
}
.gh-reference-meta { gap:5px !important; font-size:.76rem !important; margin-bottom:4px; }
.gh-reference-meta .gh-star-wrap { color:#f2b51d; }
.gh-rating-number { color:#e4ad18; font-weight:700; }
.gh-trusted {
    color:#218b4b; background:#e8f8ee; border-radius:20px; padding:2px 7px;
    font-size:.68rem; font-weight:700; white-space:nowrap;
}
.gh-trusted i { font-size:.58rem; }
.gh-signup-bonus {
    color:#6d24c8; font-size:.74rem; font-weight:800; line-height:1.3; margin-top:1px;
}
.gh-withdraw-line {
    color:#218b68; font-size:.72rem; font-weight:800; line-height:1.3; margin-top:2px;
}
.gh-home-game-col .gh-btn-download {
    position:relative !important; z-index:3; flex:0 0 auto; width:96px; min-height:44px !important;
    padding:0 10px !important; border-radius:14px !important; display:flex; align-items:center; justify-content:center;
    background:linear-gradient(135deg,#7625dc,#8d32ed) !important; color:#fff !important;
    font-size:.78rem !important; font-weight:800 !important; box-shadow:0 6px 14px rgba(118,37,220,.22) !important;
    text-decoration:none !important;
}
.gh-home-game-col .gh-btn-download:hover { transform:translateY(-1px); }

@media (max-width:767.98px) {
    #allGamesGrid { row-gap:16px !important; }
    #allGamesGrid > .gh-home-game-col { flex:0 0 100% !important; max-width:100% !important; width:100% !important; padding-left:6px !important; padding-right:6px !important; }
    .gh-home-game-col .gh-game-card { min-height:160px !important; padding:14px !important; border-radius:20px !important; }
    .gh-game-card-row { gap:13px; }
    .gh-home-game-col .gh-game-logo-wrap,
    .gh-home-game-col .gh-game-logo { width:78px !important; height:78px !important; flex-basis:78px !important; }
    .gh-home-game-col .gh-game-name { font-size:.96rem !important; }
    .gh-game-players { font-size:.75rem; }
    .gh-reference-meta { font-size:.74rem !important; }
    .gh-signup-bonus { font-size:.73rem; }
    .gh-withdraw-line { font-size:.71rem; }
    .gh-home-game-col .gh-btn-download { width:96px; min-height:44px !important; font-size:.76rem !important; }
}

@media (max-width:420px) {
    #allGamesGrid > .gh-home-game-col { padding-left:0 !important; padding-right:0 !important; }
    .gh-home-game-col .gh-game-card { min-height:154px !important; padding:12px !important; border-radius:18px !important; }
    .gh-game-card-row { gap:10px; }
    .gh-home-game-col .gh-game-logo-wrap,
    .gh-home-game-col .gh-game-logo { width:70px !important; height:70px !important; flex-basis:70px !important; }
    .gh-home-game-col .gh-game-name { font-size:.9rem !important; }
    .gh-game-players { font-size:.68rem; }
    .gh-reference-meta { font-size:.68rem !important; gap:4px !important; }
    .gh-trusted { font-size:.61rem; padding:2px 5px; }
    .gh-signup-bonus { font-size:.67rem; }
    .gh-withdraw-line { font-size:.65rem; }
    .gh-home-game-col .gh-btn-download { width:84px; min-height:42px !important; border-radius:12px !important; font-size:.69rem !important; }
}
