:root {
  --bg: #0b1120;
  --panel: #111827;
  --card: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #0ea5e9;
  --user-bg: #0284c7;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.gugu-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 780px;
  margin: 0 auto;
  background: var(--panel);
  border-inline: 1px solid var(--border);
}

.gugu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.92);
}

.gugu-brand { display: flex; align-items: center; gap: 10px; }
.gugu-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  font-size: 18px;
}
.gugu-title { font-weight: 600; font-size: 15px; }
.gugu-subtitle { font-size: 12px; color: var(--muted); }
.gugu-actions { display: flex; gap: 8px; }

.gugu-btn-primary, .gugu-btn-ghost {
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid transparent;
}
.gugu-btn-primary { background: var(--accent-2); color: #fff; font-weight: 600; }
.gugu-btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }

.gugu-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg { max-width: 86%; display: flex; flex-direction: column; gap: 6px; }
.msg.user { align-self: flex-end; }
.msg.assistant { align-self: flex-start; }

.bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.user .bubble { background: var(--user-bg); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant .bubble { background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 4px; }

.card-box {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-title { font-weight: 600; color: var(--accent); }
.card-item { padding: 8px; background: var(--card); border-radius: 8px; }
.card-qr { width: 132px; height: 132px; border-radius: 8px; background: #fff; padding: 4px; }

.gugu-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px 4px;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
}
.gugu-chip {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
}
.gugu-chip:hover { border-color: var(--accent); }

.gugu-composer {
  display: flex;
  gap: 8px;
  padding: 10px 16px 14px;
  background: var(--panel);
}
.gugu-composer textarea {
  flex: 1;
  resize: none;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.gugu-composer textarea:focus { border-color: var(--accent); }
.gugu-send {
  border: none;
  border-radius: 10px;
  background: var(--accent-2);
  color: #fff;
  font-weight: 600;
  padding: 0 18px;
  cursor: pointer;
}
.gugu-send:disabled { opacity: 0.5; cursor: not-allowed; }
