html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    font-family: "Trebuchet MS", "Gill Sans", Arial, sans-serif;
    color: #f9fbff;
    background: #081728;
}

body {
    position: relative;
}

#gameCanvas {
    display: block;
    width: 100vw;
    height: 100vh;
    background: #081728;
}

.hudLayer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
}

.topHud {
    position: absolute;
    top: 16px;
    right: 16px;
    left: 16px;
    height: 74px;
}

.brandPanel {
    float: left;
    min-width: 210px;
    padding: 12px 16px 10px;
    border-radius: 8px;
    background: rgba(3, 12, 27, 0.76);
    border: 2px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.eyebrow {
    color: #6be8ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1 {
    margin: 2px 0 0;
    color: #fff263;
    font-size: 34px;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}

.levelPanel {
    float: right;
    min-width: 156px;
    padding: 12px 16px 10px;
    border-radius: 8px;
    background: rgba(3, 12, 27, 0.76);
    border: 2px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    text-align: right;
}

.levelLabel {
    color: #ff5e88;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.05;
}

.brickLabel {
    margin-top: 4px;
    color: #b9f8ff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.centerBanner {
    position: absolute;
    top: 45%;
    left: 50%;
    width: 560px;
    max-width: 74vw;
    margin-left: -280px;
    padding: 16px 20px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(5, 15, 32, 0.76);
    border: 2px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
    font-size: 34px;
    line-height: 1.12;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.centerBanner.hidden {
    display: none;
}

.scanPanel {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 186px;
    min-height: 186px;
    pointer-events: auto;
}

.scanFallback {
    display: block;
    padding: 12px;
    border-radius: 8px;
    color: #061428;
    background: #fff263;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.rcRoomQrCodeLink,
.rcRoomQrCodeLink * {
    box-sizing: content-box;
}

.rcRoomQrCodeLink {
    display: block;
    width: 150px;
    margin-left: auto;
    border: solid 8px #fff;
    border-radius: 8px;
    color: #fff;
    background-color: #fff;
    box-shadow: 0 0 0 1px #fff, 0 12px 28px rgba(0, 0, 0, 0.28);
    text-align: center;
    transition: opacity 1s ease;
    text-decoration: none;
    transform-origin: bottom right;
    transform: scale(0.72);
    -webkit-tap-highlight-color: transparent;
}

.rcTechLabel {
    background-color: #000;
    color: #fff;
    font-family: monospace;
    font-size: 13px;
    font-weight: bold;
    margin: 0 0 8px 0;
    padding: 4px;
    letter-spacing: 0.2em;
}

.rcRoomQrCode {
    width: 150px;
    height: 150px;
}

.rcRoomId {
    background-color: #000;
    color: #fff;
    font-family: monospace;
    font-size: 16px;
    padding: 4px;
    margin: 8px 0 0 0;
    letter-spacing: 0.25em;
}

.roster {
    position: absolute;
    left: 16px;
    bottom: 16px;
    width: 300px;
    max-height: 58vh;
    overflow: hidden;
}

.playerCard {
    position: relative;
    min-height: 48px;
    margin-top: 8px;
    padding: 8px 10px 8px 50px;
    border-radius: 8px;
    background: rgba(3, 12, 27, 0.74);
    border: 2px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
    box-sizing: border-box;
}

.playerSwatch {
    position: absolute;
    top: 11px;
    left: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.86);
}

.playerName {
    overflow: hidden;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.1;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playerMeta {
    margin-top: 3px;
    color: #b9f8ff;
    font-size: 12px;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.networkStatus {
    position: absolute;
    right: 16px;
    top: 102px;
    padding: 7px 10px;
    border-radius: 8px;
    color: #d7fbff;
    background: rgba(3, 12, 27, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 760px) {
    .topHud {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .brandPanel {
        min-width: 0;
        padding: 10px 12px;
    }

    h1 {
        font-size: 24px;
    }

    .levelPanel {
        min-width: 118px;
        padding: 10px 12px;
    }

    .levelLabel {
        font-size: 20px;
    }

    .brickLabel {
        font-size: 11px;
        letter-spacing: 0.04em;
    }

    .centerBanner {
        top: 42%;
        width: 330px;
        max-width: 82vw;
        margin-left: -165px;
        padding: 12px 14px;
        font-size: 21px;
    }

    .scanPanel {
        right: 8px;
        bottom: 8px;
        width: 120px;
        min-height: 120px;
    }

    .rcRoomQrCodeLink {
        transform: scale(0.48);
    }

    .roster {
        left: 8px;
        bottom: 8px;
        width: 220px;
        max-height: 38vh;
    }

    .playerCard {
        min-height: 42px;
        margin-top: 5px;
        padding: 7px 8px 7px 42px;
    }

    .playerSwatch {
        top: 10px;
        left: 10px;
        width: 20px;
        height: 20px;
        border-width: 2px;
    }

    .playerName {
        font-size: 13px;
    }

    .playerMeta {
        font-size: 10px;
    }

    .networkStatus {
        right: 10px;
        top: 86px;
        font-size: 10px;
    }
}

.lean-paint,
.lean-paint body {
    background: #07192b;
}

.lean-paint .brandPanel,
.lean-paint .levelPanel,
.lean-paint .centerBanner,
.lean-paint .playerCard,
.lean-paint .networkStatus,
.lean-paint .rcRoomQrCodeLink {
    box-shadow: none;
}

.lean-paint .brandPanel,
.lean-paint .levelPanel,
.lean-paint .centerBanner,
.lean-paint .playerCard,
.lean-paint .networkStatus {
    background: #061428;
}
