html,
body {
    width: 100%;
    height: 100%;
}

body {
    margin: 0;
    overflow: hidden;
    background: #083b55;
    color: #fffdf2;
    font-family: "Trebuchet MS", Arial, sans-serif;
}

#game,
#ocean {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#ocean {
    display: block;
}

#hud {
    position: absolute;
    top: 18px;
    left: 22px;
    right: 22px;
    height: 82px;
    display: flex;
    align-items: stretch;
    pointer-events: none;
}

.brand,
.wave-card,
.timer-card,
#leaderboard {
    background: #083b55;
    border: 3px solid #fff4c7;
    box-sizing: border-box;
}

.brand {
    width: 172px;
    padding: 10px 17px 7px;
    transform: rotate(-1deg);
}

.brand-small,
.wave-card span,
.timer-card span,
.eyebrow {
    display: block;
    color: #7de7d4;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

.brand strong {
    display: block;
    color: #ffc94a;
    font-size: 40px;
    line-height: 38px;
    letter-spacing: 3px;
}

.wave-card,
.timer-card {
    margin-left: 12px;
    padding: 12px 18px;
    min-width: 148px;
}

.wave-card strong,
.timer-card strong {
    display: block;
    margin-top: 3px;
    font-size: 24px;
}

.timer-card {
    margin-left: auto;
    min-width: 115px;
    text-align: center;
}

#leaderboard {
    position: absolute;
    top: 114px;
    right: 22px;
    width: 250px;
    padding: 12px 14px;
}

#leaderboard h2 {
    margin: 0 0 8px;
    color: #ffc94a;
    font-size: 15px;
    letter-spacing: 2px;
}

#scores {
    margin: 0;
    padding: 0;
    list-style: none;
}

#scores li {
    height: 30px;
    display: flex;
    align-items: center;
    font-size: 14px;
    border-top: 1px solid #31677d;
}

#scores li:first-child {
    border-top: 0;
}

.score-dot {
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
}

.score-name {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-points {
    margin-left: auto;
    color: #ffc94a;
    font-weight: bold;
}

#joinPanel {
    position: absolute;
    left: 50%;
    top: 49%;
    transform: translate(-50%, -50%);
}

.rcRoomQrCodeLink {
    display: block;
    box-sizing: content-box;
    width: 150px;
    margin-left: auto;
    margin-right: auto;
    border: solid 8px #fff;
    border-radius: 8px;
    color: #fff;
    background-color: #fff;
    box-shadow: 0 0 32px #000;
    text-align: center;
    transition: opacity 1s ease;
    text-decoration: none;
    transform-origin: center;
    transform: scale(1);
    animation: pop-in 500ms ease-in-out forwards;
}

@keyframes pop-in {
    0% {
        transform: scale(0.5);
    }

    66% {
        transform: scale(1.1);
    }

    100% {
        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;
    border-radius: 8px 8px 0 0;
}

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

.rcRoomQrCode img,
.rcRoomQrCode canvas {
    display: block;
    width: 150px !important;
    height: 150px !important;
}

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

#setAlert {
    position: absolute;
    left: 50%;
    top: 23%;
    padding: 10px 30px 14px;
    background: #f05b4f;
    border: 4px solid #fff4c7;
    color: #fff;
    text-align: center;
    opacity: 0;
    transform: translate(-50%, -20px) rotate(-2deg);
    transition: opacity 220ms, transform 220ms;
    pointer-events: none;
}

#setAlert.visible {
    opacity: 1;
    transform: translate(-50%, 0) rotate(-2deg);
}

#setAlert span,
#setAlert strong {
    display: block;
}

#setAlert span {
    font-size: 13px;
    letter-spacing: 3px;
}

#setAlert strong {
    font-size: 38px;
}

#networkStatus {
    position: absolute;
    left: 12px;
    bottom: 8px;
    color: #c6edf0;
    font-size: 11px;
}

/* Lean-paint mode: flat colours, no shadows, filters, or gradients. */
body.lean-paint *,
body.lean-paint *:before,
body.lean-paint *:after {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
}

@media (max-width: 700px), (orientation: portrait) {
    #hud {
        top: 10px;
        left: 10px;
        right: 10px;
        height: 64px;
    }

    .brand {
        width: 112px;
        padding: 8px 10px;
    }

    .brand-small {
        font-size: 9px;
    }

    .brand strong {
        font-size: 26px;
        line-height: 25px;
    }

    .wave-card,
    .timer-card {
        min-width: 0;
        margin-left: 7px;
        padding: 9px 11px;
    }

    .wave-card strong,
    .timer-card strong {
        font-size: 17px;
    }

    #leaderboard {
        top: 84px;
        right: 10px;
        width: 190px;
        padding: 9px 10px;
    }

    #scores li {
        height: 25px;
        font-size: 12px;
    }

}
