body {
    font-family: sans-serif;
    margin: 1em;
}

h1 {
    background-color: #E61C39;
    color: white;
    padding: .25em 1em;
    margin-left: -1em;
    margin-right: -1em;
}

#cmdLineJsonInfo, #envVarsJsonInfo {
    font-size: 11pt;
}

#setupArgs, #setupEnv {
    overflow: scroll;
}

#setupClickToStart > button, #reconnectClickToReconnect > button {
    margin-top: 1em;
    background-color: #E61C39;
    color: white;
    padding: .25em 1em;
    font-size: 150%;
}

#setupValidationError {
    margin-top: 1em;
    font-weight: bold;
    color: darkred;
}

#appError h1, #appReconnectionError h1 {
    background-color: #500;
}

#appDisconnected h1 {
    background-color: #333;
}

#appStreaming h1 {
    background-color: #E61C39;
    margin-bottom: 0;
}

#streamControls {
    margin: .25em 0;
}

#streamVideoElement {
    max-width: 100%;
}

#appConnecting h1 {
    background-color: #E61C39;
    animation: connectingColorPulse 1s linear alternate-reverse infinite;
}

@keyframes connectingColorPulse {
    to {
        background-color: #FFOOOO;
    }
}

/* Block access when in portrait on small screens */
@media only screen and (orientation: portrait) and (max-width: 1024px) {
    body > * {
        display: none !important;
    }

    /* If mobileMessage exists → show ONLY mobileMessage */
    body:has(#mobileMessage) > #mobileMessage {
        display: flex !important;
    }

    /* If mobileMessage does NOT exist → show rotateMessage */
    body:not(:has(#mobileMessage)) > #rotateMessage {
        display: flex !important;
    }
}

/* Default: hide the rotate message */
#rotateMessage {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background-color: black;
    color: white;
    font-size: 2em;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1em;
}

/* Default: hide the rotate message */
#mobileMessage {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background-color: black;
    color: white;
    font-size: 2em;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1em;
}