body.home {
    background: #090504 !important;
}

body.home .site-wrapper {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

body.home .site-header {
    position: relative;
    z-index: 20;
    background: rgba(8, 6, 5, 0.82) !important;
    backdrop-filter: blur(14px);
}

body.home .site-content.home-game-shell {
    flex: 1 0 auto;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
    background: #090504 !important;
    color: #fff;
}

.home-game-hero {
    position: relative;
    display: grid;
    min-height: calc(100svh - 78px);
    padding: clamp(12px, 2vw, 28px);
    place-items: start center;
    isolation: isolate;
}

.home-game-hero::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    content: "";
    background:
        linear-gradient(90deg, rgba(7, 5, 5, 0.92) 0%, rgba(7, 5, 5, 0.62) 24%, rgba(7, 5, 5, 0.3) 50%, rgba(7, 5, 5, 0.62) 76%, rgba(7, 5, 5, 0.92) 100%),
        linear-gradient(180deg, rgba(7, 5, 5, 0.15) 0%, #090504 94%),
        url("../imgs/zhutu.jpg") center / cover no-repeat;
}

.home-game-hero::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background:
        linear-gradient(180deg, rgba(10, 7, 6, 0.86) 0%, rgba(10, 7, 6, 0.24) 26%, rgba(10, 7, 6, 0.82) 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 80px);
}

.home-game-stage {
    width: min(100%, 520px);
}

.home-game-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.home-game-brand {
    min-width: 0;
}

.home-game-brand span {
    display: block;
    margin-bottom: 3px;
    color: #f4c468;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.home-game-brand h1 {
    margin: 0;
    color: #fff !important;
    font-size: clamp(22px, 2.3vw, 34px);
    line-height: 1.05;
    letter-spacing: 0;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.home-game-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.home-game-icon-button {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(244, 196, 104, 0.44);
    border-radius: 8px;
    color: #fff;
    background: rgba(14, 12, 11, 0.76);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.home-game-icon-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-game-icon-button:hover,
.home-game-icon-button:focus-visible {
    border-color: rgba(244, 196, 104, 0.9);
    background: rgba(71, 20, 18, 0.9);
    transform: translateY(-1px);
}

.home-game-icon-button:focus-visible {
    outline: 2px solid #f4c468;
    outline-offset: 2px;
}

.home-game-frame-wrap {
    --game-width: 480px;
    --game-height: 853px;
    --game-scale: 1;
    --game-left: 0px;
    --game-top: 0px;
    position: relative;
    width: min(100%, 520px, calc((100svh - 164px) * 0.5625));
    margin: 0 auto;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    overscroll-behavior: contain;
    border: 1px solid rgba(244, 196, 104, 0.5);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(9, 5, 4, 0.84), rgba(9, 5, 4, 0.48), rgba(9, 5, 4, 0.84)),
        url("../imgs/zhutu.jpg") center / cover no-repeat;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.home-game-frame {
    position: absolute;
    top: var(--game-top);
    left: var(--game-left);
    width: var(--game-width);
    height: var(--game-height);
    max-width: none;
    border: 0;
    background: #000;
    overscroll-behavior: contain;
    transform: scale(var(--game-scale));
    transform-origin: top left;
}

.home-game-mobile-download {
    display: none;
}

.home-game-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #f4c468;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    background: #090504;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.home-game-loading.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.home-game-frame-wrap:fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
}

.home-game-frame-wrap:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
}

body.home .site-footer {
    flex: 0 0 auto;
    background: #080605 !important;
}

body.home .site-footer > h3:first-child {
    margin-top: 0;
    padding-top: 24px;
}

body.home .bb_footer-conteiner {
    padding-top: 10px;
    padding-bottom: 18px;
}

@media screen and (max-width: 767px), screen and (max-height: 520px) {
    body.home .site-content.home-game-shell {
        min-height: calc(100svh - 74px);
    }

    .home-game-hero {
        min-height: calc(100svh - 74px);
        padding: 0;
    }

    .home-game-stage {
        width: 100%;
    }

    .home-game-toolbar {
        display: none;
    }

    .home-game-frame-wrap {
        width: 100vw;
        max-width: none;
        height: auto;
        aspect-ratio: auto;
        margin: 0;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .home-game-mobile-download {
        position: fixed;
        right: 0;
        bottom: 3px;
        left: 0;
        z-index: 40;
        display: flex;
        width: min(calc(100% - 32px), 348px);
        min-height: 42px;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        padding: 0 18px;
        border: 1px solid rgba(255, 228, 145, 0.82);
        border-radius: 8px;
        color: #160b05 !important;
        background:
            linear-gradient(180deg, rgba(255, 245, 188, 0.45) 0%, rgba(255, 245, 188, 0) 42%),
            linear-gradient(180deg, #ffd86f 0%, #f4b136 54%, #e99623 100%);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34), 0 1px 0 rgba(255, 255, 255, 0.55) inset;
        font-size: 16px;
        font-weight: 800;
        line-height: 1.2;
        text-decoration: none !important;
        touch-action: manipulation;
    }
}

@media screen and (max-width: 420px) {
    .home-game-frame-wrap {
        width: 100vw;
    }
}
