/* ============================================================
   Falling Blocks Sandbox v4.5.2 - The Geek Factory Game Module
   Desktop splash redesigned to visually accommodate the TGF site header/nav
============================================================ */

.tgf-fbs-app,
.tgf-fbs-app * {
    box-sizing: border-box;
}

.tgf-fbs-app {
    --fb-cyan: #00eaff;
    --fb-cyan-soft: rgba(0, 234, 255, 0.22);
    --fb-cyan-line: rgba(0, 234, 255, 0.48);
    --fb-ink: #03070d;
    --fb-panel: rgba(1, 13, 22, 0.84);
    --fb-panel-soft: rgba(0, 24, 34, 0.58);
    --fb-text: #f2fbff;
    --fb-muted: rgba(242, 251, 255, 0.72);
    --fb-radius: 24px;
    --fb-available-page-height: 680px;
    width: 100%;
    min-height: auto;
    background:
        linear-gradient(90deg, rgba(0, 8, 14, 0.58), rgba(0, 0, 0, 0.18), rgba(0, 8, 14, 0.58)),
        url("../images/falling-blocks-desktop-splash-1920x1080.webp") center center / cover no-repeat,
        #02070e;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 1.25vw, 22px);
    color: var(--fb-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.4;
}

.tgf-fbs-shell {
    width: min(100%, 1920px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.tgf-fbs-hidden {
    display: none !important;
}

/* =========================
   Desktop Splash
========================= */

.tgf-fbs-splash {
    position: relative;
    width: min(100%, 1920px);
    height: clamp(560px, var(--fb-available-page-height, 680px), 760px);
    max-width: 1600px;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid var(--fb-cyan-line);
    border-radius: var(--fb-radius);
    background:
        linear-gradient(90deg, rgba(0, 8, 14, 0.44), rgba(0, 0, 0, 0.12) 48%, rgba(0, 8, 14, 0.44)),
        url("../images/falling-blocks-desktop-splash-1920x1080.webp") center center / cover no-repeat,
        radial-gradient(circle at center, rgba(0, 234, 255, 0.16), transparent 46%),
        #02070e;
    box-shadow:
        0 0 44px rgba(0, 234, 255, 0.18),
        inset 0 0 80px rgba(0, 234, 255, 0.10);
    isolation: isolate;
}

.tgf-fbs-splash::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(0, 234, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 234, 255, 0.045) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.12;
    pointer-events: none;
    z-index: 1;
}


.tgf-fbs-splash::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 128px;
    background: linear-gradient(180deg, rgba(2, 7, 14, 0.92), rgba(2, 7, 14, 0.58) 55%, rgba(2, 7, 14, 0));
    pointer-events: none;
    z-index: 2;
}

.tgf-fbs-splash-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 42%, rgba(0,0,0,0.02) 0 18%, rgba(0,0,0,0.36) 66%, rgba(0,0,0,0.72) 100%);
    z-index: 2;
    pointer-events: none;
}

.tgf-fbs-splash-brand {
    position: absolute;
    top: clamp(26px, 2.6vw, 44px);
    left: clamp(18px, 2.2vw, 32px);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tgf-fbs-logo-mark {
    width: 34px;
    height: 34px;
    border: 1px solid var(--fb-cyan);
    border-radius: 10px;
    box-shadow: 0 0 16px rgba(0, 234, 255, 0.36), inset 0 0 12px rgba(0, 234, 255, 0.16);
    transform: rotate(45deg);
}

.tgf-fbs-splash-brand strong,
.tgf-fbs-splash-brand small {
    display: block;
}

.tgf-fbs-splash-brand strong {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.1;
}

.tgf-fbs-splash-brand small {
    color: var(--fb-cyan);
    font-size: 11px;
    font-weight: 800;
}

.tgf-fbs-splash-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(110px, 11vw, 160px) clamp(28px, 5vw, 88px) clamp(38px, 5vw, 88px);
}

.tgf-fbs-kicker {
    color: var(--fb-cyan);
    font-size: clamp(11px, 1vw, 15px);
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.tgf-fbs-splash h1 {
    margin: 12px 0 0;
    color: #ffffff;
    font-size: clamp(44px, 5.9vw, 100px);
    line-height: 0.95;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow:
        0 0 10px rgba(0, 234, 255, 0.72),
        0 0 34px rgba(0, 234, 255, 0.44),
        0 0 70px rgba(0, 130, 255, 0.20);
}

.tgf-fbs-splash p {
    margin: 20px 0 32px;
    color: var(--fb-cyan);
    font-size: clamp(17px, 1.8vw, 32px);
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.tgf-fbs-splash-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.tgf-fbs-how {
    margin-top: 18px;
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--fb-cyan);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}

.tgf-fbs-splash-footer {
    position: absolute;
    left: 50%;
    bottom: clamp(14px, 1.8vw, 24px);
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* =========================
   Game Shell
========================= */

.tgf-fbs-game {
    width: min(1500px, calc(100vw - 24px));
    height: clamp(520px, var(--fb-available-page-height, 720px), 800px);
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(10px, 1.4svh, 16px);
    padding: clamp(16px, 2svh, 28px);
    overflow: hidden;
    border: 1px solid var(--fb-cyan-line);
    border-radius: var(--fb-radius);
    background:
        linear-gradient(90deg, rgba(0, 34, 44, 0.34), rgba(2, 8, 14, 0.88) 40%, rgba(0, 0, 0, 0.92)),
        url("../images/falling-blocks-desktop-splash-1920x1080.webp") center center / cover no-repeat,
        radial-gradient(circle at 20% 28%, rgba(0, 234, 255, 0.16), transparent 38%),
        #02070e;
    box-shadow:
        0 0 42px rgba(0, 234, 255, 0.16),
        inset 0 0 34px rgba(255, 255, 255, 0.035);
}

.tgf-fbs-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    min-height: 0;
}

.tgf-fbs-header h2 {
    margin: 6px 0 0;
    color: #ffffff;
    font-size: clamp(24px, 2.2vw, 40px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.tgf-fbs-status {
    flex: 0 0 auto;
    min-width: 86px;
    text-align: center;
    padding: 9px 16px;
    border: 1px solid rgba(0, 234, 255, 0.70);
    border-radius: 999px;
    color: var(--fb-cyan);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: inset 0 0 16px rgba(0, 234, 255, 0.08);
}

.tgf-fbs-layout {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: clamp(14px, 1.7vw, 24px);
    align-items: stretch;
}

.tgf-fbs-stage {
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 20px;
    background:
        radial-gradient(circle at 38% 24%, rgba(0, 234, 255, 0.10), transparent 32%),
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
        rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 1.6svh, 22px);
}

.tgf-fbs-board-wrap {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.2svh, 14px);
}

.tgf-fbs-canvas-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    max-width: 100%;
}

