:root {
  --main-color: #364050;
  --main-hover: #364050;
  --main-pressed: #2a3038;
  --main-light: rgba(54, 64, 80, 0.1);
  --main-light-hover: rgba(54, 64, 80, 0.15);
  --primary: var(--main-color);
  --primary-hover: var(--main-hover);
  --primary-pressed: var(--main-pressed);
  --primary-light: var(--main-light);
  --primary-light-hover: var(--main-light-hover);
  --sidebar-active-bg: #e2e2e2;
  --sidebar-hover-bg: #f3f4f6;
  --bg-primary: #ffffff;
  --bg-hover: #f9fafb;
  --bg-block: rgba(0, 0, 0, 0.04);
  --bg-block-hover: rgba(0, 0, 0, 0.06);
  --stroke-primary: #e5e7eb;
  --stroke-secondary: #d1d5db;
  --border-color: var(--stroke-primary);
  --text-primary: #111820;
  --text-secondary: #374151;
  --text-tertiary: #6b7280;
  --text-placeholder: #9ca3af;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --transition: 0.2s ease;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  --font-size-xs: 13px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  font-size: 16px;
  background: #ffffff;
  min-height: 100vh;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ========== 侧边栏 ========== */
.sidebar {
  width: 200px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  overflow: hidden;
  z-index: 10;
}
.sidebar.collapsed {
  width: 0;
}
.expand-btn {
  position: absolute;
  left: 8px;
  top: 12px;
  width: 20px;
  height: 20px;
  color: #6b7280;
  cursor: pointer;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 4px;
  padding: 2px;
}
.expand-btn.visible {
  display: flex;
}
.sidebar-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}
.sidebar-header .actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
}
.collapse-btn {
  width: 16px;
  height: 16px;
  color: #6b7280;
  cursor: pointer;
}
.function-btns-section {
  padding: 16px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.action-btn {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 3px;
  background: #ffffff;
  color: #374151;
  transition: background 0.2s;
  text-align: left;
}
.action-btn.active {
  background: var(--sidebar-active-bg);
  color: var(--main-color);
}
.action-btn:hover {
  background: var(--sidebar-hover-bg);
}
.chat-list-header {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  gap: 8px;
}
.chat-search {
  flex: 1;
}
.chat-search input {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  outline: none;
  font-size: 14px;
  color: #374151;
  background: #f9fafb;
}
.search-icon {
  width: 16px;
  height: 16px;
  color: #9ca3af;
  cursor: pointer;
  flex-shrink: 0;
}
.new-chat-btn {
  width: 16px;
  height: 16px;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  flex-shrink: 0;
  position: relative;
}
.new-chat-btn:hover {
  color: var(--main-color);
}
.new-chat-btn .new-chat-tooltip {
  position: fixed;
  background: var(--main-color);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  transition: all 0.2s ease;
  pointer-events: none;
  opacity: 0;
  z-index: 99999;
  transform: translateX(-50%) scale(0);
}
.new-chat-btn:hover .new-chat-tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
.chat-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
  margin: 0 8px;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  gap: 8px;
}
.chat-item:hover {
  background: var(--sidebar-hover-bg);
}
.chat-item.active {
  background: var(--sidebar-active-bg);
  color: var(--main-color);
}
.chat-item.active svg {
  stroke: var(--main-color);
}
.chat-item .star {
  color: #fbbf24;
}
.sidebar-footer {
  padding: 8px 0;
  border-top: 1px solid #e5e7eb;
}
.footer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #4b5563;
  cursor: pointer;
}
.footer-item:hover {
  background: #f3f4f6;
}

/* ========== 右侧主内容区 ========== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow-y: auto;
  padding: 40px 20px;
}

.main-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.main-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
}
.main-title {
  font-weight: 500;
  color: #111820;
  font-size: 16px;
}
