body {
    margin: 0;
    background: #111;
    color: white;
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

#videoContainer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    cursor: none;
}

video,
#glCanvas {
    max-width: 90vw;
    max-height: 80vh;
    border: 2px solid #444;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    cursor: none;
    outline: none;
}

/* Ensure video/canvas takes full space in fullscreen mode */
#videoContainer:fullscreen {
    width: 100vw;
    height: 100vh;
}

#videoContainer:fullscreen video,
#videoContainer:fullscreen #glCanvas {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    border: none;
    border-radius: 0;
}

.controls {
    margin-top: 20px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    margin: 0 5px;
}

button:hover {
    background: #0056b3;
}

#status {
    margin-bottom: 10px;
    color: #aaa;
}

.hint {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #666;
}

#latency-hud {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #00ff00;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
    pointer-events: none;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    text-shadow: 0 0 2px black;
}