/* RESET */
* {
    box-sizing: border-box;
    margin: 0;
    font-family: Arial, sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #1a1a1a;
}

/* Fills the window and centers the fixed-size stage, letterboxing as needed */
.stage-viewport {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/*
 * Authored at a fixed 1920x1080 design size and uniformly scaled to fit the
 * window (see js/video-live-feed.js) - the background and the panel share
 * this one coordinate system, so they stay aligned at any window size.
 */
.stage {
    position: relative;
    width: 1920px;
    height: 1080px;
    flex-shrink: 0;
    transform: scale(var(--stage-scale, 1));
    transform-origin: center center;
}

.stage-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;
}

/*
 * POSITION & SIZE CONTROLS
 * Reposition/resize the player panel within the 1920x1080 stage without
 * touching the .live-feed-panel rules below.
 */
:root {
    --panel-top: 38%;
    --panel-left: 45%;
    --panel-width: 50%;
}

.live-feed-panel {
    position: absolute;
    top: var(--panel-top);
    left: var(--panel-left);
    transform: translateX(-50%);
    width: var(--panel-width);
    color: #fff;
    z-index: 1;
}

.live-feed-panel h1 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    text-align: center;
}

#videoContainer {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

video {
    width: 100%;
    height: auto;
    display: block;
}

.controls {
    margin-top: 1.25rem;
}

.feed-select-group,
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

select,
input {
    flex: 1;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #2a2a2a;
    color: #fff;
    font-size: 14px;
}

button {
    padding: 10px 20px;
    background: #0078d4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background: #005fa3;
}

.status {
    margin-top: 15px;
    padding: 10px;
    background: #2a2a2a;
    border-radius: 4px;
    font-size: 13px;
    color: #aaa;
}

.status.error {
    color: #ff6b6b;
}

.status.success {
    color: #51cf66;
}
