:root {
  --bylros-primary: #b2182b; /* BYLROS Red */
  --bylros-bg: #ffffff;
  --bylros-text: #222;
  --bylros-muted: #6c757d;
  --bylros-shadow: 0 12px 34px rgba(0, 0, 0, 0.15);
  --bylros-radius: 20px;
  --bylros-gradient: linear-gradient(135deg, #b2182b, #8c1322);
  --bylros-transition: all 0.25s cubic-bezier(.4,0,.2,1);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bylros-bg: #1e1e1e;
    --bylros-text: #f5f5f5;
    --bylros-muted: #aaa;
    --bylros-shadow: 0 12px 34px rgba(0, 0, 0, 0.6);
  }
}

/* Floating Action Button */
.bylros-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: var(--bylros-gradient);
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  box-shadow: var(--bylros-shadow);
  cursor: pointer;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--bylros-transition);
}
.bylros-fab:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 14px 32px rgba(178,24,43,0.45);
}
.bylros-fab:focus {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* Chat Panel */
.bylros-panel {
  position: fixed;
  right: 22px;
  bottom: 95px;
  width: 380px;
  max-width: 92vw;
  height: 560px;
  background: var(--bylros-bg);
  border-radius: var(--bylros-radius);
  box-shadow: var(--bylros-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99999;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: var(--bylros-transition);
  backdrop-filter: blur(14px) saturate(120%);
}
.bylros-panel.hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
}

/* Header */
.bylros-header {
  background: var(--bylros-gradient);
  color: #fff;
  padding: 14px 18px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.2px;
}
.bylros-header-actions { display: flex; gap: 8px; }

.bylros-close, .bylros-mic {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  border-radius: 10px;
  padding: 6px 10px;
  transition: var(--bylros-transition);
}
.bylros-close:hover, .bylros-mic:hover {
  background: rgba(255,255,255,.3);
  transform: scale(1.1);
}
.bylros-mic.active {
  background: #d63384;
  box-shadow: 0 0 6px rgba(214,51,132,0.5);
}

/* Messages */
.bylros-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}
@media (prefers-color-scheme: dark) {
  .bylros-messages { background: #262626; }
}

/* Chat Bubbles */
.bylros-bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 20px;
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 15px;
  animation: fadeIn .25s ease;
  word-break: break-word;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.bylros-bubble.user {
  background: var(--bylros-gradient);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  box-shadow: 0 3px 6px rgba(178,24,43,0.3);
}
.bylros-bubble.bot {
  background: #fff;
  color: var(--bylros-text);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}
@media (prefers-color-scheme: dark) {
  .bylros-bubble.bot { background: #333; color: #eee; }
}

/* Input Controls */
.bylros-controls {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e9ecef;
  background: #fff;
}
@media (prefers-color-scheme: dark) {
  .bylros-controls { background: #1e1e1e; border-color: #444; }
}
.bylros-input {
  flex: 1;
  resize: none;
  padding: 12px 16px;
  border: 1px solid #dee2e6;
  border-radius: 28px;
  font: inherit;
  min-height: 46px;
  transition: var(--bylros-transition);
}
.bylros-input:focus {
  border-color: var(--bylros-primary);
  box-shadow: 0 0 0 3px rgba(178,24,43,.25);
  outline: none;
}
.bylros-send {
  background: var(--bylros-gradient);
  color: #fff;
  border: none;
  border-radius: 28px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--bylros-transition);
}
.bylros-send:hover {
  transform: scale(1.05) translateY(-1px);
}
