* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
    color: #f8fbf4;
    background: #101610;
    font-family: Verdana, "Gill Sans", "Trebuchet MS", sans-serif;
}

body {
    position: relative;
}

#battleCanvas {
    display: block;
    width: 100vw;
    height: 100vh;
    background: #7fa8b8;
}

.hud {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 0;
    pointer-events: none;
}

.title-panel,
.turn-panel,
.scoreboard,
.message-box,
.network-status {
    background: rgba(14, 18, 15, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.title-panel {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 218px;
    padding: 12px 14px;
}

.label,
.room-line,
.turn-meta,
.tank-status,
.message-copy {
    color: rgba(248, 251, 244, 0.72);
}

.label,
.turn-label,
.message-title {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10px;
    line-height: 1.1;
    color: #e5c15a;
}

.title-panel h1 {
    margin: 3px 0 5px;
    font-family: "Trebuchet MS", "Arial Rounded MT Bold", Verdana, sans-serif;
    font-size: 38px;
    line-height: 0.95;
}

.room-line {
    font-size: 12px;
}

.turn-panel {
    position: absolute;
    top: 18px;
    left: 254px;
    right: 330px;
    min-height: 82px;
    padding: 12px 14px;
}

.turn-name {
    display: block;
    margin-top: 4px;
    font-family: "Trebuchet MS", "Arial Rounded MT Bold", Verdana, sans-serif;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.turn-meta {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
}

.scoreboard {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 294px;
    max-height: 72vh;
    padding: 8px;
    overflow: hidden;
}

.score-row {
    position: relative;
    min-height: 47px;
    padding: 7px 8px 7px 42px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.score-row:last-child {
    border-bottom: 0;
}

.score-dot {
    position: absolute;
    top: 12px;
    left: 9px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.36);
}

.score-name {
    display: block;
    margin-right: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 800;
}

.tank-status {
    display: block;
    margin-top: 3px;
    margin-right: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
}

.score-values {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 72px;
    text-align: right;
}

.health-text {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: #f8fbf4;
}

.win-text {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    color: #e5c15a;
}

.active-row {
    background: rgba(229, 193, 90, 0.14);
}

.destroyed-row {
    opacity: 0.58;
}

.disconnected-row {
    opacity: 0.38;
}

.center-message {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px;
    pointer-events: none;
}

.center-message.hidden {
    display: none;
}

.message-box {
    max-width: 540px;
    padding: 20px 22px;
    text-align: center;
}

.message-title {
    font-size: 13px;
}

.message-copy {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.4;
}

.qr-shell {
    position: absolute;
    right: 20px;
    bottom: 20px;
    opacity: 0.82;
    pointer-events: auto;
    -webkit-transform-origin: bottom right;
    transform-origin: bottom right;
    -webkit-transform: scale(0.78);
    transform: scale(0.78);
}

.network-status {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 11px;
    color: rgba(248, 251, 244, 0.76);
    font-size: 12px;
    pointer-events: none;
}

.rcRoomQrCodeLink {
    display: block;
    -webkit-box-sizing: content-box;
    box-sizing: content-box;
    width: 150px;
    margin-top: 8px;
    margin-bottom: 8px;
    margin-left: auto;
    margin-right: auto;
    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: top left;
    transform: scale(1);
}

.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 {
    -webkit-box-sizing: content-box;
    box-sizing: content-box;
    width: 150px;
    height: 150px;
    overflow: hidden;
}

.rcRoomQrCode img,
.rcRoomQrCode canvas {
    display: block;
    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;
}

@media (max-width: 1100px),
(max-height: 640px) {
    .title-panel {
        top: 12px;
        left: 12px;
        width: 170px;
        padding: 9px 10px;
    }

    .title-panel h1 {
        font-size: 29px;
    }

    .turn-panel {
        top: 12px;
        left: 194px;
        right: 244px;
        min-height: 66px;
        padding: 9px 10px;
    }

    .turn-name {
        font-size: 22px;
    }

    .scoreboard {
        top: 12px;
        right: 12px;
        width: 220px;
        padding: 6px;
    }

    .score-row {
        min-height: 40px;
        padding-left: 34px;
    }

    .score-dot {
        top: 11px;
        left: 7px;
        width: 17px;
        height: 17px;
    }

    .score-name {
        margin-right: 62px;
        font-size: 11px;
    }

    .tank-status {
        margin-right: 62px;
        font-size: 9px;
    }

    .score-values {
        width: 58px;
    }

    .qr-shell {
        right: 12px;
        bottom: 12px;
        -webkit-transform: scale(0.62);
        transform: scale(0.62);
    }

    .network-status {
        left: 12px;
        bottom: 12px;
    }
}

@media (max-width: 700px) {
    .title-panel {
        width: 128px;
    }

    .title-panel h1 {
        font-size: 24px;
    }

    .room-line {
        font-size: 10px;
    }

    .turn-panel {
        left: 150px;
        right: 12px;
        min-height: 60px;
    }

    .turn-name {
        font-size: 18px;
    }

    .turn-meta {
        font-size: 10px;
    }

    .scoreboard {
        top: auto;
        right: 12px;
        bottom: 84px;
        width: 190px;
        max-height: 34vh;
    }

    .qr-shell {
        opacity: 0.56;
        -webkit-transform: scale(0.54);
        transform: scale(0.54);
    }

    .network-status {
        font-size: 10px;
    }
}

/* Lean paint path for older signage browsers such as Tizen 2.x. */
.lean-paint,
.lean-paint body {
    background: #101610;
}

.lean-paint .title-panel,
.lean-paint .turn-panel,
.lean-paint .scoreboard,
.lean-paint .message-box,
.lean-paint .network-status {
    background: rgba(14, 18, 15, 0.92);
    box-shadow: none;
}
