
:root {
  --bhu1u-brand: #7c3aed;
  --bhu1u-bg: #09090f;
  --bhu1u-panel: rgba(255,255,255,0.06);
  --bhu1u-panel-2: rgba(255,255,255,0.08);
  --bhu1u-border: rgba(255,255,255,0.12);
  --bhu1u-text: #ffffff;
  --bhu1u-soft: rgba(255,255,255,0.72);
  --bhu1u-muted: rgba(255,255,255,0.55);
  --bhu1u-shadow: 0 25px 70px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.bhu1u-multi-ai-body {
  min-height: 100vh;
  color: var(--bhu1u-text);
  background:
    radial-gradient(circle at top, rgba(124,58,237,0.28), transparent 34%),
    radial-gradient(circle at right, rgba(59,130,246,0.16), transparent 26%),
    linear-gradient(180deg, #120d22 0%, #09090f 100%);
}
h1,h2,h3,h4,h5,h6,p,div,span,label,a,li,small,strong,em { color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.bhu1u-site-header,
.bhu1u-site-footer {
  background: linear-gradient(180deg, #09090b 0%, #111827 100%);
  color: #fff;
}
.bhu1u-site-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
}
.bhu1u-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bhu1u-brand a { font-weight: 700; }
.bhu1u-menu ul { display: flex; list-style: none; gap: 14px; margin: 0; padding: 0; }

.bhu1u-content-card {
  background: #101828;
  color: #fff;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 24px;
  box-shadow: var(--bhu1u-shadow);
}

.bhu1u-app {
  min-height: 100vh;
  padding: 16px;
}
.bhu1u-grid {
  display: grid;
  grid-template-columns: 320px minmax(0,1fr);
  gap: 16px;
  max-width: 1700px;
  margin: 0 auto;
  min-height: calc(100vh - 32px);
}
.bhu1u-card {
  border: 1px solid var(--bhu1u-border);
  background: var(--bhu1u-panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--bhu1u-shadow);
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  min-height: 0;
}
.bhu1u-card-header {
  padding: 20px;
  border-bottom: 1px solid var(--bhu1u-border);
}
.bhu1u-card-body {
  padding: 16px;
}
.bhu1u-logo-row,
.bhu1u-chat-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.bhu1u-logo-box,
.bhu1u-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 22px;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--bhu1u-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.bhu1u-brand-title,
.bhu1u-title,
.bhu1u-subtitle,
.bhu1u-bot-name,
.bhu1u-bot-tag,
.bhu1u-stat,
.bhu1u-chip,
.bhu1u-category-title,
.bhu1u-sidebar-footer,
.bhu1u-settings-title,
.bhu1u-settings-subtitle,
.bhu1u-label,
.bhu1u-help,
.bhu1u-chat-title,
.bhu1u-chat-note,
.bhu1u-empty,
.bhu1u-history-title,
.bhu1u-history-meta { color: #fff !important; }

.bhu1u-subtitle,
.bhu1u-help,
.bhu1u-chat-note,
.bhu1u-bot-tag,
.bhu1u-history-meta { color: var(--bhu1u-muted) !important; }

.bhu1u-search-wrap,
.bhu1u-input-wrap {
  position: relative;
}
.bhu1u-search,
.bhu1u-textarea,
.bhu1u-input,
.bhu1u-select {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--bhu1u-border);
  background: rgba(0,0,0,0.22);
  color: #fff;
  outline: none;
  padding: 12px 14px;
}
.bhu1u-search { padding-left: 40px; }
.bhu1u-search::placeholder,
.bhu1u-textarea::placeholder,
.bhu1u-input::placeholder { color: rgba(255,255,255,0.38); }
.bhu1u-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.65;
}
.bhu1u-statbar,
.bhu1u-prompt-badges,
.bhu1u-setting-box,
.bhu1u-mini-panel {
  border: 1px solid var(--bhu1u-border);
  background: rgba(0,0,0,0.18);
  border-radius: 20px;
}
.bhu1u-statbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: #fff;
}
.bhu1u-badge,
.bhu1u-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  padding: 8px 12px;
  font-size: 13px;
  color: #fff !important;
}
.bhu1u-list-scroll,
.bhu1u-chat-scroll,
.bhu1u-settings-scroll,
.bhu1u-history-scroll {
  overflow: auto;
}
.bhu1u-list-scroll { flex: 1 1 auto; min-height: 240px; max-height: calc(100vh - 420px); padding-right: 8px; overflow: auto; }
.bhu1u-chat-scroll { height: calc(100vh - 360px); padding: 20px; }
.bhu1u-settings-scroll { height: calc(100vh - 140px); padding: 16px; }
.bhu1u-history-scroll { max-height: 220px; padding-right: 6px; overflow: auto; }