.tgf-fbs-canvas {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    border: 2px solid rgba(0, 234, 255, 0.92);
    border-radius: 12px;
    background: #020a0e;
    box-shadow:
        0 0 18px rgba(0, 234, 255, 0.16),
        inset 0 0 28px rgba(0, 234, 255, 0.08);
    image-rendering: auto;
}

.tgf-fbs-overlay {
    position: absolute;
    inset: 2px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    background: radial-gradient(circle at center, rgba(0, 80, 88, 0.58), rgba(0, 0, 0, 0.76) 72%);
    backdrop-filter: blur(7px);
    z-index: 4;
}

.tgf-fbs-overlay strong {
    display: block;
    font-size: clamp(24px, 3vw, 42px);
    color: #ffffff;
}

.tgf-fbs-overlay span {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.tgf-fbs-touch-controls {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tgf-fbs-sidebar {
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 2px;
    scrollbar-color: rgba(0, 234, 255, 0.36) rgba(255, 255, 255, 0.05);
}

.tgf-fbs-card {
    border: 1px solid rgba(0, 234, 255, 0.18);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(3, 20, 31, 0.82), rgba(0, 8, 16, 0.72));
    padding: 14px;
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.025);
}

.tgf-fbs-card-title {
    margin-bottom: 10px;
    color: var(--fb-cyan);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.tgf-fbs-next-card {
    display: grid;
    grid-template-columns: 1fr 110px;
    align-items: center;
    min-height: 92px;
}

.tgf-fbs-next {
    width: 92px;
    height: 70px;
    justify-self: end;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.46);
}

