:root {
  --twb-color: #25D366;
  --twb-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

#twb-widget {
  position: fixed;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.twb-bottom-right { bottom: 24px; right: 24px; }
.twb-bottom-left  { bottom: 24px; left: 24px; }

/* Toggle button */
.twb-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--twb-color);
  border: none;
  cursor: pointer;
  box-shadow: var(--twb-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-left: auto;
}

.twb-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

.twb-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #FF3B30;
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: twb-pulse 2s infinite;
}

@keyframes twb-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Bubble popup */
.twb-bubble {
  width: 320px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--twb-shadow);
  margin-bottom: 12px;
  overflow: hidden;
  display: none;
  animation: twb-slide-up 0.25s ease;
}

.twb-bubble.active { display: block; }

@keyframes twb-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.twb-bubble-header {
  background: var(--twb-color);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.twb-avatar {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.twb-bubble-text { flex: 1; line-height: 1.3; }
.twb-bubble-text strong { display: block; font-size: 15px; }
.twb-bubble-text span { font-size: 12px; opacity: 0.85; }

.twb-close {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.8;
  padding: 4px;
  line-height: 1;
}
.twb-close:hover { opacity: 1; }

.twb-bubble-body { padding: 16px; }
.twb-bubble-body p { margin: 0 0 12px; font-size: 14px; color: #333; }

.twb-topics { display: flex; flex-direction: column; gap: 8px; }

.twb-topic {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f5f5f5;
  border-radius: 10px;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease, transform 0.1s ease;
}

.twb-topic:hover {
  background: #e8f5e9;
  transform: translateX(3px);
  color: #1a1a1a;
  text-decoration: none;
}
