Files
tv-discord/activity/css/activity.css
T

147 lines
6.8 KiB
CSS

:root {
--bg: #08080c;
--fg: #f4f2f8;
--muted: #a39fb0;
--accent: #c084fc;
--accent-2: #a855f7;
--glass: rgba(14, 12, 20, 0.72);
--line: rgba(255, 255, 255, 0.16);
color-scheme: dark;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); overflow: hidden; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.app { position: fixed; inset: 0; user-select: none; -webkit-user-select: none; }
.video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; object-fit: contain; }
.video::cue { background: rgba(0, 0, 0, 0.62); font-size: clamp(14px, 3.2vh, 30px); }
.backdrop {
position: absolute; inset: 0; background-size: cover; background-position: center;
opacity: 0; transition: opacity 0.6s; filter: blur(2px) brightness(0.35);
}
/* ---- full screens -------------------------------------------------------- */
.screen {
position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
gap: 12px; padding: 24px; text-align: center;
background: radial-gradient(ellipse at 50% 35%, rgba(192, 132, 252, 0.14), transparent 60%), var(--bg);
}
.app[data-view="boot"] .idle,
.app[data-view="idle"] .idle,
.app[data-view="error"] .idle { display: flex; }
.app[data-view="finding"] .finding { display: flex; background: transparent; }
.app[data-view="finding"] .backdrop { opacity: 1; }
.app:not([data-view="play"]) .video,
.app:not([data-view="play"]) .top,
.app:not([data-view="play"]) .bottom,
.app:not([data-view="play"]) .spinner,
.app:not([data-view="play"]) .join,
.app:not([data-view="play"]) .unmute { display: none; }
.idle__logo { width: clamp(64px, 16vh, 120px); height: auto; animation: bob 3.2s ease-in-out infinite; filter: drop-shadow(0 8px 24px rgba(192, 132, 252, 0.35)); }
.idle__title { margin: 0; font-size: clamp(28px, 7vh, 52px); font-weight: 800; letter-spacing: -0.03em; }
.idle__title span { color: var(--accent); }
.idle__msg { margin: 0; color: var(--muted); font-size: clamp(14px, 2.6vh, 18px); max-width: 32em; }
.app[data-view="error"] .idle__msg { color: #fca5a5; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }
.finding__title { margin: 8px 0 0; font-size: clamp(20px, 4.5vh, 34px); font-weight: 700; }
.finding__msg { margin: 0; color: var(--muted); }
.ring {
width: 44px; height: 44px; border-radius: 50%;
border: 3px solid rgba(255, 255, 255, 0.14); border-top-color: var(--accent);
animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; pointer-events: none; }
.spinner p { margin: 0; color: var(--muted); font-size: 14px; text-shadow: 0 1px 4px #000; }
/* ---- overlays ------------------------------------------------------------ */
.top, .bottom { position: absolute; left: 0; right: 0; transition: opacity 0.25s, transform 0.25s; }
.app.is-idle .top, .app.is-idle .bottom { opacity: 0; pointer-events: none; }
.app.is-idle { cursor: none; }
.app.is-idle .top { transform: translateY(-8px); }
.app.is-idle .bottom { transform: translateY(8px); }
.top {
top: 0; display: flex; align-items: flex-start; gap: 16px;
padding: max(14px, env(safe-area-inset-top)) 18px 40px;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent);
}
.top__text { min-width: 0; flex: 1; }
.top__title { font-size: clamp(15px, 2.8vh, 22px); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__sub { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__src {
flex: none; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px;
background: rgba(192, 132, 252, 0.16); color: var(--accent); border: 1px solid rgba(192, 132, 252, 0.35);
}
.top__src:empty { display: none; }
.bottom {
bottom: 0; padding: 40px 14px max(10px, env(safe-area-inset-bottom));
background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.btn {
width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px;
background: transparent; cursor: pointer;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); }
.btn svg { width: 24px; height: 24px; }
.time { font-variant-numeric: tabular-nums; font-size: 13px; color: #ddd; }
.viewers { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #ddd; }
.viewers svg { width: 18px; height: 18px; color: var(--accent); }
.seek { position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek__track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); overflow: hidden; transition: height 0.15s; }
.seek:hover .seek__track { height: 6px; }
.seek__buf, .seek__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.seek__buf { background: rgba(255, 255, 255, 0.28); }
.seek__fill { background: var(--accent); }
.seek__tip {
position: absolute; bottom: 22px; transform: translateX(-50%); padding: 3px 7px; border-radius: 6px;
background: var(--glass); font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none;
}
.join {
position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
display: flex; align-items: center; gap: 12px; padding: 18px 26px; border: 0; border-radius: 16px;
background: var(--accent); color: #1a0b2e; font-weight: 800; font-size: clamp(15px, 2.8vh, 20px);
box-shadow: 0 10px 40px rgba(192, 132, 252, 0.45); cursor: pointer;
}
.join svg { width: 26px; height: 26px; }
.join:hover { background: #d0a2fd; }
.unmute {
position: absolute; right: 16px; top: 64px; display: flex; align-items: center; gap: 8px;
padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass);
font-weight: 600; font-size: 13px; cursor: pointer;
}
.unmute svg { width: 18px; height: 18px; }
/* ---- toasts -------------------------------------------------------------- */
.toasts { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; z-index: 5; }
.toast {
padding: 9px 16px; border-radius: 10px; background: var(--glass); border: 1px solid var(--line);
font-size: 14px; max-width: 80vw; opacity: 0; transform: translateY(-6px); transition: opacity 0.25s, transform 0.25s;
}
.toast.is-in { opacity: 1; transform: none; }
@media (max-width: 520px) {
.top { padding-left: 12px; padding-right: 12px; }
.top__src { display: none; }
}