:root {
  --brand: #3d6bff;
  --brand-deep: #2e56e6;
  --sidebar-w: 280px;
  --sidebar-bg: #f7f8fa;
  --sidebar-line: rgba(15, 23, 42, 0.055);
  --sidebar-text: #3c4048;
  --sidebar-hover: rgba(15, 23, 42, 0.045);
  --sidebar-active: #ffffff;
  --sidebar-active-text: #111318;
  --main-bg: #ffffff;
  --chat-width: 860px;
  --composer-width: 984px;
  --composer-radius: 20px;
  --composer-border: #e4e6eb;
  --composer-shadow: 0 6px 26px rgba(61, 107, 255, 0.07);
  --composer-focus-shadow: 0 0 0 4px rgba(61, 107, 255, 0.07);
  --user-bubble: #f2f3f5;
  --user-text: #17191d;
  --send-bg: #111318;
  --send-color: #ffffff;
  --avatar-bg: #eaf0ff;
  --top-link: #555a63;
  --hrx-link: #3d6bff;
  --hrx-hover: rgba(61, 107, 255, 0.07);
  --icon-color: #4d525b;
  --tool-color: #3c4048;
  --placeholder: #b4b7bd;
  --assistant-avatar-size: 30px;
}

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

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

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

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

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

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

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: none;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sidebar-collapse {
  width: 30px;
  height: 30px;
  color: #6e737c;
}

.mode-switch { display: none; }
.side-nav { padding: 2px 10px; gap: 1px; }

.side-item {
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 8px;
  color: #3c4048;
  font-size: 14px;
}

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

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

.side-item .side-extra { font-size: 11px; }

.side-item .side-arrow {
  margin-left: auto;
  font-size: 14px;
  color: #b0b3b9;
}

.side-label {
  padding: 18px 20px 6px;
  color: #999da5;
  font-size: 12px;
}

.history-item { border-radius: 8px; }

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

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

.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.055);
  background: #ffffff;
}

.topbar-left { gap: 6px; }

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

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

