body {
    font-family: Isidora-SemiBold, sans-serif;
    margin: 0;
    padding: 0;
    background: #000;
}

video::-webkit-media-controls-play-button {
    display: none !important;
    -webkit-appearance: none;
    /* For some older WebKit browsers */
}

video::-webkit-media-controls-start-playback-button {
    /* For autoplay */
    display: none !important;
    -webkit-appearance: none;
}

video::-moz-media-controls-play-button {
    display: none !important;
}

video {
    controls: none;
    /* Important: Remove the browser's default control bar */
}

.overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    cursor: pointer;
}

.overlay-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
}

.overlay-content {
    position: relative;
    width: 100%;
    margin: auto;
    padding: 20px;
}

.overlay-body {
    padding: 2px 16px;
}

.overlay-body .spinner-border {
    width: 3rem;
    height: 3rem;
    margin: 0 auto;
}

.overlay-title {
    font-size: 20px;
}

/*SECTION - MAIN */
.main-content {
    background-color: #000;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 0;
}


/*
 * The maintenance log, behind the corner button. display:none in the markup - nothing here may
 * ever share the screen with content.
 */
#log_div {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 30%;
    height: 100%;
    background-color: #fff;
    color: #111;
    overflow-y: auto;      /* was overflow-x, so the panel could not be scrolled vertically at
                              all - the older lines were simply unreachable */
    overflow-x: hidden;
    z-index: 99999;
    font: 12px/1.45 ui-monospace, "DejaVu Sans Mono", Consolas, monospace;
    padding: 4px 6px;
    box-sizing: border-box;
}

/*
 * One row per entry, laid out as a FLEX ROW rather than inline-blocks with min-widths.
 *
 * min-width is a floor, not a width: '#7' and '#284' are different sizes, so the message column
 * only approximately lined up and the panel read as ragged. Flex makes the alignment structural -
 * every message starts at the same x, and a long URL wraps inside its own column instead of
 * running back to the left margin.
 */
.logline {
    display: flex;
    align-items: baseline;
    border-bottom: 1px solid #f0f0f0;
    padding: 1px 0;
}

.logseq, .logtime, .logdelta {
    color: #888;
    flex: 0 0 auto;
    white-space: pre;      /* keeps the trailing separator spaces, which the copied text needs */
}

.logseq { width: 3.6em; }                       /* never resets, so a dropped line shows as a gap */
.logtime { width: 5.2em; }
.logdelta { width: 4.6em; text-align: right; padding-right: 6px; }

/* The message takes the rest and wraps within it. break-word so a long media URL cannot force
   the panel to scroll sideways. */
.logmsg {
    flex: 1 1 auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Repeats collapse into a count rather than filling the panel. */
.logcount { color: #888; font-weight: bold; }

#devpanel_div {
    position: fixed;
    bottom: 20%;
    right: 20%;
    left: 20%;
    top: 20%;
    padding: 50px;
    background-color: white;
    border: 2px solid black;
    color: black;
    overflow-x: auto;
    z-index: 99999;
}

#log_button {
    position: fixed;
    background-color: #00000000;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    border: 0;
    z-index: 99999;
}

#devpanel_button {
    position: fixed;
    background-color: #00000000;
    bottom: 0;
    right: 0;
    width: 150px;
    height: 150px;
    border: 0;
    z-index: 99999;
}

#offscreen_button {
    position: fixed;
    background-color: #00000000;
    top: 0px;
    left: -10px;
    width: 1px;
    height: 1px;
    border: 0;
    z-index: 99999;
}

.serial {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

#serial {
    font-family: Isidora-SemiBold, sans-serif;
    width: 100%;
    padding: 0;
    font-size: 50px;
    font-weight: 700;
}

/*!SECTION */

/*SECTION - ERROR */
.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
    display: none;
}

.error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.error-message span {
    font-family: Isidora-SemiBold, sans-serif;
    font-size: 50px;
    font-weight: 700;
    margin-bottom: 10px;
}

/*!SECTION - ERROR */

/*SECTION - DEV PANEL
 *
 * Hand-written replacements for the handful of Bootstrap classes this project
 * used. Bootstrap, Font Awesome and crypto-js were loaded from CDNs on the boot
 * path of an appliance that must start with no network at all; crypto-js was not
 * used anywhere, Font Awesome supplied a single spinner icon, and Bootstrap styled
 * only this hidden maintenance panel. The page now makes zero external requests.
 */
#devpanel_div .btn,
#devpanel_div a.btn {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 8px;
    border: 1px solid #0d6efd;
    border-radius: 6px;
    background: #0d6efd;
    color: #fff;
    font: inherit;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
}

#devpanel_div .btn-outline-primary {
    background: #fff;
    color: #0d6efd;
}

#devpanel_div .form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 8px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font: inherit;
    font-size: 18px;
    box-sizing: border-box;
}

#devpanel_div .input-group {
    display: block;
}

#devpanel_div .mb-3 {
    margin-bottom: 16px;
}

/* CSS-only spinner, replacing the Font Awesome icon. */
.spinner-border {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 5px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: b2b-spin 0.9s linear infinite;
}

@keyframes b2b-spin {
    to {
        transform: rotate(360deg);
    }
}

/*!SECTION - DEV PANEL */