:root {
  --brand: #1f5eff;
  --brand-deep: #1248df;
  --sidebar-w: 256px;
  --sidebar-bg: #f7f7f9;
  --sidebar-line: rgba(15, 23, 42, 0.055);
  --sidebar-text: #3f424a;
  --sidebar-hover: rgba(15, 23, 42, 0.05);
  --sidebar-active: #ffffff;
  --sidebar-active-text: #111318;
  --main-bg: #ffffff;
  --chat-width: 860px;
  --composer-width: 760px;
  --composer-radius: 28px;
  --composer-border: #e2e2e2;
  --composer-shadow: none;
  --composer-focus-shadow: 0 0 0 4px rgba(31, 94, 255, 0.08);
  --user-bubble: #f2f3f5;
  --user-text: #16181d;
  --send-bg: #1f5eff;
  --send-color: #ffffff;
  --avatar-bg: #f4f6fa;
  --top-link: #555a63;
  --hrx-link: #1f5eff;
  --hrx-hover: rgba(31, 94, 255, 0.07);
  --icon-color: #555a62;
  --tool-color: #3f434b;
  --placeholder: #b3b6bd;
  --assistant-avatar-size: 30px;
}

body {
  background: #ffffff;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #111318;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(31, 94, 255, 0.45);
  outline-offset: 2px;
}

.composer textarea:focus-visible { outline: none; }

.sidebar {
  background: var(--sidebar-bg);
}

.sidebar-top {
  padding: 18px 16px 8px;
}

.brand {
  color: #111318;
  font-size: 19px;
  font-weight: 600;
  gap: 8px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.brand-mark img,
.heading-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.sidebar-collapse {
  width: 28px;
  height: 28px;
  color: #70747c;
}

.sidebar-collapse .icon { font-size: 17px; }

.mode-switch {
  display: flex;
  align-items: stretch;
  height: 36px;
  margin: 4px 16px 14px;
  padding: 3px;
  border-radius: 10px;
  background: #ededf0;
}

.mode-option {
  position: relative;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
  color: #666a72;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mode-option.active {
  background: #ffffff;
  color: #111318;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
}

.mode-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #1f5eff;
}

.side-nav {
  padding: 2px 10px;
  gap: 1px;
}

.side-nav-tight { padding-top: 0; }

.side-item {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 9px;
  color: #3f424a;
  font-size: 14px;
}

.side-item .icon { font-size: 16px; }

.side-item:hover { background: rgba(15, 23, 42, 0.05); }

