:root{
    --sc-bg:#0b1220;
    --sc-panel:#0f1a30;
    --sc-border: rgba(255,255,255,.10);
    --sc-text: rgba(255,255,255,.92);
    --sc-muted: rgba(255,255,255,.62);
    --sc-muted2: rgba(255,255,255,.45);
    --sc-accent:#5b8cff;
    --sc-good:#27d7a6;
    --sc-bad:#ff5b6e;
    --sc-shadow: 0 18px 55px rgba(0,0,0,.38);
    --sc-radius: 16px;
  }

  .sc{ position: fixed; right: 18px; bottom: 18px; z-index: 9999; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
 .sc__fab{
  position: relative;

  
  width: 74px;
  height: 74px;
  border-radius: 24px;

  border: 1px solid var(--sc-border);
  background: rgba(91,140,255,.18);
  color: var(--sc-text);
  cursor: pointer;
  box-shadow: var(--sc-shadow);

  
  font-size: 28px;

  animation: sc-bounce 1.3s ease-in-out infinite;

}
  .sc__fab:hover{ background: rgba(91,140,255,.24); }

  .sc__badge{
    position:absolute; top:-6px; right:-6px;
    min-width: 18px; height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    border: 1px solid rgba(255,91,110,.35);
    background: rgba(255,91,110,.18);
    color: var(--sc-text);
    font-size: 11px;
    font-weight: 700;
    display:flex; align-items:center; justify-content:center;
  }
  .sc__badge--hidden{ display:none; }

  .sc__panel{
    position:absolute;
    right: 0;
    bottom: 88px;
    width: 340px;
    max-width: calc(100vw - 36px);
    height: 420px;
    max-height: calc(100vh - 120px);
    border-radius: var(--sc-radius);
    border: 1px solid var(--sc-border);
    background: linear-gradient(180deg, var(--sc-panel), rgba(17,31,58,1));
    box-shadow: var(--sc-shadow);
    overflow: hidden;
    display:flex;
    flex-direction:column;
    transform-origin: bottom right;
    transition: transform .16s ease, opacity .16s ease, visibility .16s ease;
  }
  .sc__panel--closed{
    opacity:0; visibility:hidden;
    transform: translateY(10px) scale(.98);
    pointer-events:none;
  }

  .sc__header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 10px;
    padding: 12px 12px;
    border-bottom: 1px solid var(--sc-border);
    background: rgba(0,0,0,.08);
  }
  .sc__titleMain{ font-weight: 800; color: var(--sc-text); font-size: 14px; }
  .sc__titleSub{ color: var(--sc-muted); font-size: 12px; margin-top:2px; }
  .sc__actions{ display:flex; gap: 8px; align-items:center; }
  .sc__iconBtn{
    width: 32px; height: 32px;
    border-radius: 12px;
    border: 1px solid var(--sc-border);
    background: rgba(255,255,255,.05);
    color: var(--sc-text);
    cursor:pointer;
    font-size: 14px;
  }
  .sc__iconBtn:hover{ background: rgba(255,255,255,.08); }

  .sc__messages{
    flex:1;
    overflow:auto;
    padding: 12px;
    display:flex;
    flex-direction:column;
    gap: 10px;
    background:
      radial-gradient(650px 300px at 20% 0%, rgba(91,140,255,.10), transparent 60%),
      radial-gradient(650px 300px at 80% 0%, rgba(39,215,166,.09), transparent 60%),
      transparent;
  }
  .sc__empty{
    color: var(--sc-muted);
    border: 1px dashed var(--sc-border);
    border-radius: 14px;
    padding: 12px;
    text-align:center;
  }

  .sc__msg{
    display:flex;
    flex-direction:column;
    gap: 4px;
    max-width: 85%;
  }
  .sc__msg--me{ align-self:flex-end; }
  .sc__msg--them{ align-self:flex-start; }

  .sc__bubble{
    padding: 9px 11px;
    border-radius: 14px;
    border: 1px solid var(--sc-border);
    color: var(--sc-text);
    background: rgba(255,255,255,.06);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.35;
    font-size: 13px;
  }
  .sc__msg--me .sc__bubble{
    background: rgba(91,140,255,.20);
    border-color: rgba(91,140,255,.35);
  }

  .sc__meta{
    font-size: 11px;
    color: var(--sc-muted2);
    display:flex;
    gap: 8px;
    align-items:center;
  }

  .sc__composer{
    border-top: 1px solid var(--sc-border);
    padding: 10px;
    display:flex;
    gap: 10px;
    align-items:flex-end;
    background: rgba(0,0,0,.08);
  }
  .sc__input{
    flex:1;
    resize:none;
    min-height: 40px;
    max-height: 120px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--sc-border);
    background: rgba(255,255,255,.05);
    color: var(--sc-text);
    outline:none;
    box-sizing:border-box;
    font-size: 13px;
  }
  .sc__input::placeholder{ color: var(--sc-muted2); }

  .sc__send{
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(91,140,255,.35);
    background: rgba(91,140,255,.20);
    color: var(--sc-text);
    cursor:pointer;
    font-weight: 700;
  }
  .sc__send:disabled{
    opacity:.55; cursor:not-allowed;
  }

  @keyframes sc-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  20%      { transform: translateY(-10px) scale(1.03); }
  40%      { transform: translateY(0) scale(0.99); }
  60%      { transform: translateY(-6px) scale(1.02); }
  80%      { transform: translateY(0) scale(1); }
}
.sc.sc--open .sc__fab{
  animation: none;
}

.sc__fab:hover,
.sc__fab:focus-visible{
  animation: none;
}
.sc__panel{
  width: 420px;   
  height: 520px;  
}
.sc__fab.sc__fab--jump {
  animation: sc-bounce 1.2s ease-in-out infinite;
}
