html,
body {
    min-height: 100%;
    margin: 0;
    background: #111820;
    color: #eef3f7;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    padding: 12px 12px 84px;
    box-sizing: border-box;
}

button,
input {
    font: inherit;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

#appName {
    margin: 0 0 3px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

#commsInfo,
#backToAppsButton {
    color: #9ed7ff;
    font-size: 13px;
    text-decoration: none;
}

#backToAppsButton {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    line-height: 36px;
}

main {
    max-width: 560px;
    margin: 0 auto;
}

section {
    margin-bottom: 12px;
}

#nowPlaying,
#audioControls,
#stationSection {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background: #18232d;
}

#currentTitle {
    overflow: hidden;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#statusLine {
    min-height: 18px;
    overflow: hidden;
    color: #b9c7d4;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#transport,
#displayControls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#transport button,
#displayControls button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: #263542;
    color: #eef3f7;
    cursor: pointer;
    font-weight: 700;
}

#transport button {
    flex: 1 1 48px;
    min-width: 48px;
    padding: 0 8px;
}

#transport .transportPrimary {
    background: #f7c948;
    color: #111;
}

#transport button.active,
#displayControls button.active {
    background: #8fd0ff;
    color: #081018;
}

#transport svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    vertical-align: middle;
}

#audioControls label {
    display: block;
    color: #d7e0e8;
    font-size: 13px;
    font-weight: 700;
}

#volumeSlider {
    width: 100%;
    margin: 12px 0 4px;
}

#displayControls button {
    flex: 1 1 31%;
    padding: 0 10px;
    font-size: 13px;
}

#stationHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

#stationHeader h2 {
    margin: 0;
    font-size: 18px;
}

#stationCount {
    color: #aebdca;
    font-size: 12px;
    font-weight: 700;
}

#searchLabel {
    position: absolute;
    left: -9999px;
}

#stationSearch {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    margin-bottom: 12px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: #101820;
    color: #fff;
}

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

.stationItem {
    margin-bottom: 8px;
}

.stationButton {
    display: block;
    width: 100%;
    min-height: 58px;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #101820;
    color: #eef3f7;
    cursor: pointer;
    text-align: left;
}

.stationButton.active {
    border-color: #f7c948;
    background: #27323b;
}

.stationName {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stationUrl {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: #aebdca;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emptyStations {
    padding: 18px 8px;
    color: #aebdca;
    text-align: center;
}

#bottomPanel {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    min-height: 56px;
    padding: 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: #101820;
}

.bottomPanelCell {
    min-width: 0;
}

.bottomPanelCell:first-child {
    flex: 1 1 auto;
}

.roomCell {
    flex: 0 0 auto;
    text-align: right;
}

.bottomPanelLabel {
    display: block;
    margin-bottom: 2px;
    color: #81919f;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

#roomLabel {
    margin: 0;
    color: #d7e0e8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

#bottomPanel #statusLine {
    display: block;
    color: #d7e0e8;
}

@media (max-width: 360px) {
    body {
        padding-right: 8px;
        padding-left: 8px;
    }

    #displayControls button {
        flex-basis: 100%;
    }
}