.tgf-fbs-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.tgf-fbs-stat {
    padding: 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tgf-fbs-stat:nth-child(2n) {
    border-right: 0;
}

.tgf-fbs-stat:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.tgf-fbs-stat span {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.70);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.tgf-fbs-stat strong {
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
}

.tgf-fbs-action-row {
    display: flex;
    gap: 9px;
}

.tgf-fbs-btn,
.tgf-fbs-round,
.tgf-fbs-drop {
    appearance: none;
    border: 1px solid rgba(0, 234, 255, 0.74);
    background: linear-gradient(180deg, rgba(0, 234, 255, 0.20), rgba(0, 78, 96, 0.58));
    color: #ffffff;
    cursor: pointer;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow:
        0 0 14px rgba(0, 234, 255, 0.15),
        inset 0 0 14px rgba(255, 255, 255, 0.04);
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.tgf-fbs-btn:hover,
.tgf-fbs-round:hover,
.tgf-fbs-drop:hover,
.tgf-fbs-btn:focus-visible,
.tgf-fbs-round:focus-visible,
.tgf-fbs-drop:focus-visible {
    border-color: rgba(255, 255, 255, 0.78);
    background: linear-gradient(180deg, rgba(0, 234, 255, 0.32), rgba(0, 100, 118, 0.70));
    transform: translateY(-1px);
    outline: none;
}

.tgf-fbs-btn {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    flex: 1 1 auto;
}

.tgf-fbs-btn-primary {
    min-width: 190px;
}

.tgf-fbs-round {
    min-width: 66px;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 18px;
}

.tgf-fbs-drop {
    min-width: 90px;
    min-height: 42px;
    padding: 8px 18px;
    border-radius: 999px;
}

.tgf-fbs-save {
    width: 100%;
    margin-top: 10px;
}

.tgf-fbs-input {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.44);
    color: #ffffff;
    padding: 10px 12px;
    outline: none;
}

.tgf-fbs-input:focus {
    border-color: rgba(0, 234, 255, 0.70);
    box-shadow: 0 0 0 3px rgba(0, 234, 255, 0.09);
}

.tgf-fbs-help,
.tgf-fbs-leaderboard {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.tgf-fbs-help {
    line-height: 1.55;
}

.tgf-fbs-leaderboard {
    padding-left: 20px;
}

.tgf-fbs-leaderboard li {
    margin: 0 0 5px;
}

/* =========================
   Compact PC Viewports
========================= */

@media (min-width: 901px) and (max-height: 900px) {
    .tgf-fbs-app {
        padding: 8px;
        align-items: center;
    }

    .tgf-fbs-game {
        width: min(1280px, calc(100vw - 16px));
        height: clamp(500px, var(--fb-available-page-height, calc(100svh - 16px)), 720px);
        min-height: 0;
        padding: 16px;
        gap: 10px;
    }

    .tgf-fbs-header h2 {
        font-size: clamp(28px, 3vw, 36px);
    }

    .tgf-fbs-kicker {
        font-size: 10px;
        letter-spacing: 0.20em;
    }

    .tgf-fbs-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 14px;
    }

    .tgf-fbs-card {
        padding: 11px;
    }

    .tgf-fbs-next-card {
        min-height: 72px;
    }

    .tgf-fbs-stat {
        padding: 11px 12px;
    }

    .tgf-fbs-stat strong {
        font-size: 21px;
    }

    .tgf-fbs-btn,
    .tgf-fbs-round,
    .tgf-fbs-drop {
        min-height: 36px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .tgf-fbs-help,
    .tgf-fbs-leaderboard {
        font-size: 13px;
    }
}

@media (min-width: 901px) and (max-height: 720px) {
    .tgf-fbs-game {
        width: min(1180px, calc(100vw - 12px));
        height: clamp(460px, var(--fb-available-page-height, calc(100svh - 12px)), 650px);
        padding: 12px;
    }

    .tgf-fbs-header h2 {
        font-size: 30px;
    }

    .tgf-fbs-layout {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 10px;
    }

    .tgf-fbs-sidebar {
        gap: 8px;
    }

    .tgf-fbs-card {
        padding: 9px;
        border-radius: 14px;
    }

    .tgf-fbs-card-title {
        margin-bottom: 6px;
        font-size: 10px;
    }
}


/* =========================
   Desktop Header-Compatible Splash Composition
   The splash art/layout leaves a clean top-safe zone so the TGF site header/nav can sit above it comfortably.
========================= */

@media (min-width: 901px) {
    .tgf-fbs-app {
        align-items: flex-start;
        padding-top: 12px;
    }

    .tgf-fbs-splash {
        width: min(100%, 1600px);
    }

    .tgf-fbs-splash::after {
        height: 136px;
    }

    .tgf-fbs-splash-content {
        padding-top: clamp(118px, 11vw, 172px);
        padding-bottom: clamp(34px, 4vw, 70px);
    }

    .tgf-fbs-splash h1 {
        font-size: clamp(42px, 5vw, 92px);
    }

    .tgf-fbs-splash p {
        margin: 16px 0 24px;
    }
}

/* =========================
   Fullscreen
========================= */

.tgf-fbs-app:fullscreen,
.tgf-fbs-app:-webkit-full-screen {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    padding: 14px;
    background:
        linear-gradient(90deg, rgba(0, 10, 16, 0.70), rgba(0, 0, 0, 0.32), rgba(0, 10, 16, 0.70)),
        url("../images/falling-blocks-desktop-splash-1920x1080.webp") center center / cover no-repeat,
        #02070e;
}

.tgf-fbs-app:fullscreen .tgf-fbs-shell,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-shell {
    width: 100%;
    height: 100%;
}

.tgf-fbs-app:fullscreen .tgf-fbs-game,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-game {
    width: min(1600px, calc(100vw - 28px));
    height: calc(100svh - 28px);
    max-height: calc(100svh - 28px);
}

.tgf-fbs-app:fullscreen .tgf-fbs-layout,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.tgf-fbs-app:fullscreen .tgf-fbs-splash,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-splash {
    width: min(100%, 1920px);
    height: min(calc(100svh - 28px), 1080px);
    max-width: calc((100svh - 28px) * 1.77778);
}

/* =========================
   Tablet / Mobile
========================= */

@media (max-width: 900px) {
    .tgf-fbs-app {
        min-height: 100svh;
        padding: 10px;
        align-items: flex-start;
        background:
            linear-gradient(180deg, rgba(0, 8, 14, 0.58), rgba(0, 0, 0, 0.22), rgba(0, 8, 14, 0.66)),
            url("../images/falling-blocks-mobile-splash-1080x1920.webp") center center / cover no-repeat,
            #02070e;
    }

    .tgf-fbs-splash {
        width: 100%;
        height: calc(100svh - 20px);
        min-height: 620px;
        max-width: none;
        background:
            linear-gradient(180deg, rgba(0, 22, 32, 0.78), rgba(0, 0, 0, 0.36), rgba(0, 22, 32, 0.88)),
            url("../images/falling-blocks-mobile-splash-1080x1920.webp") center center / cover no-repeat,
            #02070e;
    }

    .tgf-fbs-splash-brand {
        top: 18px;
        left: 18px;
    }

    .tgf-fbs-splash-footer {
        width: calc(100% - 34px);
        white-space: normal;
        text-align: center;
    }

    .tgf-fbs-game {
        width: 100%;
        height: auto;
        max-height: none;
        min-height: 0;
        padding: 14px;
        overflow: visible;
    }

    .tgf-fbs-layout {
        grid-template-columns: 1fr;
    }

    .tgf-fbs-stage {
        min-height: 0;
    }

    .tgf-fbs-sidebar {
        overflow: visible;
    }

    .tgf-fbs-action-row {
        flex-wrap: wrap;
    }

    .tgf-fbs-next-card {
        grid-template-columns: 1fr auto;
    }
}

@media (max-width: 520px) {
    .tgf-fbs-header {
        align-items: center;
    }

    .tgf-fbs-header h2 {
        font-size: 28px;
    }

    .tgf-fbs-status {
        min-width: 72px;
        padding: 8px 12px;
        font-size: 10px;
    }

    .tgf-fbs-round {
        min-width: 58px;
    }

    .tgf-fbs-drop {
        min-width: 82px;
    }
}

/* ============================================================
   v4.3.8 TRON BRANDED SPLASH + LIVE CONTROLS
   Image contains TRON background + 3D FALLING BLOCKS branding.
   Theme supplies logo/nav/BASIL. Plugin supplies START + lower HUD labels.
============================================================ */

html.tgf-fbs-html-active,
body.tgf-fbs-page-active {
    background:
        url("../images/falling-blocks-bg-v438-tron-branded.webp") center center / cover no-repeat fixed,
        url("../images/falling-blocks-bg-v438-tron-branded.png") center center / cover no-repeat fixed,
        #02070e !important;
}

body.tgf-fbs-page-active {
    overflow-x: hidden !important;
    min-height: 100svh !important;
}

body.tgf-fbs-page-active::after {
    content: none !important;
    display: none !important;
}

/* Existing TGF header/nav/BASIL remains live, but the black header strip is removed. */
body.tgf-fbs-page-active header,
body.tgf-fbs-page-active #masthead,
body.tgf-fbs-page-active .site-header,
body.tgf-fbs-page-active .main-header-bar,
body.tgf-fbs-page-active .ast-primary-header-bar,
body.tgf-fbs-page-active .elementor-location-header,
body.tgf-fbs-page-active .elementor-location-header > *,
body.tgf-fbs-page-active .tgf-header,
body.tgf-fbs-page-active .tgf-site-header {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    position: relative;
    z-index: 80;
}

body.tgf-fbs-page-active footer,
body.tgf-fbs-page-active #colophon,
body.tgf-fbs-page-active .site-footer,
body.tgf-fbs-page-active .ast-footer-copyright,
body.tgf-fbs-page-active .elementor-location-footer {
    display: none !important;
}

body.tgf-fbs-page-active .site-content,
body.tgf-fbs-page-active .content-area,
body.tgf-fbs-page-active .entry-content,
body.tgf-fbs-page-active .elementor,
body.tgf-fbs-page-active .elementor-section,
body.tgf-fbs-page-active .elementor-container,
body.tgf-fbs-page-active .elementor-widget-container {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

@media (min-width: 901px) {
    body.tgf-fbs-page-active .tgf-fbs-app {
        position: fixed !important;
        inset: var(--wp-admin--admin-bar--height, 0px) 0 0 0 !important;
        z-index: 5 !important;
        width: 100vw !important;
        height: calc(100svh - var(--wp-admin--admin-bar--height, 0px)) !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        overflow: hidden !important;
        background:
            url("../images/falling-blocks-bg-v438-tron-branded.webp") center center / cover no-repeat,
            url("../images/falling-blocks-bg-v438-tron-branded.png") center center / cover no-repeat,
            #02070e !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-shell {
        width: 100vw !important;
        max-width: none !important;
        height: 100% !important;
        display: block !important;
        overflow: hidden !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash {
        position: absolute !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        aspect-ratio: auto !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        overflow: hidden !important;
        isolation: isolate;
    }

    /* Hide default plugin text because the 3D FALLING BLOCKS branding is now in the image. */
    body.tgf-fbs-page-active .tgf-fbs-splash::before,
    body.tgf-fbs-page-active .tgf-fbs-splash::after,
    body.tgf-fbs-page-active .tgf-fbs-splash-vignette,
    body.tgf-fbs-page-active .tgf-fbs-splash-brand,
    body.tgf-fbs-page-active .tgf-fbs-splash-footer,
    body.tgf-fbs-page-active .tgf-fbs-kicker,
    body.tgf-fbs-page-active .tgf-fbs-splash h1,
    body.tgf-fbs-page-active .tgf-fbs-splash p {
        display: none !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-content {
        position: absolute !important;
        inset: 0 !important;
        z-index: 10 !important;
        display: block !important;
        padding: 0 !important;
        width: 100% !important;
        height: 100% !important;
        pointer-events: none;
        text-align: center;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions {
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        pointer-events: none;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions .tgf-fbs-btn,
    body.tgf-fbs-page-active .tgf-fbs-how {
        position: absolute !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 999px !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        transform: none !important;
        opacity: 1 !important;
        text-transform: uppercase !important;
        font-weight: 1000 !important;
        letter-spacing: .12em !important;
    }

    /* Live START button inside the empty center HUD panel. */
    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play] {
        left: 35.2% !important;
        top: 66.2% !important;
        width: 29.6% !important;
        height: 10.0% !important;
        color: #eaffff !important;
        font-size: clamp(32px, 4vw, 76px) !important;
        background:
            linear-gradient(180deg, rgba(0,240,255,.12), rgba(0,20,34,.68)),
            radial-gradient(circle at 50% 0, rgba(0,240,255,.30), transparent 54%) !important;
        border: 2px solid rgba(0, 240, 255, .86) !important;
        box-shadow:
            0 0 22px rgba(0,234,255,.62),
            0 0 54px rgba(0,90,255,.30),
            inset 0 0 20px rgba(255,255,255,.09) !important;
        text-shadow:
            0 0 12px rgba(0,234,255,.95),
            0 0 30px rgba(0,120,255,.72) !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::before,
    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::after {
        content: "»";
        position: absolute;
        color: #ff7cff;
        font-size: .72em;
        top: 50%;
        transform: translateY(-52%);
        text-shadow: 0 0 12px rgba(255,0,255,.9);
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::before { left: 10%; }
    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::after {
        content: "«";
        right: 10%;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-fullscreen] {
        left: 42.5% !important;
        top: 77.4% !important;
        width: 15.0% !important;
        height: 4.0% !important;
        color: rgba(230,255,255,.92) !important;
        font-size: clamp(11px, .78vw, 15px) !important;
        background: rgba(0, 8, 16, .26) !important;
        border: 1px solid rgba(0, 234, 255, .38) !important;
        box-shadow: none !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-how {
        left: 42.5% !important;
        top: 81.8% !important;
        width: 15.0% !important;
        height: 4.0% !important;
        color: rgba(0, 240, 255, .94) !important;
        font-size: clamp(11px, .78vw, 15px) !important;
        background: rgba(0, 8, 16, .20) !important;
        border: 1px solid rgba(0, 234, 255, .30) !important;
        box-shadow: none !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions .tgf-fbs-btn:hover,
    body.tgf-fbs-page-active .tgf-fbs-splash-actions .tgf-fbs-btn:focus-visible,
    body.tgf-fbs-page-active .tgf-fbs-how:hover,
    body.tgf-fbs-page-active .tgf-fbs-how:focus-visible {
        filter: brightness(1.14);
        outline: 2px solid rgba(0, 234, 255, .55) !important;
        outline-offset: 3px !important;
    }

    /* Live bottom HUD labels inside the empty lower panels. */
    body.tgf-fbs-page-active .tgf-fbs-splash-content::before {
        content: "THE GEEK FACTORY";
        position: absolute;
        left: 4.2%;
        bottom: 5.9%;
        z-index: 12;
        width: 17.4%;
        height: 5.2%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #00f0ff;
        font-size: clamp(13px, 1.25vw, 24px);
        font-weight: 1000;
        letter-spacing: .04em;
        text-transform: uppercase;
        text-shadow: 0 0 12px rgba(0,234,255,.85);
        pointer-events: none;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-content::after {
        content: "V4.3.8 DEV";
        position: absolute;
        right: 4.2%;
        bottom: 5.9%;
        z-index: 12;
        width: 17.4%;
        height: 5.2%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #00f0ff;
        font-size: clamp(13px, 1.25vw, 24px);
        font-weight: 1000;
        letter-spacing: .07em;
        text-transform: uppercase;
        text-shadow: 0 0 12px rgba(0,234,255,.85);
        pointer-events: none;
    }
}

/* Fullscreen keeps the same model. */
.tgf-fbs-app:fullscreen,
.tgf-fbs-app:-webkit-full-screen {
    width: 100vw !important;
    height: 100svh !important;
    min-height: 100svh !important;
    padding: 0 !important;
    background:
        url("../images/falling-blocks-bg-v438-tron-branded.webp") center center / cover no-repeat,
        url("../images/falling-blocks-bg-v438-tron-branded.png") center center / cover no-repeat,
        #02070e !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-splash,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-splash {
    width: 100vw !important;
    height: 100svh !important;
    max-width: none !important;
    aspect-ratio: auto !important;
    background: transparent !important;
}

body.tgf-fbs-page-active .tgf-fbs-game:not(.tgf-fbs-hidden) {
    position: relative !important;
    z-index: 30 !important;
    margin: clamp(72px, 8svh, 120px) auto 0 !important;
}

/* ============================================================
   v4.3.9 ALIGNMENT LOCK
   Aligns live START, lower-left label and lower-right version with the open HUD plates.
============================================================ */

@media (min-width: 901px) {
    /* Keep the live site header inside the upper open HUD area without adding black strips. */
    body.tgf-fbs-page-active header,
    body.tgf-fbs-page-active #masthead,
    body.tgf-fbs-page-active .site-header,
    body.tgf-fbs-page-active .elementor-location-header {
        background: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
        z-index: 90 !important;
    }

    /* Prevent hidden/stacked header rows from crushing the nav on this sandbox page. */
    body.tgf-fbs-page-active .site-header .ast-mobile-header-wrap,
    body.tgf-fbs-page-active .site-header .ast-builder-menu-mobile,
    body.tgf-fbs-page-active .elementor-location-header .elementor-hidden-desktop {
        display: none !important;
    }

    /* START button: same live function, now seated inside the centre plate. */
    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play] {
        left: 36.35% !important;
        top: 67.05% !important;
        width: 27.30% !important;
        height: 8.70% !important;
        font-size: clamp(34px, 3.15vw, 58px) !important;
        letter-spacing: .11em !important;
        line-height: 1 !important;
        padding-bottom: .15em !important;
        border-radius: 18px !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::before {
        left: 8.5% !important;
        font-size: .74em !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::after {
        right: 8.5% !important;
        font-size: .74em !important;
    }

    /* Secondary live controls placed under the centre plate, subtle and no overlap. */
    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-fullscreen] {
        left: 43.65% !important;
        top: 77.10% !important;
        width: 12.70% !important;
        height: 3.25% !important;
        font-size: clamp(10px, .70vw, 13px) !important;
        border-radius: 999px !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-how {
        left: 43.65% !important;
        top: 81.00% !important;
        width: 12.70% !important;
        height: 3.25% !important;
        font-size: clamp(10px, .70vw, 13px) !important;
        border-radius: 999px !important;
    }

    /* Lower HUD labels: moved down and centred inside their empty plates. */
    body.tgf-fbs-page-active .tgf-fbs-splash-content::before {
        left: 3.25% !important;
        bottom: 2.35% !important;
        width: 17.75% !important;
        height: 4.80% !important;
        font-size: clamp(12px, 1.05vw, 20px) !important;
        letter-spacing: .035em !important;
        justify-content: center !important;
        align-items: center !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-content::after {
        content: "V4.3.9 DEV" !important;
        right: 3.25% !important;
        bottom: 2.35% !important;
        width: 17.75% !important;
        height: 4.80% !important;
        font-size: clamp(12px, 1.05vw, 20px) !important;
        letter-spacing: .06em !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

/* ============================================================
   v4.4.0 NO-CROP GEOMETRY LOCK
   Fixes the real cause of the misalignment:
   the splash image is now stretched to the available viewport instead of cropped by cover.
   This preserves the 1920x1080 coordinate system so live UI aligns with the open HUD spaces.
============================================================ */

html.tgf-fbs-html-active,
body.tgf-fbs-page-active {
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

@media (min-width: 901px) {
    body.tgf-fbs-page-active .tgf-fbs-app {
        background-size: 100% 100% !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-shell,
    body.tgf-fbs-page-active .tgf-fbs-splash {
        transform: none !important;
    }

    /* Centre START inside the actual empty centre HUD plate */
    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play] {
        left: 35.80% !important;
        top: 69.10% !important;
        width: 28.40% !important;
        height: 6.85% !important;
        font-size: clamp(28px, 2.65vw, 52px) !important;
        letter-spacing: .12em !important;
        line-height: 1 !important;
        padding: 0 4.1vw !important;
        border-radius: 18px !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::before {
        left: 8.0% !important;
        font-size: .74em !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::after {
        right: 8.0% !important;
        font-size: .74em !important;
    }

    /* Secondary actions sit below the centre plate, not inside the START plate */
    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-fullscreen] {
        left: 43.80% !important;
        top: 77.10% !important;
        width: 12.40% !important;
        height: 3.00% !important;
        font-size: clamp(9px, .62vw, 12px) !important;
        line-height: 1 !important;
        padding: 0 !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-how {
        left: 43.80% !important;
        top: 80.60% !important;
        width: 12.40% !important;
        height: 3.00% !important;
        font-size: clamp(9px, .62vw, 12px) !important;
        line-height: 1 !important;
        padding: 0 !important;
    }

    /* Lower HUD labels placed inside the actual bottom-left and bottom-right open plates */
    body.tgf-fbs-page-active .tgf-fbs-splash-content::before {
        left: 3.10% !important;
        bottom: 6.10% !important;
        width: 17.80% !important;
        height: 4.40% !important;
        font-size: clamp(11px, .98vw, 19px) !important;
        letter-spacing: .035em !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-content::after {
        content: "V4.4.0 DEV" !important;
        right: 3.10% !important;
        bottom: 6.10% !important;
        width: 17.80% !important;
        height: 4.40% !important;
        font-size: clamp(11px, .98vw, 19px) !important;
        letter-spacing: .06em !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
    }

    /* Keep live header above splash but do not let theme backgrounds create black bars. */
    body.tgf-fbs-page-active header,
    body.tgf-fbs-page-active #masthead,
    body.tgf-fbs-page-active .site-header,
    body.tgf-fbs-page-active .elementor-location-header {
        background: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
        z-index: 90 !important;
    }
}

.tgf-fbs-app:fullscreen,
.tgf-fbs-app:-webkit-full-screen {
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* ============================================================
   v4.4.1 SUPPLIED TRON BACKGROUND + START ONLY
   Uses the user-approved static image and removes Full Screen / How To Play.
============================================================ */

html.tgf-fbs-html-active,
body.tgf-fbs-page-active,
body.tgf-fbs-page-active .tgf-fbs-app,
.tgf-fbs-app:fullscreen,
.tgf-fbs-app:-webkit-full-screen {
    background-image:
        url("../images/falling-blocks-bg-v441-clean-tron-start-panel.webp"),
        url("../images/falling-blocks-bg-v441-clean-tron-start-panel.png") !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* Remove secondary controls completely on the splash. */
body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-fullscreen],
body.tgf-fbs-page-active .tgf-fbs-how,
.tgf-fbs-splash-actions [data-fb-fullscreen],
.tgf-fbs-how {
    display: none !important;
    pointer-events: none !important;
}

/* START aligned to the empty centre panel in the supplied image. */
@media (min-width: 901px) {
    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play] {
        left: 35.75% !important;
        top: 65.85% !important;
        width: 28.55% !important;
        height: 8.80% !important;
        font-size: clamp(30px, 3.15vw, 58px) !important;
        letter-spacing: .13em !important;
        line-height: 1 !important;
        padding: 0 4.1vw !important;
        border-radius: 20px !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::before {
        left: 8.0% !important;
        font-size: .74em !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::after {
        right: 8.0% !important;
        font-size: .74em !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-content::before {
        left: 3.05% !important;
        bottom: 4.70% !important;
        width: 17.90% !important;
        height: 4.90% !important;
        font-size: clamp(11px, .98vw, 19px) !important;
        white-space: nowrap !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-content::after {
        content: "V4.4.1 DEV" !important;
        right: 3.05% !important;
        bottom: 4.70% !important;
        width: 17.90% !important;
        height: 4.90% !important;
        font-size: clamp(11px, .98vw, 19px) !important;
        white-space: nowrap !important;
    }
}

/* ============================================================
   v4.4.2 VISUAL ALIGNMENT + START BUTTON POLISH
   Moves START slightly lower and centres the bottom HUD labels.
============================================================ */

@media (min-width: 901px) {
    /* START: lower, cleaner, more arcade-button feel */
    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play] {
        left: 36.25% !important;
        top: 68.55% !important;
        width: 27.50% !important;
        height: 8.15% !important;
        padding: 0 4.15vw !important;
        border-radius: 16px !important;
        border: 2px solid rgba(0, 245, 255, .94) !important;
        color: #efffff !important;
        font-size: clamp(30px, 3.05vw, 56px) !important;
        line-height: 1 !important;
        letter-spacing: .16em !important;
        background:
            linear-gradient(180deg, rgba(185, 255, 255, .16) 0%, rgba(0, 238, 255, .18) 22%, rgba(2, 12, 26, .82) 52%, rgba(0, 7, 16, .92) 100%),
            radial-gradient(circle at 50% 0%, rgba(0, 245, 255, .45), transparent 58%),
            linear-gradient(90deg, rgba(255, 0, 230, .24), rgba(0, 245, 255, .16), rgba(255, 0, 230, .24)) !important;
        box-shadow:
            0 0 20px rgba(0, 245, 255, .72),
            0 0 52px rgba(0, 120, 255, .42),
            0 0 82px rgba(160, 0, 255, .22),
            inset 0 2px 0 rgba(255, 255, 255, .18),
            inset 0 -10px 22px rgba(0, 0, 0, .48) !important;
        text-shadow:
            0 0 8px rgba(255, 255, 255, .95),
            0 0 18px rgba(0, 245, 255, .95),
            0 0 34px rgba(0, 115, 255, .72) !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::before,
    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::after {
        font-size: .70em !important;
        top: 50% !important;
        color: #ff72ff !important;
        text-shadow:
            0 0 10px rgba(255, 0, 255, .95),
            0 0 22px rgba(255, 0, 255, .65) !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::before {
        left: 8.6% !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play]::after {
        right: 8.6% !important;
    }

    /* Centre lower-left text inside the actual HUD frame */
    body.tgf-fbs-page-active .tgf-fbs-splash-content::before {
        left: 3.35% !important;
        bottom: 3.85% !important;
        width: 17.95% !important;
        height: 5.45% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        font-size: clamp(11px, .92vw, 18px) !important;
        letter-spacing: .035em !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    /* Centre lower-right version inside the actual HUD frame */
    body.tgf-fbs-page-active .tgf-fbs-splash-content::after {
        content: "V4.4.2 DEV" !important;
        right: 3.35% !important;
        bottom: 3.85% !important;
        width: 17.95% !important;
        height: 5.45% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        font-size: clamp(11px, .92vw, 18px) !important;
        letter-spacing: .07em !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }
}

/* ============================================================
   v4.4.3 FINAL SANDBOX POLISH
   Fix 1: START button scale + lower position.
   Fix 2: Bottom HUD labels larger and centred in their panels.
============================================================ */

@media (min-width: 901px) {
    body.tgf-fbs-page-active .tgf-fbs-splash-actions .tgf-fbs-btn-primary,
    body.tgf-fbs-page-active .tgf-fbs-splash-actions [data-fb-play] {
        transform: scale(1.14) translateY(9px) !important;
        transform-origin: center center !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-content::before {
        left: 3.35% !important;
        bottom: 3.75% !important;
        width: 17.95% !important;
        height: 6.10% !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        font-size: clamp(15px, 1.22vw, 24px) !important;
        line-height: 1 !important;
        letter-spacing: .045em !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-splash-content::after {
        content: "V4.5.2 DEV" !important;

        right: 3.35% !important;
        bottom: 3.75% !important;
        width: 17.95% !important;
        height: 6.10% !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        font-size: clamp(15px, 1.22vw, 24px) !important;
        line-height: 1 !important;
        letter-spacing: .07em !important;
        text-align: center !important;
        white-space: nowrap !important;
    }
}

/* ============================================================
   v4.4.5 FULLSCREEN GAMEPLAY COCKPIT OPTIMISATION
   Uses the maximum desktop fullscreen area while keeping every control visible.
============================================================ */

.tgf-fbs-app:fullscreen,
.tgf-fbs-app:-webkit-full-screen {
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-shell,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-shell {
    width: 100vw !important;
    height: 100svh !important;
    max-width: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

/* Main full-screen game panel: wider, taller, no cropped sidebar. */
.tgf-fbs-app:fullscreen .tgf-fbs-game,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-game {
    width: min(1848px, calc(100vw - 32px)) !important;
    height: calc(100svh - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100svh - 32px) !important;
    padding: clamp(14px, 1.35vw, 22px) !important;
    gap: clamp(8px, 1svh, 14px) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-header,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-header {
    min-height: 44px !important;
    align-items: center !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-header h2,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-header h2 {
    margin: 0 !important;
    font-size: clamp(28px, 1.9vw, 38px) !important;
    letter-spacing: -0.035em !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-status,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-status {
    padding: 8px 16px !important;
    min-width: 82px !important;
}

/* Layout: give the sidebar enough width so Restart does not clip, and enlarge the board area. */
.tgf-fbs-app:fullscreen .tgf-fbs-layout,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-layout {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 410px) !important;
    gap: clamp(16px, 1.35vw, 24px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-stage,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-stage {
    padding: clamp(10px, .85vw, 16px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-board-wrap,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-board-wrap {
    gap: clamp(8px, .9svh, 12px) !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-canvas-frame,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-canvas-frame {
    max-height: calc(100svh - 168px) !important;
}

/* Bottom board controls stay visible and compact. */
.tgf-fbs-app:fullscreen .tgf-fbs-touch-controls,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-touch-controls {
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-round,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-round {
    min-width: 58px !important;
    min-height: 42px !important;
    padding: 7px 12px !important;
    font-size: 17px !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-drop,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-drop {
    min-width: 92px !important;
    min-height: 42px !important;
    padding: 7px 16px !important;
}

/* Sidebar: no clipping, compact cards, all sections visible. */
.tgf-fbs-app:fullscreen .tgf-fbs-sidebar,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-sidebar {
    overflow: hidden !important;
    gap: clamp(9px, .95svh, 12px) !important;
    padding-right: 0 !important;
    min-width: 0 !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-card,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-card {
    padding: clamp(10px, .8vw, 13px) !important;
    border-radius: 16px !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-card-title,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-card-title {
    margin-bottom: 8px !important;
    font-size: 12px !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-next-card,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-next-card {
    min-height: 78px !important;
    grid-template-columns: 1fr 96px !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-next,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-next {
    width: 88px !important;
    height: 62px !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-stat,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-stat {
    padding: 11px 12px !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-stat span,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-stat span {
    margin-bottom: 6px !important;
    font-size: 11px !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-stat strong,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-stat strong {
    font-size: 23px !important;
}

/* Top action buttons: grid prevents Restart from being cut off. */
.tgf-fbs-app:fullscreen .tgf-fbs-action-row,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-action-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-btn,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-btn {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 8px 10px !important;
    font-size: clamp(12px, .72vw, 14px) !important;
    letter-spacing: .04em !important;
    white-space: nowrap !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-btn-primary,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-btn-primary {
    min-width: 0 !important;
}

/* Controls and form text fit better. */
.tgf-fbs-app:fullscreen .tgf-fbs-help,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-help,
.tgf-fbs-app:fullscreen .tgf-fbs-leaderboard,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-leaderboard {
    font-size: 13px !important;
    line-height: 1.45 !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-input,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-input {
    min-height: 38px !important;
    background: rgba(0, 0, 0, .56) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border-color: rgba(0, 234, 255, .24) !important;
}

.tgf-fbs-app:fullscreen .tgf-fbs-save,
.tgf-fbs-app:-webkit-full-screen .tgf-fbs-save {
    min-height: 44px !important;
    margin-top: 9px !important;
}

/* ============================================================
   v4.4.6 FULLSCREEN BOTTOM-SAFE FIT
   Fixes the bottom cut-off caused by the non-fullscreen game margin carrying into fullscreen.
============================================================ */

body.tgf-fbs-page-active .tgf-fbs-app:fullscreen,
body.tgf-fbs-page-active .tgf-fbs-app:-webkit-full-screen {
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

/* Critical fix: remove title-screen/top margin once gameplay is in fullscreen. */
body.tgf-fbs-page-active .tgf-fbs-app:fullscreen .tgf-fbs-game:not(.tgf-fbs-hidden),
body.tgf-fbs-page-active .tgf-fbs-app:-webkit-full-screen .tgf-fbs-game:not(.tgf-fbs-hidden) {
    margin: 0 !important;
    width: min(1848px, calc(100vw - 34px)) !important;
    height: calc(100svh - 34px) !important;
    max-width: calc(100vw - 34px) !important;
    max-height: calc(100svh - 34px) !important;
}

/* Keep the board large, but reserve guaranteed space for the bottom touch controls. */
body.tgf-fbs-page-active .tgf-fbs-app:fullscreen .tgf-fbs-canvas-frame,
body.tgf-fbs-page-active .tgf-fbs-app:-webkit-full-screen .tgf-fbs-canvas-frame {
    max-height: calc(100svh - 205px) !important;
}

body.tgf-fbs-page-active .tgf-fbs-app:fullscreen .tgf-fbs-stage,
body.tgf-fbs-page-active .tgf-fbs-app:-webkit-full-screen .tgf-fbs-stage {
    padding-bottom: 12px !important;
}

/* Bottom controls must always remain fully visible. */
body.tgf-fbs-page-active .tgf-fbs-app:fullscreen .tgf-fbs-touch-controls,
body.tgf-fbs-page-active .tgf-fbs-app:-webkit-full-screen .tgf-fbs-touch-controls {
    flex: 0 0 auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    transform: none !important;
}

/* ============================================================
   v4.4.8 DESKTOP GAMEPLAY COCKPIT CLEANUP + HD BLOCKS
   Hides site logo/header during gameplay, fixes right-panel clipping,
   keeps normal desktop and fullscreen gameplay using maximum safe space.
============================================================ */

@media (min-width: 901px) {
    /* During gameplay, remove the real site header/logo/nav/BASIL from the cockpit view.
       The splash title screen keeps it; only gameplay hides it. */
    body.tgf-fbs-page-active.tgf-fbs-playing header,
    body.tgf-fbs-page-active.tgf-fbs-playing #masthead,
    body.tgf-fbs-page-active.tgf-fbs-playing .site-header,
    body.tgf-fbs-page-active.tgf-fbs-playing .main-header-bar,
    body.tgf-fbs-page-active.tgf-fbs-playing .ast-primary-header-bar,
    body.tgf-fbs-page-active.tgf-fbs-playing .elementor-location-header,
    body.tgf-fbs-page-active.tgf-fbs-playing .elementor-location-header > *,
    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-header,
    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-site-header,
    body.tgf-fbs-page-active.tgf-fbs-playing [class*="basil" i],
    body.tgf-fbs-page-active.tgf-fbs-playing [id*="basil" i] {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-app {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    /* Normal desktop gameplay gets the same cockpit logic as fullscreen, but keeps admin bar/browser chrome. */
    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-game:not(.tgf-fbs-hidden) {
        margin: 0 !important;
        width: min(1848px, calc(100vw - 34px)) !important;
        height: calc(100svh - var(--wp-admin--admin-bar--height, 0px) - 34px) !important;
        max-width: calc(100vw - 34px) !important;
        max-height: calc(100svh - var(--wp-admin--admin-bar--height, 0px) - 34px) !important;
        padding: clamp(14px, 1.25vw, 22px) !important;
        gap: clamp(8px, 1svh, 14px) !important;
        grid-template-rows: auto minmax(0, 1fr) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-header {
        min-height: 42px !important;
        align-items: center !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-header h2 {
        margin: 0 !important;
        font-size: clamp(25px, 1.75vw, 36px) !important;
        line-height: 1 !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-layout {
        grid-template-columns: minmax(0, 1fr) minmax(390px, 420px) !important;
        gap: clamp(16px, 1.25vw, 24px) !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-stage {
        padding: clamp(10px, .8vw, 16px) !important;
        min-width: 0 !important;
        min-height: 0 !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-canvas {
        image-rendering: auto !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-canvas-frame {
        max-height: calc(100svh - var(--wp-admin--admin-bar--height, 0px) - 205px) !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-board-wrap {
        gap: clamp(8px, .9svh, 12px) !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-touch-controls {
        gap: 10px !important;
        flex-wrap: nowrap !important;
        flex: 0 0 auto !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-round {
        min-width: 58px !important;
        min-height: 42px !important;
        padding: 7px 12px !important;
        font-size: 17px !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-drop {
        min-width: 92px !important;
        min-height: 42px !important;
        padding: 7px 16px !important;
    }

    /* Right cockpit: prevent clipping and keep score visible. */
    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-sidebar {
        overflow: hidden !important;
        gap: clamp(9px, .9svh, 12px) !important;
        padding-right: 0 !important;
        min-width: 0 !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-card {
        padding: clamp(10px, .75vw, 13px) !important;
        border-radius: 16px !important;
        min-width: 0 !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-next-card {
        min-height: 78px !important;
        grid-template-columns: 1fr 96px !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-next {
        width: 88px !important;
        height: 62px !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-stats {
        min-height: 104px !important;
        overflow: visible !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-stat {
        padding: 11px 12px !important;
        overflow: visible !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-stat span {
        margin-bottom: 6px !important;
        font-size: 11px !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-stat strong {
        display: block !important;
        font-size: clamp(21px, 1.45vw, 27px) !important;
        line-height: 1.05 !important;
        white-space: nowrap !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-action-row {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-btn {
        min-width: 0 !important;
        width: 100% !important;
        min-height: 42px !important;
        padding: 8px 8px !important;
        font-size: clamp(11px, .72vw, 14px) !important;
        letter-spacing: .035em !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: clip !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-btn-primary {
        min-width: 0 !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-input {
        min-height: 38px !important;
        background: rgba(0, 0, 0, .56) !important;
        color: #fff !important;
        -webkit-text-fill-color: #fff !important;
        border-color: rgba(0, 234, 255, .24) !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-help,
    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-leaderboard {
        font-size: 13px !important;
        line-height: 1.45 !important;
    }

    body.tgf-fbs-page-active.tgf-fbs-playing .tgf-fbs-save {
        min-height: 44px !important;
        margin-top: 9px !important;
    }
}

/* Fullscreen HD block/cockpit refinements mirror normal desktop gameplay. */
@media (min-width: 901px) {
    body.tgf-fbs-page-active .tgf-fbs-app:fullscreen .tgf-fbs-layout,
    body.tgf-fbs-page-active .tgf-fbs-app:-webkit-full-screen .tgf-fbs-layout {
        grid-template-columns: minmax(0, 1fr) minmax(390px, 420px) !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-app:fullscreen .tgf-fbs-stats,
    body.tgf-fbs-page-active .tgf-fbs-app:-webkit-full-screen .tgf-fbs-stats {
        min-height: 104px !important;
        overflow: visible !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-app:fullscreen .tgf-fbs-action-row,
    body.tgf-fbs-page-active .tgf-fbs-app:-webkit-full-screen .tgf-fbs-action-row {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
    }

    body.tgf-fbs-page-active .tgf-fbs-app:fullscreen .tgf-fbs-btn,
    body.tgf-fbs-page-active .tgf-fbs-app:-webkit-full-screen .tgf-fbs-btn {
        min-width: 0 !important;
        width: 100% !important;
        font-size: clamp(11px, .72vw, 14px) !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        white-space: nowrap !important;
    }
}

/* ============================================================
   v4.5.2 FULLSCREEN REPAIR
   Supports both app-element fullscreen and documentElement fullscreen fallback.
============================================================ */

@media (min-width: 901px) {
    html:fullscreen,
    html:-webkit-full-screen,
    body:fullscreen,
    body:-webkit-full-screen {
        width: 100vw !important;
        height: 100svh !important;
        overflow: hidden !important;
        background: #02070e !important;
    }

    html:fullscreen body.tgf-fbs-page-active,
    html:-webkit-full-screen body.tgf-fbs-page-active,
    body:fullscreen.tgf-fbs-page-active,
    body:-webkit-full-screen.tgf-fbs-page-active {
        width: 100vw !important;
        height: 100svh !important;
        overflow: hidden !important;
    }

    /* If the browser fullscreen target is html/documentElement instead of .tgf-fbs-app,
       force the game module into the same fullscreen cockpit geometry. */
    html:fullscreen body.tgf-fbs-page-active .tgf-fbs-app,
    html:-webkit-full-screen body.tgf-fbs-page-active .tgf-fbs-app,
    body:fullscreen.tgf-fbs-page-active .tgf-fbs-app,
    body:-webkit-full-screen.tgf-fbs-page-active .tgf-fbs-app {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100svh !important;
        min-height: 100svh !important;
        max-height: 100svh !important;
        z-index: 999999 !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        background:
            url("../images/falling-blocks-bg-v441-clean-tron-start-panel.webp") center center / 100% 100% no-repeat,
            url("../images/falling-blocks-bg-v441-clean-tron-start-panel.png") center center / 100% 100% no-repeat,
            #02070e !important;
    }

    html:fullscreen body.tgf-fbs-page-active .tgf-fbs-shell,
    html:-webkit-full-screen body.tgf-fbs-page-active .tgf-fbs-shell,
    body:fullscreen.tgf-fbs-page-active .tgf-fbs-shell,
    body:-webkit-full-screen.tgf-fbs-page-active .tgf-fbs-shell {
        width: 100vw !important;
        height: 100svh !important;
        max-width: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
    }

    html:fullscreen body.tgf-fbs-page-active .tgf-fbs-game:not(.tgf-fbs-hidden),
    html:-webkit-full-screen body.tgf-fbs-page-active .tgf-fbs-game:not(.tgf-fbs-hidden),
    body:fullscreen.tgf-fbs-page-active .tgf-fbs-game:not(.tgf-fbs-hidden),
    body:-webkit-full-screen.tgf-fbs-page-active .tgf-fbs-game:not(.tgf-fbs-hidden) {
        margin: 0 !important;
        width: min(1848px, calc(100vw - 34px)) !important;
        height: calc(100svh - 34px) !important;
        max-width: calc(100vw - 34px) !important;
        max-height: calc(100svh - 34px) !important;
        padding: clamp(14px, 1.25vw, 22px) !important;
        gap: clamp(8px, 1svh, 14px) !important;
        grid-template-rows: auto minmax(0, 1fr) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    html:fullscreen body.tgf-fbs-page-active .tgf-fbs-layout,
    html:-webkit-full-screen body.tgf-fbs-page-active .tgf-fbs-layout,
    body:fullscreen.tgf-fbs-page-active .tgf-fbs-layout,
    body:-webkit-full-screen.tgf-fbs-page-active .tgf-fbs-layout {
        grid-template-columns: minmax(0, 1fr) minmax(390px, 420px) !important;
        gap: clamp(16px, 1.25vw, 24px) !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    html:fullscreen body.tgf-fbs-page-active .tgf-fbs-canvas-frame,
    html:-webkit-full-screen body.tgf-fbs-page-active .tgf-fbs-canvas-frame,
    body:fullscreen.tgf-fbs-page-active .tgf-fbs-canvas-frame,
    body:-webkit-full-screen.tgf-fbs-page-active .tgf-fbs-canvas-frame {
        max-height: calc(100svh - 205px) !important;
    }

    html:fullscreen body.tgf-fbs-page-active .tgf-fbs-action-row,
    html:-webkit-full-screen body.tgf-fbs-page-active .tgf-fbs-action-row,
    body:fullscreen.tgf-fbs-page-active .tgf-fbs-action-row,
    body:-webkit-full-screen.tgf-fbs-page-active .tgf-fbs-action-row {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
    }

    html:fullscreen body.tgf-fbs-page-active .tgf-fbs-btn,
    html:-webkit-full-screen body.tgf-fbs-page-active .tgf-fbs-btn,
    body:fullscreen.tgf-fbs-page-active .tgf-fbs-btn,
    body:-webkit-full-screen.tgf-fbs-page-active .tgf-fbs-btn {
        min-width: 0 !important;
        width: 100% !important;
        font-size: clamp(11px, .72vw, 14px) !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        white-space: nowrap !important;
    }
}