.model-pill .icon { font-size: 13px; color: #8c9098; }

.topbar-toggle {
  width: 32px;
  height: 32px;
  color: #4b4f57;
}

.topbar-toggle .icon { font-size: 18px; }

.topbar-right { gap: 8px; }

.hrx-link {
  color: #3d6bff;
  font-weight: 500;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid #e3e5ea;
  border-radius: 9px;
  background: #ffffff;
  color: #22252b;
  font-size: 13.5px;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.download-btn:hover { background: #f7f8fa; border-color: #d8dbe1; }

.download-glyph {
  display: grid;
  grid-template-columns: repeat(2, 4px);
  grid-template-rows: repeat(2, 4px);
  gap: 2px;
  width: 10px;
  height: 10px;
}

.download-glyph i { display: block; border-radius: 1px; }
.download-glyph i:nth-child(1) { background: #ff6a5e; }
.download-glyph i:nth-child(2) { background: #ffbf3f; }
.download-glyph i:nth-child(3) { background: #42d3a5; }
.download-glyph i:nth-child(4) { background: #4a86ff; }

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

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

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

.welcome {
  flex: 1 0 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0 16px 14px;
}

.welcome .welcome-title {
  margin: clamp(100px, 28.6vh, 256px) 0 20px;
  color: #0d0d0d;
  font-size: clamp(24px, 2.16vw, 28px);
  line-height: 1.43;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
}

.mode-tabs {
  display: flex;
  align-items: stretch;
  width: 326px;
  max-width: 100%;
  height: 54px;
  padding: 3px;
  border-radius: 999px;
  background: #f2f2f3;
}

.mode-tab {
  flex: 1;
  border-radius: 999px;
  color: rgba(0, 0, 0, 0.5);
  font-size: 16px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

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

.recommend-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: min(984px, 100%);
  margin-top: auto;
}

.recommend-block h2 {
  margin: 0 0 2px;
  padding-left: 4px;
  color: rgba(0, 0, 0, 0.35);
  font-size: 12px;
  line-height: 18px;
  font-weight: 400;
}

.recommend-pill {
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 12px;
  background: #ffffff;
  color: #111318;
  font-size: 14px;
  line-height: 22px;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.recommend-pill:hover { background: #f7f8fa; border-color: rgba(15, 23, 42, 0.1); }

.composer-bottom-slot {
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 4px 8px 13px;
}

.doubao-composer {
  border-radius: 20px;
  border-color: #e4e6eb;
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(61, 107, 255, 0.035),
    0 7px 28px rgba(61, 107, 255, 0.065);
  padding: 12px 14px 9px;
}

.doubao-composer:focus-within {
  border-color: #c7d6ff;
  box-shadow:
    0 0 0 4px rgba(61, 107, 255, 0.065),
    0 7px 28px rgba(61, 107, 255, 0.05);
}

.doubao-composer textarea {
  min-height: 24px;
  padding: 0 2px;
  font-size: 16px;
  line-height: 24px;
}

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

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

.round-btn {
  border-radius: 50%;
  color: #4b4f57;
}

.tool-sep {
  flex: none;
  width: 1px;
  height: 16px;
  margin: 0 5px;
  background: #e7e8ec;
}

.tool-chip {
  height: 32px;
  padding: 0 7px;
  border-radius: 8px;
  color: #3c4048;
  font-size: 13px;
  gap: 5px;
}

.tool-chip .icon { font-size: 15px; color: #4d525b; }

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

.composer-tools-right { gap: 4px; }

.speed-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 30px;
  padding: 0 7px;
  border-radius: 8px;
  color: #3c4048;
  font-size: 13px;
}

.speed-chip .icon { font-size: 12px; color: #8c9098; }

.speed-chip:hover { background: #f3f4f6; }

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

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

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

.send-btn:not(:disabled):hover { background: #2b2e34; }

.stop-btn { background: #111318; }

.ai-note {
  margin: 0;
  color: #b0b3b9;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.messages { padding-top: 28px; padding-bottom: 26px; }

.message.assistant { gap: 11px; }

.assistant-avatar {
  background: #eaf0ff;
  color: #111318;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}

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

.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: #3d6bff; }

.assistant-content blockquote { border-left-color: #3d6bff; }

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

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

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

.typing-indicator i { background: #3d6bff; }

@media (min-width: 861px) {
  body.sidebar-collapsed .sidebar {
    width: 0;
    flex-basis: 0;
    border-right: 0;
    overflow: hidden;
  }
  body.sidebar-collapsed .brand,
  body.sidebar-collapsed .side-nav,
  body.sidebar-collapsed .side-label,
  body.sidebar-collapsed .history-block,
  body.sidebar-collapsed .sidebar-footer {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 860px) {
  .welcome { padding: 0 16px 12px; }
  .welcome .welcome-title { margin-top: 66px; margin-bottom: 18px; font-size: 25px; }
  .mode-tabs { width: 282px; height: 46px; }
  .recommend-block { margin-top: 34px; }
  .recommend-pill { font-size: 13px; min-height: 40px; }
  .composer-bottom-slot { padding: 4px 10px 12px; }
  .doubao-composer { padding: 12px 13px 9px; }
  .download-btn { display: none; }
  .login-btn { height: 32px; padding: 0 13px; }
}

@media (max-width: 520px) {
  .hrx-link { padding: 6px 4px; font-size: 12px; }
  .login-btn { display: none; }
  .welcome .welcome-title { margin-top: 48px; font-size: 23px; }
  .recommend-block { margin-top: 26px; }
  .recommend-pill { font-size: 12.5px; }
  .tool-chip { font-size: 12px; padding: 0 6px; }
  .tool-chip .icon { font-size: 14px; }
  .speed-chip { display: none; }
  .doubao-composer { --composer-radius: 18px; }
}
