:root{
  --sharky-primary:#0f766e;
  --sharky-primary-dark:#083f3c;
  --sharky-primary-soft:rgba(15,118,110,.12);
  --sharky-cyan:#22d3ee;
  --sharky-white:#ffffff;
  --sharky-text:#0f172a;
  --sharky-muted:#64748b;
  --sharky-border:rgba(15,23,42,.08);
}
#sharky-widget{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:999999;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  color:var(--sharky-text);
}
#sharky-widget *{box-sizing:border-box}
#sharky-widget img{display:block;max-width:100%}

.sharky-toggle{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:64px;
  border:0;
  border-radius:24px;
  padding:10px 18px 10px 10px;
  color:#fff;
  cursor:pointer;
  background:linear-gradient(135deg,#0f766e 0%,#075985 100%);
  box-shadow:0 22px 48px rgba(8,47,73,.35);
  transition:transform .2s ease,box-shadow .2s ease,filter .2s ease;
}
.sharky-toggle:hover{transform:translateY(-3px);filter:saturate(1.08);box-shadow:0 28px 56px rgba(8,47,73,.42)}
.sharky-avatar,.sharky-header-avatar{
  width:46px;
  height:46px;
  flex:0 0 46px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:18px;
  overflow:hidden;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.25);
}
.sharky-avatar img,.sharky-header-avatar img{width:100%;height:100%;object-fit:cover}
.sharky-toggle-meta{display:flex;flex-direction:column;align-items:flex-start;line-height:1.1}
.sharky-toggle-text{font-weight:900;font-size:17px;letter-spacing:-.02em}
.sharky-toggle-sub{font-size:12px;opacity:.82;margin-top:3px}

.sharky-panel{
  position:absolute;
  right:0;
  bottom:82px;
  width:min(410px,calc(100vw - 24px));
  height:min(660px,calc(100vh - 105px));
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:30px;
  background:rgba(248,250,252,.92);
  border:1px solid rgba(255,255,255,.72);
  box-shadow:0 34px 90px rgba(2,8,23,.32);
  backdrop-filter:blur(24px);
  -webkit-backdrop-filter:blur(24px);
  opacity:0;
  transform:translateY(18px) scale(.96);
  transform-origin:bottom right;
  pointer-events:none;
  transition:opacity .22s ease,transform .22s ease;
}
.sharky-panel.is-visible{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}

