/* ── Base ──────────────────────────────────────────────────────────────── */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none !important;
}

body {
    background: #000;
    color: #ccc;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Viewer (room page) ───────────────────────────────────────────────── */

body.viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

body.viewer.zoom {
    display: block;
    height: auto;
    overflow: auto;
}

video {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    background: #000;
}

body.zoom video {
    max-width: none;
    max-height: none;
    width: var(--video-w, auto);
    height: var(--video-h, auto);
}

#status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 16px;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s;
}

#status.hidden {
    opacity: 0;
}

#toggle {
    position: fixed;
    bottom: 12px;
    right: 12px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.55);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 5px;
    padding: 5px 9px;
    font-size: 13px;
    cursor: pointer;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

#toggle.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── Install page ─────────────────────────────────────────────────────── */

body.install {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.install-page {
    text-align: center;
    max-width: 440px;
    padding: 32px;
}

.install-page h1 {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.install-page p {
    font-size: 15px;
    color: #888;
    margin-bottom: 32px;
    line-height: 1.5;
}

#install-btn {
    display: inline-block;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

#install-btn:hover {
    background: #1d4ed8;
}

#install-btn:disabled {
    background: #333;
    color: #666;
    cursor: default;
}

.features {
    list-style: none;
    text-align: left;
    margin-bottom: 32px;
    font-size: 14px;
    color: #888;
    line-height: 1.8;
}

.features li::before {
    content: "0 ";
    color: #555;
    font-weight: 600;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.room-input {
    margin-top: 8px;
}

.room-input input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    color: #fff;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s;
}

.room-input input:focus {
    border-color: #2563eb;
}

.room-input input::placeholder {
    color: #555;
}

.install-note {
    margin-top: 20px;
    font-size: 13px;
    color: #555;
}
