Files
tv-discord/activity/overlay.css
T
4DBug 7de90b5b7c v2: watch-party Activity
The Activity is now the full bug.tv site plus a small Discord overlay. Whoever
starts the instance hosts and controls everything; everyone else mirrors the
host's page and playback. The server is a relay keyed by activity instance and
checks membership through Discord's activity-instances API, so it works in DM
and group calls. The bot gateway, slash commands and control message are gone.
2026-10-27 10:00:34 -05:00

191 lines
6.2 KiB
CSS

/*
overlay.css — the watch-party overlay injected by discord.js on top of the bug.tv site:
members pill (top right), viewer banner, toasts, and viewer input blocking.
*/
.bp-root {
--bp-accent: #c084fc;
--bp-accent-soft: rgba(192, 132, 252, 0.18);
--bp-glass: rgba(15, 15, 18, 0.72);
--bp-border: rgba(255, 255, 255, 0.14);
--bp-text: #f4f4f6;
--bp-text-2: #b6b6c0;
--bp-danger: #ff5f5f;
--bp-warn: #f5a524;
position: fixed;
top: calc(var(--header-h, 72px) + max(8px, env(safe-area-inset-top)));
right: max(16px, env(safe-area-inset-right));
z-index: 2147483000;
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 8px;
pointer-events: none;
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
line-height: 1.3;
color: var(--bp-text);
}
.bp-root * { box-sizing: border-box; }
.bp-root button { font: inherit; color: inherit; }
.bp-glass {
background: var(--bp-glass);
border: 1px solid var(--bp-border);
-webkit-backdrop-filter: blur(14px) saturate(1.4);
backdrop-filter: blur(14px) saturate(1.4);
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
/* ---- pill ----------------------------------------------------------------------------- */
.bp-pill {
pointer-events: auto;
display: inline-flex;
align-items: center;
gap: 8px;
height: 36px;
padding: 0 12px 0 6px;
border-radius: 999px;
cursor: pointer;
opacity: 0.9;
transition: opacity 0.2s, border-color 0.2s;
max-width: min(320px, calc(100vw - 32px));
}
.bp-pill:hover { opacity: 1; border-color: rgba(192, 132, 252, 0.5); }
.bp-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
margin-left: 4px;
background: var(--bp-warn);
box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.18);
}
.bp-root[data-conn="live"] .bp-dot { background: var(--bp-accent); box-shadow: 0 0 0 3px var(--bp-accent-soft); }
.bp-root[data-conn="error"] .bp-dot { background: var(--bp-danger); box-shadow: 0 0 0 3px rgba(255, 95, 95, 0.18); }
.bp-avatars { display: inline-flex; align-items: center; }
.bp-av {
width: 24px;
height: 24px;
border-radius: 50%;
flex-shrink: 0;
border: 2px solid rgba(15, 15, 18, 0.9);
background: #26262d;
color: var(--bp-text);
font-size: 11px;
font-weight: 700;
display: inline-flex;
align-items: center;
justify-content: center;
overflow: hidden;
text-transform: uppercase;
}
.bp-av + .bp-av { margin-left: -8px; }
.bp-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-av.is-host { border-color: var(--bp-accent); }
.bp-more { margin-left: 4px; color: var(--bp-text-2); font-size: 12px; font-weight: 600; }
.bp-host {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 600;
}
.bp-host.is-me { color: var(--bp-accent); }
/* ---- member list (pill click) -------------------------------------------------------- */
.bp-list {
pointer-events: auto;
min-width: 200px;
max-width: min(320px, calc(100vw - 32px));
padding: 6px;
border-radius: 14px;
}
.bp-list[hidden] { display: none; }
.bp-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; }
.bp-row .bp-av { width: 26px; height: 26px; }
.bp-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-row__tag { color: var(--bp-text-2); font-size: 11px; }
.bp-status { padding: 6px 8px 4px; color: var(--bp-text-2); font-size: 12px; }
/* ---- viewer banner -------------------------------------------------------------------- */
.bp-banner {
pointer-events: auto;
display: inline-flex;
align-items: center;
gap: 10px;
padding: 8px 8px 8px 14px;
border-radius: 12px;
border-color: rgba(192, 132, 252, 0.4);
max-width: min(360px, calc(100vw - 32px));
}
.bp-banner[hidden] { display: none; }
.bp-banner__text { min-width: 0; }
.bp-banner__text b { color: var(--bp-accent); font-weight: 700; }
.bp-banner__sub { display: block; color: var(--bp-text-2); font-size: 11px; margin-top: 1px; }
.bp-x {
flex-shrink: 0;
width: 26px;
height: 26px;
border: 0;
border-radius: 8px;
background: transparent;
cursor: pointer;
color: var(--bp-text-2);
font-size: 16px;
line-height: 1;
}
.bp-x:hover { background: rgba(255, 255, 255, 0.1); color: var(--bp-text); }
/* ---- toasts --------------------------------------------------------------------------- */
.bp-toasts { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bp-toast {
padding: 8px 12px;
border-radius: 10px;
opacity: 0;
transform: translateY(-6px);
transition: opacity 0.25s, transform 0.25s;
max-width: min(320px, calc(100vw - 32px));
}
.bp-toast.is-shown { opacity: 1; transform: none; }
.bp-toast--host { border-color: rgba(192, 132, 252, 0.5); }
.bp-toast--error { border-color: rgba(255, 95, 95, 0.5); }
/* ---- viewers: look-but-don't-touch ---------------------------------------------------
discord.js also blocks clicks/keys in the capture phase; this makes it visible
(no hover states, no pointer cursor) and keeps scrolling working. */
html.party-viewer body a,
html.party-viewer body button,
html.party-viewer body input,
html.party-viewer body select,
html.party-viewer body textarea,
html.party-viewer body label,
html.party-viewer body summary,
html.party-viewer body [role="slider"],
html.party-viewer body [role="button"],
html.party-viewer body [role="menuitem"],
html.party-viewer body [tabindex],
html.party-viewer .pl-video,
html.party-viewer .pl-seek {
pointer-events: none !important;
}
html.party-viewer body .pl-volwrap,
html.party-viewer body .pl-volwrap *,
html.party-viewer body [data-party-allow],
html.party-viewer body [data-party-allow] *,
html.party-viewer body .pl-btn[aria-label^="Fullscreen"],
html.party-viewer body .pl-btn[aria-label^="Exit fullscreen"],
html.party-viewer body .bp-root,
html.party-viewer body .bp-root * {
pointer-events: auto !important;
}
html.party-viewer body .bp-root { pointer-events: none !important; }
html.party-viewer .header-search { opacity: 0.55; }
@media (max-width: 640px) {
.bp-root { right: 12px; }
.bp-host { max-width: 110px; }
}
@media (prefers-reduced-motion: reduce) {
.bp-toast { transition: none; }
}