/* Lean display layer: the canvas owns the rich artwork, CSS stays flat. */
* {
    box-sizing: border-box;
}

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;
    color: #e9fcff;
    background: #064f76;
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

body {
    position: relative;
}

#gameCanvas {
    display: block;
    width: 100vw;
    height: 100vh;
    cursor: pointer;
    outline: none;
}

.scanPanel {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 5;
}

.rcRoomQrCodeLink {
    display: block;
    border: solid 8px #fff;
    border-radius: 8px;
    color: #fff;
    background-color: #fff;
    box-shadow: 0 0 0 1px #fff;
    text-align: center;
    transition: opacity 1s ease;
    text-decoration: none;
    transform-origin: bottom left;
    transform: scale(0.5);
    -webkit-tap-highlight-color: transparent;
}

.rcTechLabel {
    margin: 0 0 8px 0;
    padding: 4px;
    color: #fff;
    background-color: #061f31;
    font-family: monospace;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.rcRoomQrCode {
    display: block;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.rcRoomId {
    margin: 8px 0 0 0;
    padding: 4px;
    color: #fff;
    background-color: #061f31;
    font-family: monospace;
    font-size: 16px;
    letter-spacing: 0.14em;
    white-space: nowrap;
}

.topHud {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 4;
    pointer-events: none;
}

.roundBanner,
.highScoreHud,
.rosterCard {
    background: rgba(3, 33, 50, 0.74);
    border: 1px solid rgba(199, 253, 255, 0.34);
}

.roundBanner {
    position: absolute;
    top: 12px;
    left: 50%;
    max-width: 520px;
    padding: 10px 18px;
    border-radius: 8px;
    color: #eaffff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-align: center;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.roundBanner.hidden {
    display: none;
}

.roundBanner.scoreMode {
    min-width: 96px;
    padding: 8px 18px;
    font-size: 52px;
    letter-spacing: 0;
}

.highScoreHud {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #d9fbff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.roster {
    position: absolute;
    top: 72px;
    left: 12px;
    width: 260px;
}

.rosterCard {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    padding: 7px 9px;
    border-radius: 8px;
    color: #fff;
}

.rosterSwatch {
    width: 42px;
    height: 30px;
    margin-right: 9px;
    flex: none;
}

.rosterBirdImage {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.rosterName {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: #eaffff;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rosterScore {
    margin-left: 8px;
    color: #ffe477;
    font-size: 15px;
    font-weight: 900;
}

.rosterCard.eliminated {
    opacity: 0.58;
}

@media (max-width: 900px) {
    .roundBanner {
        top: 8px;
        max-width: 360px;
        padding: 8px 12px;
        font-size: 18px;
    }

    .roundBanner.scoreMode {
        font-size: 42px;
    }

    .highScoreHud {
        top: 8px;
        right: 8px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .roster {
        top: 66px;
        left: 8px;
        width: 210px;
    }
}

@media (max-width: 560px) {
    .scanPanel {
        right: 8px;
        bottom: 8px;
        left: auto;
    }

    .rcRoomQrCodeLink {
        transform-origin: bottom right;
        transform: scale(0.45);
    }

    .roundBanner {
        max-width: 220px;
        font-size: 13px;
        letter-spacing: 0.03em;
    }

    .roundBanner.scoreMode {
        min-width: 72px;
        font-size: 34px;
    }

    .highScoreHud {
        font-size: 11px;
        letter-spacing: 0.03em;
    }

    .roster {
        top: 62px;
        width: 178px;
    }

    .rosterCard {
        margin-bottom: 4px;
        padding: 6px 7px;
    }

    .rosterSwatch {
        width: 34px;
        height: 24px;
        margin-right: 7px;
    }

    .rosterName {
        font-size: 11px;
    }

    .rosterScore {
        font-size: 13px;
    }
}
