:root { --bg: #f8f9fa; --fg: #202124; --muted: #5f6368; --line: #dadce0; --accent: #1a73e8; --danger: #d93025; --stage: #3c4043; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #202124; --fg: #e8eaed; --muted: #9aa0a6; --line: #3c4043; --accent: #8ab4f8; --danger: #f28b82; --stage: #111; }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; background: var(--bg); color: var(--fg); font: 14px/1.4 system-ui, -apple-system, "Segoe UI", "PingFang SC", sans-serif; }
header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
#joinBar, #controlBar { display: flex; gap: 6px; align-items: center; flex: 1; min-width: 0; }
input { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: inherit; font: inherit; min-width: 0; }
#code { width: 110px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; letter-spacing: 6px; text-align: center; }
#url { flex: 2; }
#text { flex: 1; }
button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--danger); border-color: var(--danger); }
#status { color: var(--muted); white-space: nowrap; }
#status.live { color: var(--danger); font-weight: 600; }
main { position: relative; flex: 1; min-height: 0; background: var(--stage); outline: none; }
video { width: 100%; height: 100%; object-fit: contain; display: block; cursor: default; }
#placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: #bdc1c6; padding: 16px; }
main:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
[hidden] { display: none !important; }
button:disabled { opacity: .35; cursor: default; }
#progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 2; overflow: hidden; pointer-events: none; background: rgba(26, 115, 232, .25); }
#progress::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; background: var(--accent); animation: progress 1.1s ease-in-out infinite; }
@keyframes progress { from { left: -30%; } to { left: 100%; } }
#overlay { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2; padding: 6px 14px; border-radius: 6px; background: rgba(0, 0, 0, .75); color: #fff; pointer-events: none; }
.click-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid #ea4335; border-radius: 50%; pointer-events: none; animation: click-dot .5s ease-out forwards; }
@keyframes click-dot { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
