#vfc-widget{
  position: fixed;
  z-index: 99999;
  font-family: Assistant, Arial, sans-serif;
}

#vfc-toggle{
  width: 80px;
  height: 80px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 14px 38px rgba(0,0,0,0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  transition: transform .25s ease, box-shadow .25s ease;
}

#vfc-toggle:hover{
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 18px 46px rgba(0,0,0,0.30);
}

.vfc-envelope{ line-height: 1; }

#vfc-panel{
  width: 390px;
  max-width: calc(100vw - 30px);
  height: 560px;
  max-height: calc(100vh - 130px);
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.30);
  backdrop-filter: blur(14px);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, max-height .25s ease, margin .25s ease, border-width .25s ease;
}

#vfc-panel.vfc-hidden{
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(.94);
  pointer-events: none;
  max-height: 0;
  margin-bottom: 0;
  border-width: 0;
}

.vfc-header{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #111827, #1f2937);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.vfc-avatar{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.vfc-title{ color:#fff; font-size:16px; font-weight:700; }
.vfc-status{ color:rgba(255,255,255,0.65); font-size:13px; margin-top:2px; }

.vfc-body{
  flex: 1;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  background:
    radial-gradient(circle at top right, rgba(124,58,237,0.10), transparent 30%),
    radial-gradient(circle at bottom left, rgba(6,182,212,0.08), transparent 30%),
    #0f172a;
}

.vfc-msg{
  max-width: 86%;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 15px;
  word-break: break-word;
  animation: vfcFadeUp .35s ease;
}

.vfc-msg.bot{
  align-self: flex-start;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 6px;
}

.vfc-msg.user{
  align-self: flex-end;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 6px;
}

.vfc-msg.typing{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  padding: 14px 16px;
}

.vfc-msg.typing span{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: .4;
  animation: vfcBlink 1.2s infinite ease-in-out;
}

.vfc-msg.typing span:nth-child(2){ animation-delay: .2s; }
.vfc-msg.typing span:nth-child(3){ animation-delay: .4s; }

.vfc-input-wrap{
  display: flex;
  gap: 10px;
  padding: 16px;
  background: #0b1220;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.vfc-input-wrap input{
  flex: 1;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
}

.vfc-input-wrap input::placeholder{ color: rgba(255,255,255,0.45); }

.vfc-input-wrap button{
  border: none;
  border-radius: 14px;
  padding: 0 18px;
  min-width: 96px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  font-family: inherit;
}

.vfc-input-wrap button:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(6,182,212,0.24);
}

.vfc-input-wrap button:disabled,
.vfc-input-wrap input:disabled{
  opacity: .7;
  cursor: default;
}

@keyframes vfcBlink{
  0%, 80%, 100% { transform: scale(.8); opacity: .35; }
  40% { transform: scale(1); opacity: 1; }
}

@keyframes vfcFadeUp{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px){
  #vfc-panel{
    width: min(390px, calc(100vw - 20px));
    height: 70vh;
  }

  #vfc-toggle{
    width: 72px;
    height: 72px;
    font-size: 30px;
  }
}