.side-item.active { background: #ffffff; }

.side-label {
  padding: 16px 20px 6px;
  color: #9a9ea7;
  font-size: 12px;
}

.history-item {
  border-radius: 9px;
  color: #3f424a;
}

.history-item.active {
  background: #ffffff;
  color: #111318;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.sidebar-footer {
  padding: 8px 12px 12px;
  border-top: 1px solid var(--sidebar-line);
  gap: 2px;
}

.sidebar-footer .side-item {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12.5px;
}

.main { background: #ffffff; }

.topbar {
  min-height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.045);
  background: #ffffff;
}

.model-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 9px 0 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #111318;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.model-pill:hover { background: #f4f5f7; }

.model-pill .icon { font-size: 14px; color: #83868d; }

.model-pill .icon:first-child { color: #3f434b; }

.topbar-right { gap: 4px; }

.top-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 9px;
  border-radius: 9px;
  color: #4b4f57;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.top-action .icon { font-size: 15px; }

.top-action:hover { background: #f4f5f7; color: #111318; }

.login-btn {
  height: 36px;
  padding: 0 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: #111318;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.login-btn:hover { background: #2b2e34; }

.hrx-link {
  color: #1f5eff;
  font-weight: 500;
}

.chat-scroll {
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.welcome {
  position: relative;
  flex: 1 0 auto;
  justify-content: flex-start;
  gap: 45px;
  padding: clamp(120px, 27.3vh, 244px) 24px 30px;
}

.welcome-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.heading-logo {
  width: 31px;
  height: 31px;
  flex: none;
}

.welcome h1 {
  margin: 0;
  color: #0d0d0d;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.composer-hero-slot { width: 100%; }

.qwen-composer {
  background: #ffffff;
  border-radius: 28px;
  border-color: #e2e2e2;
  box-shadow: none;
}

.qwen-composer:focus-within {
  border-color: #c8d5ff;
  box-shadow: 0 0 0 4px rgba(31, 94, 255, 0.06);
}

.qwen-composer textarea {
  min-height: 50px;
  padding: 0 8px;
  font-size: 16px;
  line-height: 26px;
}

.composer-tools {
  margin-top: 0;
  gap: 8px;
}

.composer-tools-left { gap: 2px; }

.tool-sep {
  flex: none;
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: #ebecef;
}

.tool-chip {
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  color: #3f434b;
  font-size: 14px;
  gap: 6px;
}

.tool-chip .icon { font-size: 16px; color: #555a63; }

.tool-chip .chevron { font-size: 12px; margin-left: -1px; color: #8e9198; }

.tool-chip:hover { background: #f4f5f7; color: #111318; }

.chip-badge {
  padding: 1px 4px;
  border-radius: 4px;
  background: #eef3ff;
  color: #1f5eff;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.4;
}

.icon-btn { color: #555a62; }

.icon-btn:hover { background: #f4f5f7; color: #111318; }

.send-btn {
  width: 34px;
  height: 34px;
  box-shadow: none;
}

.send-btn .icon { font-size: 17px; }

.send-btn:disabled {
  background: #e6e7e9;
  color: #ffffff;
  opacity: 1;
}

.send-btn:not(:disabled):hover { background: #1248df; }

.stop-btn { background: #111318; }

.promo-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  width: min(630px, 100%);
  margin-top: 58px;
  padding: 11px 13px;
  border: 1px solid rgba(15, 23, 42, 0.045);
  border-radius: 16px;
  background: linear-gradient(100deg, #f6f7f9, #fbfbfc 62%, #f4f6fa);
  text-align: left;
}

.promo-art {
  position: relative;
  flex: none;
  width: 86px;
  height: 50px;
  border-radius: 9px;
  background: linear-gradient(145deg, #eaf0ff, #f4f7ff);
  overflow: hidden;
}

.promo-art span {
  position: absolute;
  display: block;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(31, 94, 255, 0.13);
}

.promo-art span:nth-child(1) {
  left: 10px;
  top: 10px;
  width: 36px;
  height: 30px;
  border: 1px solid #dbe5ff;
}

.promo-art span:nth-child(2) {
  left: 27px;
  top: 16px;
  width: 44px;
  height: 8px;
  background: #cfdcff;
}

.promo-art span:nth-child(3) {
  left: 27px;
  top: 29px;
  width: 31px;
  height: 5px;
  background: #e2e9fb;
}

.promo-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.promo-copy strong {
  color: #2c3037;
  font-size: 14px;
  font-weight: 600;
}

.promo-copy span {
  color: #989ca4;
  font-size: 12px;
  line-height: 1.5;
}

.promo-btn {
  flex: none;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: #111318;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.promo-btn:hover { background: #2b2e34; }

.welcome .legal-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  margin: 0;
  color: #b6b9bf;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.legal-link {
  padding: 0;
  border: 0;
  background: none;
  color: #1f5eff;
  font: inherit;
  cursor: pointer;
}

.legal-link:hover { text-decoration: underline; }

.composer-bottom-slot { padding-top: 6px; }

.messages { padding-top: 30px; padding-bottom: 30px; }

.message.assistant { gap: 11px; }

.assistant-avatar {
  background: #f4f6fa;
  color: #111318;
  box-shadow: none;
  padding: 3px;
}

.assistant-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 0;
}

.assistant-head {
  color: #23262c;
  font-weight: 600;
}

.model-chip {
  background: #f2f3f5;
  color: #878b93;
}

.assistant-content {
  color: #23262c;
  font-size: 15px;
  line-height: 1.78;
}

.assistant-content a { color: #1f5eff; }

.assistant-content blockquote { border-left-color: #1f5eff; }

.message.user .bubble {
  background: #f2f3f5;
  color: #16181d;
  border-radius: 16px 16px 5px 16px;
}

.assistant-actions button:hover,
.user-actions button:hover {
  background: #f2f3f5;
  color: #111318;
}

.message-error {
  background: #fff2f3;
  color: #c33a4a;
}

.typing-indicator i { background: #1f5eff; }

@media (max-width: 1080px) {
  .top-action-wide { display: none; }
}

@media (max-width: 860px) {
  .sidebar { width: 268px; flex-basis: 268px; }
  .welcome { padding: 30px 16px 26px; gap: 22px; }
  .welcome h1 { font-size: 25px; }
  .heading-logo { width: 28px; height: 28px; }
  .promo-banner { display: none; }
  .legal-note { display: none; }
  .topbar { background: #ffffff; }
  .top-action { display: none; }
  .login-btn { height: 32px; padding: 0 14px; }
  .composer-bottom-slot { padding-top: 4px; }
  .messages { padding-top: 22px; }
}

@media (max-width: 520px) {
  .hrx-link { padding: 6px 4px; font-size: 12px; }
  .login-btn { display: none; }
  .model-pill { font-size: 14px; }
  .qwen-composer { --composer-radius: 18px; }
  .tool-chip { font-size: 12.5px; }
  .composer-tools-left { gap: 0; }
  .tool-sep { margin: 0 2px; }
}