.sharky-header{
  min-height:86px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px;
  color:#fff;
  background:
    radial-gradient(circle at 20% 0%,rgba(34,211,238,.45),transparent 34%),
    linear-gradient(135deg,#083f3c 0%,#0f766e 55%,#0891b2 120%);
}
.sharky-header-left{display:flex;align-items:center;gap:13px;min-width:0}
.sharky-header-meta{display:flex;flex-direction:column;gap:5px;min-width:0}
.sharky-header-meta strong{font-size:20px;font-weight:900;letter-spacing:-.03em;line-height:1}
.sharky-header-meta span{font-size:12px;opacity:.9;display:flex;align-items:center;gap:6px}
.sharky-header-meta span i{width:8px;height:8px;border-radius:50%;background:#22c55e;display:inline-block;box-shadow:0 0 0 4px rgba(34,197,94,.18)}
.sharky-close{
  width:42px;
  height:42px;
  border:1px solid rgba(255,255,255,.24);
  background:rgba(255,255,255,.10);
  color:#fff;
  border-radius:16px;
  font-size:24px;
  line-height:1;
  cursor:pointer;
  transition:background .18s ease,transform .18s ease;
}
.sharky-close:hover{background:rgba(255,255,255,.20);transform:rotate(4deg) scale(1.04)}

.sharky-messages{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:12px;
  overflow:auto;
  padding:18px 16px 10px;
  background:
    radial-gradient(circle at 85% 10%,rgba(34,211,238,.14),transparent 28%),
    radial-gradient(circle at 10% 90%,rgba(15,118,110,.12),transparent 30%),
    linear-gradient(180deg,#f8fafc 0%,#eef7ff 100%);
}
.sharky-row{display:flex}
.sharky-row-user{justify-content:flex-end}
.sharky-row-bot{justify-content:flex-start}
.sharky-bubble{
  max-width:86%;
  padding:13px 15px;
  border-radius:20px;
  font-size:14px;
  line-height:1.55;
  word-break:break-word;
  white-space:pre-wrap;
}
.sharky-bubble a{color:inherit;text-decoration:underline;font-weight:800}
.sharky-bubble-bot{
  background:rgba(255,255,255,.96);
  border:1px solid rgba(15,23,42,.08);
  color:var(--sharky-text);
  border-bottom-left-radius:8px;
  box-shadow:0 10px 28px rgba(15,23,42,.07);
}
.sharky-bubble-user{
  color:#fff;
  background:linear-gradient(135deg,#0f766e,#0891b2);
  border-bottom-right-radius:8px;
  box-shadow:0 14px 28px rgba(8,145,178,.22);
}
.sharky-bubble.is-loading{display:inline-flex;gap:6px;align-items:center;min-width:62px;justify-content:center}
.sharky-dot{width:8px;height:8px;border-radius:50%;background:#94a3b8;animation:sharkyPulse 1s infinite ease-in-out}
.sharky-dot:nth-child(2){animation-delay:.15s}
.sharky-dot:nth-child(3){animation-delay:.3s}
@keyframes sharkyPulse{0%,80%,100%{transform:scale(.55);opacity:.45}40%{transform:scale(1);opacity:1}}

.sharky-starters{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:2px;
}
.sharky-chip{
  border:1px solid rgba(15,118,110,.14);
  background:rgba(255,255,255,.82);
  color:#0f766e;
  border-radius:16px;
  padding:10px 11px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(15,23,42,.045);
  transition:transform .16s ease,background .16s ease,border-color .16s ease;
}
.sharky-chip:hover{transform:translateY(-2px);background:#fff;border-color:rgba(15,118,110,.34)}

.sharky-form{
  display:flex;
  gap:10px;
  padding:14px;
  background:rgba(255,255,255,.96);
  border-top:1px solid rgba(15,23,42,.08);
}
.sharky-input-wrap{flex:1;min-width:0;position:relative}
.sharky-form input{
  width:100%;
  height:52px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:18px;
  padding:0 16px;
  font-size:14px;
  color:var(--sharky-text);
  background:#f8fafc;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.sharky-form input:focus{
  outline:none;
  border-color:#0f766e;
  background:#fff;
  box-shadow:0 0 0 4px rgba(15,118,110,.12);
}
.sharky-form button{
  height:52px;
  border:0;
  border-radius:18px;
  padding:0 20px;
  color:#fff;
  font-weight:900;
  cursor:pointer;
  background:linear-gradient(135deg,#0f766e,#0891b2);
  box-shadow:0 14px 30px rgba(8,145,178,.24);
  transition:transform .18s ease,box-shadow .18s ease;
}
.sharky-form button:hover{transform:translateY(-2px);box-shadow:0 18px 36px rgba(8,145,178,.30)}

.sharky-toggle:focus-visible,
.sharky-close:focus-visible,
.sharky-form button:focus-visible,
.sharky-form input:focus-visible,
.sharky-chip:focus-visible{outline:3px solid rgba(34,211,238,.45);outline-offset:2px}

@media (max-width:640px){
  #sharky-widget{right:12px;bottom:12px}
  .sharky-panel{right:0;bottom:78px;width:calc(100vw - 24px);height:min(76vh,620px);border-radius:28px}
  .sharky-toggle{padding:10px;min-width:64px}
  .sharky-toggle-meta{display:none}
  .sharky-starters{grid-template-columns:1fr}
  .sharky-bubble{max-width:92%}
}