.bhu1u-category {
  margin-bottom: 20px;
}
.bhu1u-category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}
.bhu1u-bot-card {
  width: 100%;
  border: 1px solid var(--bhu1u-border);
  background: rgba(255,255,255,0.04);
  color: #fff;
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 10px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}
.bhu1u-bot-card:hover,
.bhu1u-bot-card.is-active {
  background: rgba(255,255,255,0.1);
  transform: translateY(-1px);
}
.bhu1u-bot-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.bhu1u-bot-icon {
  width: 38px;
  height: 38px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--bhu1u-border);
  flex-shrink: 0;
}
.bhu1u-bot-meta { min-width: 0; flex: 1; }
.bhu1u-bot-name { font-weight: 700; }
.bhu1u-bot-tag { font-size: 14px; margin-top: 4px; line-height: 1.45; }

.bhu1u-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  min-height: 80vh;
}
.bhu1u-main-top {
  padding: 20px;
}
.bhu1u-main-actions,
.bhu1u-compose-actions,
.bhu1u-row,
.bhu1u-settings-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.bhu1u-btn {
  border: 1px solid var(--bhu1u-border);
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 18px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
}
.bhu1u-btn:hover { background: rgba(255,255,255,0.14); }
.bhu1u-btn-primary {
  background: var(--bhu1u-brand);
  border-color: transparent;
}
.bhu1u-btn-primary:hover { filter: brightness(1.06); }
.bhu1u-btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bhu1u-chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--bhu1u-border);
}
.bhu1u-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bhu1u-message-row {
  display: flex;
}
.bhu1u-message-row.is-user { justify-content: flex-end; }
.bhu1u-message-row.is-assistant { justify-content: flex-start; }
.bhu1u-bubble {
  max-width: 85%;
  border-radius: 26px;
  border: 1px solid var(--bhu1u-border);
  padding: 14px 16px;
  line-height: 1.7;
  color: #fff;
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}
.bhu1u-bubble-user { background: rgba(255,255,255,0.12); }
.bhu1u-bubble-assistant { background: rgba(0,0,0,0.22); }
.bhu1u-compose {
  padding: 16px;
}
.bhu1u-textarea {
  min-height: 120px;
  resize: vertical;
}
.bhu1u-settings.collapsed { width: 88px; }
.bhu1u-settings.collapsed .bhu1u-settings-scroll,
.bhu1u-settings.collapsed .bhu1u-settings-heading,
.bhu1u-settings.collapsed .bhu1u-setting-content {
  display: none;
}
.bhu1u-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--bhu1u-border);
}
.bhu1u-settings-section {
  margin-bottom: 18px;
  border: 1px solid var(--bhu1u-border);
  background: rgba(0,0,0,0.18);
  border-radius: 22px;
  padding: 16px;
}
.bhu1u-settings-section h4 {
  margin: 0 0 12px;
  color: #fff;
}
.bhu1u-setting-field {
  margin-bottom: 12px;
}
.bhu1u-setting-field:last-child { margin-bottom: 0; }
.bhu1u-setting-field label {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 14px;
}
.bhu1u-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.bhu1u-history-item {
  border: 1px solid var(--bhu1u-border);
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.bhu1u-history-item:hover,
.bhu1u-history-item.is-active { background: rgba(255,255,255,0.1); }
.bhu1u-history-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.bhu1u-history-actions button {
  border: 1px solid var(--bhu1u-border);
  background: transparent;
  color: #fff;
  border-radius: 12px;
  padding: 6px 8px;
  cursor: pointer;
}
.bhu1u-toggle {
  accent-color: var(--bhu1u-brand);
}
.bhu1u-sidebar-footer {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--bhu1u-muted);
}
.bhu1u-hidden {
  display: none !important;
}
.bhu1u-upload-name {
  margin-top: 8px;
  font-size: 13px;
  color: var(--bhu1u-muted);
}
.bhu1u-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bhu1u-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
}
.bhu1u-settings-note {
  font-size: 13px;
  color: var(--bhu1u-muted);
  line-height: 1.6;
}
.bhu1u-color-input {
  width: 56px;
  min-width: 56px;
  padding: 6px;
  height: 42px;
}
.bhu1u-color-row {
  display: flex;
  gap: 10px;
}
.bhu1u-app[data-theme="light"] {
  background: #e5e7eb;
  color: #fff;
}
.bhu1u-app[data-theme="light"] .bhu1u-card {
  background: #101828;
}
@media (max-width: 1200px) {
  .bhu1u-grid {
    grid-template-columns: 1fr;
  }
  .bhu1u-list-scroll,
  .bhu1u-chat-scroll,
  .bhu1u-settings-scroll {
    height: auto;
    max-height: none;
  }
  .bhu1u-settings.collapsed {
    width: auto;
  }
}


.bhu1u-grid > aside.bhu1u-card { display:flex; flex-direction:column; min-height:calc(100vh - 32px); }
.bhu1u-grid > aside.bhu1u-card .bhu1u-card-body { display:flex; flex-direction:column; min-height:0; flex:1 1 auto; }
.bhu1u-sidebar-history { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bhu1u-border); }
.bhu1u-main { min-height: calc(100vh - 32px); }
.bhu1u-chat-scroll { height: calc(100vh - 300px); padding: 20px; overflow:auto; }
.bhu1u-compose { padding: 12px 16px; }
.bhu1u-textarea { min-height: 84px; max-height: 180px; resize: vertical; }
