html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: #062f46;
    color: #fff8dc;
    font-family: "Trebuchet MS", Arial, sans-serif;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

button,
input {
    font: inherit;
}

#controller {
    width: 100%;
    max-width: 520px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 15px;
    box-sizing: border-box;
    background: #083b55;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eyebrow,
label,
#stats span,
#energyPanel > span {
    color: #73dfd1;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
}

h1 {
    margin: -2px 0 0;
    color: #ffc94a;
    font-size: 42px;
    line-height: 42px;
    letter-spacing: 4px;
}

#connection {
    padding: 7px 10px;
    border: 2px solid #3d7184;
    color: #9fbcc6;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

#connection.live {
    border-color: #73dfd1;
    color: #73dfd1;
}

#setup {
    margin-top: 14px;
    padding: 12px;
    border: 2px solid #fff0b8;
}

label {
    display: block;
    margin-bottom: 6px;
}

.name-row {
    display: flex;
}

#riderName {
    min-width: 0;
    flex: 1;
    height: 44px;
    padding: 0 11px;
    box-sizing: border-box;
    border: 0;
    background: #f7f0d3;
    color: #083b55;
    font-size: 17px;
}

#joinButton {
    width: 88px;
    border: 0;
    background: #ffc94a;
    color: #083b55;
    font-weight: bold;
}

#colors {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.color-button {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 3px solid #083b55;
    border-radius: 50%;
}

.color-button.selected {
    border-color: #fff;
}

#stats {
    display: flex;
    margin-top: 13px;
    border: 2px solid #3d7184;
}

#stats div {
    width: 25%;
    padding: 8px 4px;
    box-sizing: border-box;
    text-align: center;
    border-left: 1px solid #3d7184;
}

#stats div:first-child {
    border-left: 0;
}

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

#stats strong {
    margin-top: 3px;
    color: #ffc94a;
    font-size: 21px;
}

#energyPanel {
    display: flex;
    align-items: center;
    margin-top: 12px;
}

#energyPanel > span {
    width: 64px;
}

#energyTrack {
    height: 13px;
    flex: 1;
    background: #062f46;
    border: 2px solid #3d7184;
}

#energy {
    width: 60%;
    height: 100%;
    background: #73dfd1;
    transition: width 120ms;
}

#status {
    height: 34px;
    margin: 11px 0 8px;
    color: #d4eef0;
    text-align: center;
    font-size: 14px;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.carve-row,
.action-row {
    display: flex;
}

.hold-button,
#trick {
    height: 100px;
    border: 3px solid #fff0b8;
    background: #0d5d70;
    color: #fff8dc;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
    touch-action: none;
}

.hold-button span,
#trick span {
    display: block;
    margin-bottom: 3px;
    color: #73dfd1;
    font-size: 34px;
}

#left,
#right {
    width: 50%;
}

#left {
    margin-right: 4px;
}

#right {
    margin-left: 4px;
}

.action-row {
    margin-top: 8px;
}

#paddle {
    width: 62%;
    margin-right: 4px;
    background: #0e7181;
}

#trick {
    width: 38%;
    margin-left: 4px;
    background: #e9564d;
}

.hold-button.active,
.hold-button:active,
#trick:active {
    background: #ffc94a;
    color: #083b55;
    transform: translateY(3px);
}

.hold-button.active span,
.hold-button:active span,
#trick:active span {
    color: #083b55;
}

footer {
    padding: 11px 0 4px;
    color: #7fa7b5;
    text-align: center;
    font-size: 11px;
}

@media (max-height: 650px) {
    #setup {
        margin-top: 8px;
        padding: 8px;
    }

    #stats {
        margin-top: 8px;
    }

    .hold-button,
    #trick {
        height: 78px;
    }

    #status {
        margin: 7px 0 4px;
    }

    footer {
        display: none;
    }
}
