/* ═══════════════════════════════════════════════════════════════════════════════════════════════════
   VGB calls + live streaming UI.  Everything is namespaced `vc-` (calls) / `vl-` (live) so it can never
   collide with the rest of the app. Uses the app's own theme variables, with safe fallbacks.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════ */
:root {
  --vc-accent: var(--accent, #3b9dff);
  --vc-green: #22c55e;
  --vc-red: #ef4444;
  --vc-gold: var(--gold, #f5a524);
  --vc-glass: rgba(14, 24, 44, .62);
  --vc-glass-strong: rgba(8, 15, 30, .82);
  --vc-line: rgba(255, 255, 255, .10);
  --vc-text: #eef4ff;
  --vc-muted: #9db0d6;
  --vc-ease: cubic-bezier(.22, 1, .36, 1);
  --vc-safe-t: env(safe-area-inset-top, 0px);
  --vc-safe-b: env(safe-area-inset-bottom, 0px);
}

#vcRoot, #vcRoot * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
#vcRoot { position: fixed; inset: 0; z-index: 9000; pointer-events: none; font-family: inherit; color: var(--vc-text); }
#vcRoot > * { pointer-events: auto; }
.vc-hide { display: none !important; }
.vc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── buttons ─────────────────────────────────────────────────────────────────────────────────────── */
.vc-btn { appearance: none; border: 0; cursor: pointer; font: inherit; color: var(--vc-text); display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; transition: transform .18s var(--vc-ease), background .2s, opacity .2s, box-shadow .2s; user-select: none; }
.vc-btn:active { transform: scale(.94); }
.vc-btn[disabled] { opacity: .45; pointer-events: none; }
.vc-pill { padding: 11px 18px; border-radius: 999px; background: rgba(255, 255, 255, .10); font-weight: 700; font-size: 14px; backdrop-filter: blur(10px); }
.vc-pill:hover { background: rgba(255, 255, 255, .16); }
.vc-pill.primary { background: linear-gradient(135deg, #3b9dff, #6d5bff); box-shadow: 0 8px 26px rgba(59, 157, 255, .35); }
.vc-pill.danger { background: linear-gradient(135deg, #ff5a5a, #e11d48); box-shadow: 0 8px 26px rgba(239, 68, 68, .35); }
.vc-pill.good { background: linear-gradient(135deg, #34d399, #16a34a); box-shadow: 0 8px 26px rgba(34, 197, 94, .35); }
.vc-ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.vc-ico.fill { fill: currentColor; stroke: none; }

.vc-round { width: 62px; height: 62px; border-radius: 50%; background: rgba(255, 255, 255, .12); backdrop-filter: blur(14px); border: 1px solid var(--vc-line); }
.vc-round:hover { background: rgba(255, 255, 255, .2); }
.vc-round.off { background: #fff; color: #0b1220; }
.vc-round.end { background: linear-gradient(135deg, #ff5a5a, #e11d48); width: 70px; box-shadow: 0 10px 30px rgba(239, 68, 68, .5); border-color: transparent; }
.vc-round.accept { background: linear-gradient(135deg, #34d399, #16a34a); box-shadow: 0 10px 30px rgba(34, 197, 94, .5); border-color: transparent; }
.vc-round .vc-ico { width: 26px; height: 26px; }
.vc-label { font-size: 11px; color: var(--vc-muted); margin-top: 7px; text-align: center; font-weight: 600; letter-spacing: .2px; }
.vc-ctl { display: flex; flex-direction: column; align-items: center; }

/* ── avatars with a living ring ──────────────────────────────────────────────────────────────────── */
.vc-av { position: relative; border-radius: 50%; background: linear-gradient(135deg, #1d3b72, #3a2a8f); display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; overflow: hidden; flex: none; }
.vc-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vc-av-wrap { position: relative; display: inline-flex; }
.vc-pulse::before, .vc-pulse::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(59, 157, 255, .55); animation: vcPulse 2.2s var(--vc-ease) infinite; pointer-events: none; }
.vc-pulse::after { animation-delay: 1.1s; }
@keyframes vcPulse { 0% { transform: scale(.92); opacity: .9 } 100% { transform: scale(1.7); opacity: 0 } }
.vc-speaking { box-shadow: 0 0 0 3px var(--vc-green), 0 0 28px rgba(34, 197, 94, .55); }

/* ── full-screen call stage ──────────────────────────────────────────────────────────────────────── */
.vc-stage { position: fixed; inset: 0; display: flex; flex-direction: column; background: radial-gradient(1200px 700px at 50% -10%, #17316a 0%, #0a1330 45%, #050914 100%);
  animation: vcIn .45s var(--vc-ease) both; overflow: hidden; }
@keyframes vcIn { from { opacity: 0; transform: scale(1.03) } to { opacity: 1; transform: none } }
.vc-stage.min { inset: auto 14px calc(86px + var(--vc-safe-b)) auto; width: 148px; height: 210px; border-radius: 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); border: 1px solid var(--vc-line); cursor: pointer; transition: all .35s var(--vc-ease); }
.vc-stage.min .vc-top, .vc-stage.min .vc-bar, .vc-stage.min .vc-banner, .vc-stage.min .vc-self { display: none; }
.vc-stage.min .vc-grid { padding: 0; gap: 0; }
.vc-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px 400px at 20% 110%, rgba(109, 91, 255, .22), transparent 70%), radial-gradient(500px 360px at 90% 0%, rgba(59, 157, 255, .18), transparent 70%); }

.vc-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(14px + var(--vc-safe-t)) 16px 6px; }
.vc-title { min-width: 0; text-align: center; flex: 1; }
.vc-title b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-title span { font-size: 12.5px; color: var(--vc-muted); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
.vc-iconbtn { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .09); backdrop-filter: blur(10px); border: 1px solid var(--vc-line); }
.vc-iconbtn .vc-ico { width: 20px; height: 20px; }
.vc-enc { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #8be0ad; }

.vc-q { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.vc-q i { width: 3px; background: currentColor; border-radius: 2px; opacity: .25; }
.vc-q i:nth-child(1) { height: 4px } .vc-q i:nth-child(2) { height: 7px } .vc-q i:nth-child(3) { height: 10px } .vc-q i:nth-child(4) { height: 12px }
.vc-q[data-l="4"] i, .vc-q[data-l="3"] i:nth-child(-n+3), .vc-q[data-l="2"] i:nth-child(-n+2), .vc-q[data-l="1"] i:nth-child(1) { opacity: 1; }
.vc-q[data-l="4"], .vc-q[data-l="3"] { color: #4ade80; } .vc-q[data-l="2"] { color: #fbbf24; } .vc-q[data-l="1"], .vc-q[data-l="0"] { color: #f87171; }

.vc-banner { position: relative; z-index: 4; margin: 6px auto 0; padding: 8px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: rgba(251, 191, 36, .16); color: #fcd34d; border: 1px solid rgba(251, 191, 36, .35);
  display: flex; align-items: center; gap: 8px; animation: vcDrop .4s var(--vc-ease) both; }
.vc-banner.bad { background: rgba(239, 68, 68, .16); color: #fca5a5; border-color: rgba(239, 68, 68, .4); }
@keyframes vcDrop { from { opacity: 0; transform: translateY(-10px) } to { opacity: 1; transform: none } }
.vc-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: vcSpin .8s linear infinite; }
@keyframes vcSpin { to { transform: rotate(360deg) } }

/* the video grid: layouts are set by data-n on the container */
.vc-grid { position: relative; z-index: 2; flex: 1; min-height: 0; display: grid; gap: 8px; padding: 8px 10px; grid-auto-rows: 1fr; align-content: stretch; }
.vc-grid[data-n="1"] { grid-template-columns: 1fr; }
.vc-grid[data-n="2"] { grid-template-columns: 1fr; } 
.vc-grid[data-n="3"], .vc-grid[data-n="4"] { grid-template-columns: 1fr 1fr; }
.vc-grid[data-n="5"], .vc-grid[data-n="6"] { grid-template-columns: 1fr 1fr; }
.vc-grid[data-n="7"], .vc-grid[data-n="8"], .vc-grid[data-n="9"] { grid-template-columns: 1fr 1fr 1fr; }
.vc-grid[data-n="many"] { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); grid-auto-rows: minmax(110px, 1fr); overflow-y: auto; }
@media (min-width: 820px) {
  .vc-grid[data-n="2"] { grid-template-columns: 1fr 1fr; }
  .vc-grid[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
  .vc-grid[data-n="5"], .vc-grid[data-n="6"] { grid-template-columns: repeat(3, 1fr); }
  .vc-grid[data-n="7"], .vc-grid[data-n="8"], .vc-grid[data-n="9"] { grid-template-columns: repeat(4, 1fr); }
}
.vc-tile { position: relative; border-radius: 22px; overflow: hidden; background: linear-gradient(160deg, #13244a, #0b1330); border: 1px solid var(--vc-line); min-height: 0;
  display: flex; align-items: center; justify-content: center; transition: box-shadow .25s, border-color .25s, transform .3s var(--vc-ease); animation: vcPop .5s var(--vc-ease) both; }
@keyframes vcPop { from { opacity: 0; transform: scale(.9) } to { opacity: 1; transform: none } }
.vc-tile.speaking { border-color: rgba(34, 197, 94, .9); box-shadow: 0 0 0 2px rgba(34, 197, 94, .55), 0 0 40px rgba(34, 197, 94, .28); }
.vc-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.vc-tile.contain video { object-fit: contain; }
.vc-tile .vc-av { width: min(34vw, 120px); height: min(34vw, 120px); font-size: 40px; }
.vc-tile.waiting .vc-av { opacity: .65; filter: saturate(.7); }
.vc-tile .vc-name { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, .45); backdrop-filter: blur(8px); font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 2; }
.vc-tile .vc-state { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #cbd5e1; }
.vc-tile .vc-mut { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: rgba(239, 68, 68, .85); display: flex; align-items: center; justify-content: center; z-index: 2; }
.vc-tile .vc-mut .vc-ico { width: 15px; height: 15px; }
.vc-tile .vc-host-menu { position: absolute; bottom: 8px; right: 8px; z-index: 3; }
.vc-ring-state { position: absolute; inset: 0; background: rgba(5, 9, 20, .35); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 46px; font-size: 12px; font-weight: 700; color: #cbd5e1; pointer-events: none; }
.vc-dots::after { content: ""; display: inline-block; width: 1.4em; text-align: left; animation: vcDots 1.4s steps(4, end) infinite; }
@keyframes vcDots { 0% { content: "" } 25% { content: "." } 50% { content: ".." } 75% { content: "..." } }

/* self view: a draggable picture-in-picture bubble */
.vc-self { position: absolute; z-index: 6; right: 14px; top: calc(76px + var(--vc-safe-t)); width: 104px; height: 148px; border-radius: 18px; overflow: hidden; border: 2px solid rgba(255, 255, 255, .28); box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
  background: #0b1330; touch-action: none; cursor: grab; transition: box-shadow .2s, transform .2s var(--vc-ease); }
.vc-self.drag { cursor: grabbing; box-shadow: 0 18px 44px rgba(0, 0, 0, .65); transform: scale(1.04); }
.vc-self video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.vc-self.noflip video { transform: none; }
@media (min-width: 820px) { .vc-self { width: 190px; height: 130px; } }

/* control bar */
.vc-bar { position: relative; z-index: 5; display: flex; justify-content: center; align-items: flex-start; gap: 14px; padding: 12px 14px calc(18px + var(--vc-safe-b)); flex-wrap: wrap; }
.vc-bar-in { display: flex; gap: 14px; padding: 12px 18px 8px; border-radius: 34px; background: var(--vc-glass); border: 1px solid var(--vc-line); backdrop-filter: blur(22px) saturate(1.3); box-shadow: 0 20px 50px rgba(0, 0, 0, .4); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.vc-bar-in::-webkit-scrollbar { display: none; }
@media (max-width: 420px) { .vc-bar-in { gap: 9px; padding: 10px 12px 6px; } .vc-round { width: 54px; height: 54px; } .vc-round.end { width: 62px; } }

/* ── audio-only stage ────────────────────────────────────────────────────────────────────────────── */
.vc-audio-hero { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 10px 20px; text-align: center; }
.vc-audio-hero .vc-av { width: 150px; height: 150px; font-size: 56px; }
.vc-audio-hero h2 { margin: 6px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.3px; }
.vc-audio-hero p { margin: 0; color: var(--vc-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.vc-wave { display: flex; align-items: center; gap: 4px; height: 28px; margin-top: 4px; }
.vc-wave i { width: 4px; height: 6px; border-radius: 3px; background: linear-gradient(#60a5fa, #a78bfa); transition: height .08s linear; }
.vc-roster { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 520px; margin-top: 8px; }
.vc-roster .vc-chip { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 74px; font-size: 11.5px; font-weight: 600; color: #cbd5e1; }
.vc-roster .vc-av { width: 56px; height: 56px; font-size: 20px; transition: box-shadow .2s; }
.vc-roster .vc-chip.waiting .vc-av { opacity: .5; }

/* ── incoming call sheet ─────────────────────────────────────────────────────────────────────────── */
.vc-incoming { position: fixed; inset: 0; z-index: 9100; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(70px + var(--vc-safe-t)) 24px calc(46px + var(--vc-safe-b));
  background: radial-gradient(900px 600px at 50% 0, #1f3f86 0, #0b1432 55%, #050914 100%); animation: vcIn .4s var(--vc-ease) both; text-align: center; }
.vc-incoming .who { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.vc-incoming .vc-av { width: 138px; height: 138px; font-size: 52px; }
.vc-incoming h1 { font-size: 30px; margin: 4px 0 0; font-weight: 800; letter-spacing: -.4px; }
.vc-incoming .sub { color: var(--vc-muted); font-size: 15px; display: flex; align-items: center; gap: 8px; justify-content: center; }
.vc-incoming .acts { display: flex; gap: 56px; align-items: flex-start; }
.vc-incoming .vc-round { width: 74px; height: 74px; }
.vc-incoming .vc-round.accept { animation: vcNudge 1.6s ease-in-out infinite; }
@keyframes vcNudge { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }
.vc-incoming .quick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.vc-incoming .quick button { font-size: 12.5px; padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .09); border: 1px solid var(--vc-line); color: #dbe7ff; cursor: pointer; font-weight: 600; }

/* a gentle banner when already in a call / on a small screen */
.vc-toastcall { position: fixed; left: 12px; right: 12px; top: calc(10px + var(--vc-safe-t)); z-index: 9200; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; background: var(--vc-glass-strong);
  backdrop-filter: blur(22px); border: 1px solid var(--vc-line); box-shadow: 0 18px 46px rgba(0, 0, 0, .5); animation: vcDrop .45s var(--vc-ease) both; max-width: 520px; margin: 0 auto; }
.vc-toastcall .vc-av { width: 46px; height: 46px; font-size: 17px; }
.vc-toastcall .t { flex: 1; min-width: 0; } .vc-toastcall .t b { display: block; font-size: 14.5px; } .vc-toastcall .t span { font-size: 12.5px; color: var(--vc-muted); }
.vc-toastcall .vc-btn.mini { width: 42px; height: 42px; border-radius: 50%; }

/* ── sheets (pre-join, devices, add people, history, report) ─────────────────────────────────────── */
.vc-scrim { position: fixed; inset: 0; z-index: 9300; background: rgba(2, 6, 18, .62); backdrop-filter: blur(6px); animation: vcFade .25s ease both; display: flex; align-items: flex-end; justify-content: center; }
@keyframes vcFade { from { opacity: 0 } to { opacity: 1 } }
.vc-sheet { width: min(560px, 100%); max-height: 92vh; overflow-y: auto; background: linear-gradient(180deg, #0f1c3a, #0a1226); border: 1px solid var(--vc-line); border-bottom: 0; border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(22px + var(--vc-safe-b)); animation: vcUp .42s var(--vc-ease) both; color: var(--vc-text); }
@media (min-width: 700px) { .vc-scrim { align-items: center; } .vc-sheet { border-radius: 28px; border-bottom: 1px solid var(--vc-line); } }
@keyframes vcUp { from { transform: translateY(40px); opacity: 0 } to { transform: none; opacity: 1 } }
.vc-grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .22); margin: 4px auto 12px; }
.vc-sheet h3 { margin: 4px 0 12px; font-size: 19px; font-weight: 800; }
.vc-sheet .hint { color: var(--vc-muted); font-size: 13px; margin: 0 0 12px; line-height: 1.45; }
.vc-input { width: 100%; padding: 13px 15px; border-radius: 16px; border: 1px solid var(--vc-line); background: rgba(255, 255, 255, .06); color: var(--vc-text); font: inherit; font-size: 15px; outline: none; transition: border-color .2s, background .2s; }
.vc-input:focus { border-color: var(--vc-accent); background: rgba(59, 157, 255, .08); }
.vc-select { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--vc-line); background: #0d1a36; color: var(--vc-text); font: inherit; font-size: 14px; }
.vc-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 16px; cursor: pointer; transition: background .15s; }
.vc-row:hover { background: rgba(255, 255, 255, .06); }
.vc-row .vc-av { width: 46px; height: 46px; font-size: 17px; }
.vc-row .m { flex: 1; min-width: 0; } .vc-row .m b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .vc-row .m span { font-size: 12.5px; color: var(--vc-muted); }
.vc-row .acts { display: flex; gap: 8px; }
.vc-row .vc-btn.mini { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.vc-row .vc-btn.mini.go { background: rgba(34, 197, 94, .2); color: #4ade80; } .vc-row .vc-btn.mini.vid { background: rgba(59, 157, 255, .2); color: #7cc0ff; }
.vc-dot { width: 10px; height: 10px; border-radius: 50%; background: #475569; border: 2px solid #0a1226; position: absolute; right: -1px; bottom: -1px; } .vc-dot.on { background: #22c55e; }
.vc-empty { text-align: center; color: var(--vc-muted); padding: 28px 10px; font-size: 14px; line-height: 1.5; }
.vc-empty .big { font-size: 38px; margin-bottom: 6px; }
.vc-seg { display: flex; background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.vc-seg button { flex: 1; padding: 10px; border-radius: 11px; border: 0; background: transparent; color: var(--vc-muted); font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; transition: all .2s; }
.vc-seg button.on { background: rgba(59, 157, 255, .22); color: #fff; }
.vc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.vc-chips .c { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: 999px; background: rgba(59, 157, 255, .2); font-size: 13px; font-weight: 600; }
.vc-chips .c button { border: 0; background: rgba(255, 255, 255, .15); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; }

/* pre-join */
.vc-prejoin-view { position: relative; aspect-ratio: 3 / 4; max-height: 46vh; width: 100%; border-radius: 24px; overflow: hidden; background: linear-gradient(160deg, #13244a, #0b1330); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; border: 1px solid var(--vc-line); }
@media (min-width: 700px) { .vc-prejoin-view { aspect-ratio: 16 / 10; } }
.vc-prejoin-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.vc-prejoin-view .vc-av { width: 110px; height: 110px; font-size: 40px; }
.vc-prejoin-view .tools { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; z-index: 2; }
.vc-meter { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; margin: 6px 0 14px; }
.vc-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #22c55e, #a3e635, #f59e0b); transition: width .08s linear; border-radius: 4px; }
.vc-fieldlab { font-size: 12px; font-weight: 700; color: var(--vc-muted); margin: 8px 2px 5px; text-transform: uppercase; letter-spacing: .6px; }

/* history */
.vc-hist .vc-row .m b.miss { color: #fca5a5; }
.vc-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .09); color: #cbd5e1; font-weight: 700; }
.vc-badge.miss { background: rgba(239, 68, 68, .18); color: #fca5a5; } .vc-badge.ok { background: rgba(34, 197, 94, .16); color: #86efac; }

/* the calls / live hub panel (opened from More) */
.vc-hub { position: fixed; inset: 0; z-index: 8900; background: var(--bg, #050b18); overflow-y: auto; animation: vcIn .35s var(--vc-ease) both; padding: calc(12px + var(--vc-safe-t)) 14px calc(90px + var(--vc-safe-b)); }
.vc-hub-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; max-width: 760px; margin-inline: auto; }
.vc-hub-head h2 { flex: 1; margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.vc-hub-body { max-width: 760px; margin: 0 auto; }
.vc-card { background: var(--surface, #0a1528); border: 1px solid var(--border, #173058); border-radius: 22px; padding: 14px; margin-bottom: 12px; }

/* toasts for call/live notices */
.vc-toast { position: fixed; left: 50%; bottom: calc(96px + var(--vc-safe-b)); transform: translateX(-50%); z-index: 9500; padding: 11px 18px; border-radius: 999px; background: rgba(8, 15, 30, .92); border: 1px solid var(--vc-line);
  color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); animation: vcDrop .35s var(--vc-ease) both; max-width: 90vw; text-align: center; }

/* inline buttons added to the existing profile / DM screens */
.vc-inline { display: inline-flex; gap: 8px; align-items: center; }
.vc-inline .vc-btn { padding: 7px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; background: rgba(59, 157, 255, .14); border: 1px solid rgba(59, 157, 255, .35); color: #7cc0ff; }
.vc-inline .vc-btn .vc-ico { width: 16px; height: 16px; }
.vc-inline .vc-btn.green { background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .4); color: #4ade80; }
.vc-livebadge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .5px; color: #fff; background: linear-gradient(135deg, #ff4d6d, #e11d48); cursor: pointer; box-shadow: 0 6px 18px rgba(225, 29, 72, .4); }
.vc-livebadge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: vcBlink 1.2s ease-in-out infinite; }
@keyframes vcBlink { 50% { opacity: .25 } }

/* ═══ LIVE STREAMING ═══════════════════════════════════════════════════════════════════════════════ */
.vl-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.vl-card { position: relative; border-radius: 22px; overflow: hidden; background: linear-gradient(160deg, #13244a, #0b1330); border: 1px solid var(--vc-line); cursor: pointer; aspect-ratio: 16 / 11; display: flex; align-items: flex-end;
  transition: transform .3s var(--vc-ease), box-shadow .3s; animation: vcPop .5s var(--vc-ease) both; }
.vl-card:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(0, 0, 0, .45); }
.vl-card .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .9; }
.vl-card .bg.gen { opacity: 1; }
.vl-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .0) 35%, rgba(2, 6, 18, .9) 100%); }
.vl-card .info { position: relative; z-index: 2; padding: 12px; width: 100%; }
.vl-card .info b { display: block; font-size: 14.5px; line-height: 1.25; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vl-card .host { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #cbd5e1; }
.vl-card .host .vc-av { width: 24px; height: 24px; font-size: 10px; }
.vl-tag { position: absolute; z-index: 3; top: 10px; left: 10px; display: flex; gap: 6px; }
.vl-live { padding: 4px 9px; border-radius: 8px; font-size: 11px; font-weight: 900; letter-spacing: .8px; background: #e11d48; color: #fff; display: inline-flex; align-items: center; gap: 5px; }
.vl-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: vcBlink 1.1s infinite; }
.vl-views { padding: 4px 9px; border-radius: 8px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); display: inline-flex; align-items: center; gap: 4px; }
.vl-views .vc-ico { width: 12px; height: 12px; }
.vl-soon { position: absolute; z-index: 3; top: 10px; right: 10px; padding: 4px 9px; border-radius: 8px; font-size: 11px; font-weight: 800; background: rgba(245, 165, 36, .9); color: #1a1100; }
.vl-sec { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--vc-muted); margin: 18px 4px 10px; display: flex; align-items: center; gap: 8px; }
.vl-gobtn { width: 100%; padding: 16px; border-radius: 20px; font-size: 16px; font-weight: 800; background: linear-gradient(135deg, #ff4d6d, #e11d48 55%, #9333ea); color: #fff; box-shadow: 0 14px 34px rgba(225, 29, 72, .38); margin-bottom: 4px; }

/* the watch screen */
.vl-watch { position: fixed; inset: 0; z-index: 9050; background: #000; display: flex; flex-direction: column; animation: vcIn .4s var(--vc-ease) both; }
.vl-video { position: relative; flex: 1; min-height: 0; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vl-video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vl-video.fill video { object-fit: cover; }
.vl-top { position: absolute; z-index: 5; left: 0; right: 0; top: 0; padding: calc(12px + var(--vc-safe-t)) 12px 40px; display: flex; align-items: flex-start; gap: 10px; background: linear-gradient(180deg, rgba(0, 0, 0, .65), transparent); }
.vl-host { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 5px 12px 5px 5px; border-radius: 999px; background: rgba(0, 0, 0, .38); backdrop-filter: blur(10px); max-width: 78%; }
.vl-host .vc-av { width: 38px; height: 38px; font-size: 14px; }
.vl-host .t { min-width: 0; } .vl-host .t b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .vl-host .t span { font-size: 11.5px; color: #cbd5e1; }
.vl-state { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; background: radial-gradient(700px 500px at 50% 40%, #16336f 0, #060d22 100%); }
.vl-state h3 { margin: 0; font-size: 22px; } .vl-state p { margin: 0; color: var(--vc-muted); max-width: 320px; font-size: 14px; line-height: 1.5; }
.vl-count { font-size: 38px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -1px; background: linear-gradient(135deg, #7cc0ff, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }

.vl-side { position: absolute; z-index: 6; right: 10px; bottom: calc(120px + var(--vc-safe-b)); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.vl-side .vc-btn { width: 50px; height: 50px; border-radius: 50%; background: rgba(0, 0, 0, .42); backdrop-filter: blur(12px); border: 1px solid var(--vc-line); }
.vl-side .vc-btn.tip { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1100; border: 0; box-shadow: 0 8px 22px rgba(245, 158, 11, .5); }
.vl-side .vc-btn.heart { color: #ff5d7d; }

.vl-chat { position: absolute; z-index: 5; left: 0; bottom: calc(66px + var(--vc-safe-b)); width: min(78%, 420px); max-height: 38%; padding: 0 12px 6px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 5px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 28%); mask-image: linear-gradient(180deg, transparent, #000 28%); pointer-events: none; }
.vl-msg { display: inline-flex; align-self: flex-start; gap: 8px; align-items: baseline; padding: 6px 12px; border-radius: 16px; background: rgba(0, 0, 0, .42); backdrop-filter: blur(8px); font-size: 13.5px; line-height: 1.35; max-width: 100%; animation: vcMsg .35s var(--vc-ease) both; pointer-events: auto; word-break: break-word; }
.vl-msg b { color: #7cc0ff; font-weight: 800; white-space: nowrap; } .vl-msg.host b { color: #fbbf24; }
.vl-msg.sys { background: rgba(59, 157, 255, .22); font-size: 12.5px; }
.vl-msg.tip { background: linear-gradient(135deg, rgba(251, 191, 36, .45), rgba(245, 158, 11, .35)); border: 1px solid rgba(251, 191, 36, .6); }
@keyframes vcMsg { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
.vl-compose { position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; padding: 8px 12px calc(10px + var(--vc-safe-b)); display: flex; gap: 8px; background: linear-gradient(0deg, rgba(0, 0, 0, .7), transparent); }
.vl-compose input { flex: 1; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--vc-line); background: rgba(0, 0, 0, .5); backdrop-filter: blur(10px); color: #fff; font: inherit; font-size: 14.5px; outline: none; }
.vl-compose input:focus { border-color: var(--vc-accent); }
.vl-compose .vc-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--vc-accent); }
.vl-float { position: absolute; z-index: 6; bottom: calc(150px + var(--vc-safe-b)); font-size: 30px; pointer-events: none; animation: vlFloat 2.6s ease-out forwards; will-change: transform, opacity; }
@keyframes vlFloat { 0% { transform: translate(0, 0) scale(.5); opacity: 0 } 12% { opacity: 1; transform: translate(0, -20px) scale(1.15) } 100% { transform: translate(var(--dx, 20px), -300px) scale(1); opacity: 0 } }
.vl-tipburst { position: absolute; z-index: 8; left: 50%; top: 28%; transform: translateX(-50%); padding: 14px 24px; border-radius: 22px; background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1100; font-weight: 900; font-size: 18px; box-shadow: 0 20px 60px rgba(245, 158, 11, .6); animation: vlBurst 3.2s var(--vc-ease) forwards; text-align: center; }
@keyframes vlBurst { 0% { opacity: 0; transform: translate(-50%, 30px) scale(.6) } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.08) } 20% { transform: translate(-50%, 0) scale(1) } 85% { opacity: 1 } 100% { opacity: 0; transform: translate(-50%, -30px) scale(.96) } }
.vl-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.vl-pills button { padding: 12px 16px; border-radius: 16px; border: 1px solid var(--vc-line); background: rgba(255, 255, 255, .07); color: #fff; font: inherit; font-weight: 800; cursor: pointer; transition: all .2s; }
.vl-pills button.on { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1100; border-color: transparent; transform: translateY(-2px); }

/* streamer console */
.vl-console { position: fixed; inset: 0; z-index: 9050; background: radial-gradient(1000px 600px at 50% -10%, #1b2f66, #080e24 60%, #04070f); display: flex; flex-direction: column; animation: vcIn .4s var(--vc-ease) both; }
.vl-console .preview { position: relative; flex: 1; min-height: 0; margin: calc(56px + var(--vc-safe-t)) 12px 8px; border-radius: 24px; overflow: hidden; background: #000; border: 1px solid var(--vc-line); display: flex; align-items: center; justify-content: center; }
.vl-console .preview video { width: 100%; height: 100%; object-fit: contain; }
.vl-stats { display: flex; gap: 10px; padding: 0 12px 8px; }
.vl-stat { flex: 1; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid var(--vc-line); text-align: center; }
.vl-stat b { display: block; font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; } .vl-stat span { font-size: 11px; color: var(--vc-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.vl-obs { background: rgba(255, 255, 255, .06); border: 1px dashed rgba(255, 255, 255, .22); border-radius: 18px; padding: 14px; margin: 8px 0; font-size: 13px; }
.vl-obs code { display: block; margin: 6px 0 10px; padding: 10px 12px; background: #050914; border-radius: 12px; word-break: break-all; font-size: 12.5px; color: #a5d8ff; user-select: all; }
.vl-obs .warn { color: #fcd34d; font-weight: 700; font-size: 12.5px; }

@media (prefers-reduced-motion: reduce) {
  #vcRoot *, .vl-watch *, .vl-console * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── live gifts (14.17.1) ───────────────────────────────────────────────────────────────────────────────────────────────── */
.gf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.gf-head b { font-size: 16px; }
.gf-bal { font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 999px; background: rgba(251, 191, 36, .16); color: #fbbf24; white-space: nowrap; }
.gf-top { display: flex; gap: 8px; align-items: center; overflow-x: auto; font-size: 11px; opacity: .85; margin-bottom: 8px; scrollbar-width: none; }
.gf-top:empty { display: none; }
.gf-top span { opacity: .6; white-space: nowrap; } .gf-top em { font-style: normal; white-space: nowrap; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.gf-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.gf-tabs button { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--vc-line); background: rgba(255, 255, 255, .06); color: #fff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; transition: all .2s; }
.gf-tabs button.on { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1100; border-color: transparent; }
.gf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 40vh; overflow-y: auto; padding: 2px; overscroll-behavior: contain; }
.gf-tile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 8px; border-radius: 16px; border: 1.5px solid transparent; background: rgba(255, 255, 255, .06); color: #fff; font: inherit; cursor: pointer; transition: transform .18s, background .18s, border-color .18s; }
.gf-tile:active { transform: scale(.94); }
.gf-tile.on { border-color: #fbbf24; background: rgba(251, 191, 36, .16); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(251, 191, 36, .25); }
.gf-ico { width: 46px; height: 46px; display: block; } .gf-tile b { font-size: 11px; font-weight: 800; line-height: 1.15; text-align: center; } .gf-tile i { font-style: normal; font-size: 11px; font-weight: 900; color: #fbbf24; }
.gf-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.gf-qty { display: flex; align-items: center; gap: 6px; } .gf-qty b { min-width: 28px; text-align: center; font-size: 16px; }
.gf-qty button { min-width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--vc-line); background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.gf-foot .vc-input { flex: 1 1 110px; margin: 0; } .gf-go { flex: 1 1 100%; position: relative; overflow: hidden; }
.gf-go.gf-combo::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: rgba(26, 17, 0, .55); transform-origin: left; animation: gfCombo var(--cw, 8s) linear forwards; }
@keyframes gfCombo { from { transform: scaleX(1) } to { transform: scaleX(0) } }
/* on-screen effects */
.gf-fx { position: absolute; z-index: 9; pointer-events: none; }
.gf-fx .gf-art { width: 70px; height: 70px; } .gf-fx .gf-tag { display: flex; flex-direction: column; font-size: 11px; line-height: 1.2; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); text-align: center; margin-top: 2px; }
.gf-fx .gf-tag b { font-size: 12px; } .gf-x { position: absolute; top: -6px; right: -10px; font: 900 18px/1 inherit; font-style: italic; color: #fde047; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); animation: gfPunch .35s ease-out; }
.gf-fx.pop { left: 14px; bottom: 140px; display: flex; flex-direction: column; align-items: center; animation: gfPop 2.8s ease-out forwards; }
@keyframes gfPop { 0% { opacity: 0; transform: translate(0, 40px) scale(.4) } 10% { opacity: 1; transform: translate(var(--gx), 0) scale(1.15) } 18% { transform: translate(var(--gx), 0) scale(1) } 80% { opacity: 1; transform: translate(var(--gx), -120px) } 100% { opacity: 0; transform: translate(var(--gx), -170px) scale(.9) } }
.gf-fx.burst { left: 50%; top: 32%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; animation: gfBurst 3.4s var(--vc-ease, ease) forwards; }
.gf-fx.burst .gf-art { width: 130px; height: 130px; filter: drop-shadow(0 0 26px rgba(251, 191, 36, .85)); animation: gfBob 1.2s ease-in-out infinite; }
.gf-fx.burst u { position: absolute; left: 50%; top: 56px; width: 8px; height: 8px; border-radius: 50%; background: #fde047; opacity: 0; animation: gfSpark 1.4s ease-out .15s forwards; transform: rotate(var(--a)) translateY(0); }
@keyframes gfBurst { 0% { opacity: 0; transform: translateX(-50%) scale(.3) } 10% { opacity: 1; transform: translateX(-50%) scale(1.12) } 18% { transform: translateX(-50%) scale(1) } 85% { opacity: 1 } 100% { opacity: 0; transform: translateX(-50%) translateY(-26px) scale(.95) } }
@keyframes gfSpark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-86px) scale(.4) } }
@keyframes gfBob { 50% { transform: translateY(-8px) rotate(2deg) } } @keyframes gfPunch { 0% { transform: scale(2.2); opacity: 0 } 100% { transform: scale(1); opacity: 1 } }
.gf-full { position: absolute; inset: 0; z-index: 12; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 45%, rgba(251, 191, 36, .28), rgba(0, 0, 0, .55) 70%); animation: gfFull 3.8s ease forwards; overflow: hidden; }
.gf-full .gf-art { width: min(62vw, 280px); height: min(62vw, 280px); filter: drop-shadow(0 0 44px rgba(251, 191, 36, .9)); animation: gfHero 3.8s cubic-bezier(.2, .9, .3, 1.2) forwards; position: relative; }
.gf-rays { position: absolute; width: 150vmax; height: 150vmax; left: 50%; top: 45%; margin: -75vmax 0 0 -75vmax; background: repeating-conic-gradient(rgba(255, 236, 160, .22) 0 8deg, transparent 8deg 24deg); animation: gfSpin 8s linear infinite; mask-image: radial-gradient(circle, #000 0, transparent 60%); -webkit-mask-image: radial-gradient(circle, #000 0, transparent 60%); }
.gf-ban { position: relative; margin-top: 12px; padding: 10px 20px; border-radius: 18px; background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1100; font-size: 15px; text-align: center; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 16px 50px rgba(245, 158, 11, .6); animation: gfBan 3.8s ease forwards; }
.gf-ban span { font-weight: 900; font-size: 18px; }
.gf-full s { position: absolute; top: -20px; left: var(--x); width: 9px; height: 14px; border-radius: 2px; background: hsl(var(--h) 90% 60%); animation: gfConf var(--d) linear var(--w) forwards; }
@keyframes gfFull { 0% { opacity: 0 } 8% { opacity: 1 } 88% { opacity: 1 } 100% { opacity: 0 } } @keyframes gfHero { 0% { transform: scale(.2) rotate(-12deg); opacity: 0 } 18% { transform: scale(1.1) rotate(3deg); opacity: 1 } 28% { transform: scale(1) rotate(0) } 100% { transform: scale(1.04) } }
@keyframes gfBan { 0%, 14% { transform: translateY(30px); opacity: 0 } 26% { transform: translateY(0); opacity: 1 } 100% { opacity: 1 } } @keyframes gfSpin { to { transform: rotate(360deg) } }
@keyframes gfConf { to { transform: translateY(110vh) rotate(720deg) } }
@media (prefers-reduced-motion: reduce) { .gf-fx, .gf-full, .gf-full * { animation-duration: .01s !important; } }
