:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f9f9f9;
  --user-bubble: #f4f4f5; /* 更明显的浅灰色 */
  --text: #0d0d0d;
  --muted: #6e6e80;
  --line: #e5e5e5;
  --accent: #e5e7eb;
  --keyboard-inset: 0px;
}
:root[data-theme="dark"] {
  --bg: #212121;
  --panel: #212121;
  --panel-soft: #171717;
  --user-bubble: #2f2f2f; /* 明显的深灰色 */
  --text: #ececec;
  --muted: #b4b4be;
  --line: #3d3d3d;
  --accent: #3d3d3d;
}
* {
  box-sizing: border-box;
}
html {
  height: 100%;
  height: 100dvh;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
body {
  margin: 0;
  padding: 0;
  height: 100%;
  height: 100dvh; /* 使用动态视口高度，适配手机端地址栏 */
  width: 100%;
  font-family: "Segoe UI", "Noto Sans SC", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
a {
  color: inherit;
  text-decoration: none;
}
.topbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
  z-index: 20;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.sidebar-toggle:hover {
  background: var(--panel-soft);
}
.brand {
  font-weight: 600;
}
.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-link {
  color: var(--muted);
  font-size: 0.92rem;
}
.admin-link:hover {
  color: var(--text);
}
.theme-toggle {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 8px;
  height: 34px;
  width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lang-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-globe {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.2rem;
  transition: border-color 0.2s;
}
.lang-globe:hover {
  border-color: var(--muted);
}
.lang-list {
  position: absolute;
  top: 100%;
  right: 0;
  width: 120px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: none;
  flex-direction: column;
  padding: 0.4rem;
  gap: 0.2rem;
  z-index: 100;
  margin-top: 0;
  padding-top: 0.4rem;
  background-clip: padding-box;
}
.lang-list::before {
  content: "";
  position: absolute;
  top: -0.4rem;
  left: 0;
  right: 0;
  height: 0.4rem;
  background: transparent;
}
.lang-dropdown:hover .lang-list {
  display: flex;
}
.lang-item {
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
  color: var(--text);
}
.lang-item:hover {
  background: var(--panel-soft);
  color: var(--accent);
}
.theme-toggle:hover {
  border-color: var(--muted);
}
.app-container {
  display: flex;
  flex: 1;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}
.sidebar {
  width: 260px;
  background: var(--panel-soft);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, width 0.3s ease, margin-left 0.3s ease;
  flex-shrink: 0;
  height: 100%;
}
.sidebar.collapsed {
  display: none;
}
@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    left: 0;
    top: 56px;
    height: calc(100dvh - 56px);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .app-container {
    display: flex;
  }
}
.sidebar-section {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  overflow-y: auto;
}
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--keyboard-inset) + 8px);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  transition: all 0.2s;
}
.btn-ghost:hover {
  background: var(--panel-soft);
  border-color: var(--line);
}
.session-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.session-item {
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
}
.session-item:hover {
  background: var(--line);
}
.session-more-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.4rem;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
  outline: none;
}
.session-item:hover .session-more-btn {
  opacity: 1;
}
.session-more-btn:hover {
  color: var(--text);
  background: transparent;
}
.session-title-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.session-edit-input {
  flex: 1;
  background: var(--panel-soft);
  border: 1px solid var(--accent);
  color: var(--text);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  font-size: 0.9rem;
  outline: none;
}
.session-menu {
  position: absolute;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 1000;
  width: 140px;
  max-height: 160px;
  overflow-y: auto;
  animation: menuFadeIn 0.1s ease-out;
  margin-top: 4px;
  margin-left: -130px; 
}
@keyframes menuFadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
.menu-item {
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text);
}
.menu-item:hover {
  background: var(--panel-soft);
}
.menu-item.delete {
  color: #ef4444;
  border-top: 1px solid var(--line);
}
.menu-item.delete:hover {
  background: rgba(239, 68, 68, 0.1);
}
.session-item.active {
  background: var(--accent);
  color: var(--text);
}
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
  min-width: 0;
  overflow: hidden;
  height: 100%;
}
.btn-primary {
  background: var(--accent);
  color: var(--text);
  font-weight: 600;
  border: none;
}
.btn-small {
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
}
.sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.top-announcement {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  z-index: 19;
}
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  z-index: 10000;
  transition: opacity 0.3s, transform 0.3s;
}
.toast-notification.fade-out {
  opacity: 0;
  transform: translate(-50%, 20px);
}
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 0.9rem;
}
.chat-shell {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  background: var(--bg);
}
.chat-shell .panel {
  width: 100%;
  max-width: 800px;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0 auto;
}
.chat-shell h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.chat-shell h3 {
  margin-top: 2rem;
  border-left: 4px solid var(--accent);
  padding-left: 0.8rem;
}
.chat-shell p {
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1rem;
}
label {
  color: var(--muted);
  font-size: 0.9rem;
  display: grid;
  gap: 0.3rem;
}
input,
textarea,
select,
button {
  font: inherit;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 8px;
  padding: 0.55rem 0.62rem;
}
button {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 8px;
  padding: 0.5rem 0.78rem;
  cursor: pointer;
}
button:hover {
  border-color: var(--muted);
}
.chat-panel {
  min-height: 68vh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.8rem;
}
.messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem 1rem 2rem 1rem;
  width: 100%;
  z-index: 1;
  min-height: 0;
  position: relative;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.msg {
  border: none;
  padding: 0 0 1rem 0;
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
}
.msg.user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: transparent;
  width: 100%;
  margin-bottom: 1.5rem;
}
/* 用户消息 - 气泡样式（应用在 msg-content div 上） */
.msg.user .msg-content {
  background: var(--user-bubble);
  color: var(--text);
  border-radius: 18px;
  border-bottom-right-radius: 4px;
  padding: 0.4rem 1rem;
  max-width: 70%;
  align-self: flex-end;
  line-height: 1.6;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  margin: 0;
}
/* 用户消息的附件预览也右对齐，保持在气泡范围内 */
.msg.user .attachment-preview {
  max-width: 70%;
  justify-content: flex-end;
}
/* 用户消息的头部（编辑按钮等）也右对齐 */
.msg.user .msg-head {
  align-self: flex-end;
}
/* 保留 pre 样式以兼容历史渲染 */
.msg.user pre {
  background: var(--user-bubble);
  color: var(--text);
  border-radius: 18px;
  padding: 0.8rem 1.2rem;
  max-width: 70%;
  border-bottom-right-radius: 4px;
  line-height: 1.6;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  margin: 0;
}
.msg.assistant {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: transparent;
  width: 100%;
  margin-bottom: 1.5rem;
}
.msg.assistant pre {
  background: transparent;
  color: var(--text);
  border-radius: 0;
  padding: 0;
  max-width: 100%;
  line-height: 1.8;
  font-size: 1rem;
  box-shadow: none;
  margin: 0;
}
.msg.system {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 1rem 0;
}
.msg .role {
  display: inline-block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
}
.msg pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
}
/* Markdown 增强样式 */
.msg-content {
  line-height: 1.7;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  /* 确保长连续字符在所有浏览器中均能正确换行 */
}
.msg-content p:last-child {
  margin-bottom: 0 !important;
}
.msg-content h1, .msg-content h2, .msg-content h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.3;
}
.msg-content h1:not(:first-child),
.msg-content h2:not(:first-child),
.msg-content h3:not(:first-child) {
  margin-top: 1rem;
}
.msg-content h1 { font-size: 1.5rem; }
.msg-content h2 { font-size: 1.3rem; }
.msg-content h3 { font-size: 1.1rem; }
.msg-content p {
  margin-top: 0 !important;
  margin-bottom: 0.8rem;
}
.msg-content p:first-child {
  margin-top: 0 !important;
}

.continue-btn {
  display: block;
  margin: 0.8rem 0 0 0;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  color: var(--text);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  width: fit-content;
  align-self: flex-start;
}

.continue-btn:hover {
  background: var(--accent);
  border-color: var(--muted);
}
.msg-content ul, .msg-content ol {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
}
.msg-content li {
  margin-bottom: 0.3rem;
}
.msg-content blockquote {
  margin: 0 0 0.8rem 0;
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  font-style: italic;
}
.msg-content code {
  background: var(--panel-soft);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
}
.msg-content pre code {
  display: block;
  padding: 1rem;
  overflow-x: auto;
  max-width: 100%;
  background: var(--panel-soft);
  border-radius: 8px;
  border: 1px solid var(--line);
  /* 防止长代码行撑破容器 */
  box-sizing: border-box;
}
.msg-content table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
}
.msg-content th, .msg-content td {
  border: 1px solid var(--line);
  padding: 0.5rem;
  text-align: left;
}
.msg-content th {
  background: var(--panel-soft);
  font-weight: 600;
}
.msg-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 0.5rem 0;
}
.reasoning-details {
  margin-bottom: 1rem;
  border-left: 2px solid var(--line);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
}
.reasoning-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.reasoning-summary::before {
  content: '▼';
  font-size: 0.7rem;
  transition: transform 0.2s;
}
details[open] .reasoning-summary::before {
  transform: rotate(180deg);
}
.composer {
  width: 100%;
  padding: 0;
  background: var(--bg);
  /* 使用 padding 避让键盘，避免使用 margin 导致布局跳变 */
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--keyboard-inset));
  z-index: 10;
  box-sizing: border-box;
  border-top: none;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.02);
  flex-shrink: 0;
}
.input-container {
  width: auto;
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1rem;
  box-sizing: border-box;
  min-width: 0;
}
.input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-input);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-wrapper:focus-within {
  border-color: var(--line);
}
.input-wrapper textarea {
  flex: 1;
  width: auto;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  padding: 0.4rem 0 !important;
  resize: none;
  max-height: 200px;
  min-height: 24px;
  outline: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  appearance: none;
}
.file-upload-btn {
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
}
.file-upload-btn:hover {
  color: var(--text);
}
.web-search-btn {
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
}
.web-search-btn:hover {
  color: var(--text);
  background: var(--panel-soft);
}
.web-search-btn.active {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}
#sendButton {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--text);
  border: none;
  font-size: 1.1rem;
}
.attachment-preview {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.attachment-chip {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}
.attachment-thumb {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.attachment-name {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attachment-chip:hover {
  border-color: var(--muted);
}
.attachment-chip .remove-btn {
  cursor: pointer;
  color: var(--muted);
  font-weight: bold;
  font-size: 1rem;
  line-height: 1;
}
.attachment-chip .remove-btn:hover {
  color: #ef4444;
}
.composer textarea {
  min-height: 60px;
  max-height: 240px;
  overflow-y: auto;
}
.composer textarea::-webkit-scrollbar {
  width: 4px;
}
.composer textarea::-webkit-scrollbar-track {
  background: transparent;
}
.composer textarea::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 10px;
}
.msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

/* 加载指示器样式 */
.loading-indicator {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 1rem 0;
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
}

.loading-spinner-container {
  width: 24px;
  height: 24px;
  position: relative;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top: 2px solid var(--text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.msg-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.msg-edit-btn {
  font-size: 0.74rem;
  padding: 0.2rem 0.45rem;
}
.hidden {
  display: none !important;
}
.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  backdrop-filter: blur(4px);
  animation: modalFadeIn 0.2s ease-out;
}
.image-preview-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  cursor: default;
  animation: imgZoomIn 0.2s ease-out;
}
.close-preview {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10001;
  transition: color 0.2s;
}
.close-preview:hover {
  color: #ccc;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes imgZoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.sys-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(6, 8, 14, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.sys-card {
  width: min(580px, 100%);
  border-radius: 14px;
  border: 1px solid #ef4444;
  background: var(--panel);
  color: var(--text);
  padding: 1rem;
  display: grid;
  gap: 0.6rem;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}
.sys-title {
  margin: 0;
  font-size: 1.1rem;
}
.sys-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.verify-gate {
  position: fixed;
  inset: 0;
  z-index: 1900;
  background: rgba(8, 12, 22, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.verify-card {
  width: min(560px, 100%);
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 1rem;
  display: grid;
  gap: 0.65rem;
}
.verify-title {
  margin: 0;
  font-size: 1.08rem;
}
.verify-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.turnstile-container {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.muted {
  color: var(--muted);
  font-size: 0.85rem;
}
:root[data-theme="dark"] .status-on {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.3);
}
:root[data-theme="dark"] .status-off {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.3);
}
.composer-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.footer-link {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
}

.footer-link:hover {
  color: var(--text);
  opacity: 1;
}

.footer-sep {
  color: var(--muted);
  font-size: 0.75rem;
}

/* 联网搜索来源样式 */
.search-sources {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.search-sources span {
  font-weight: 600;
  color: var(--muted);
  margin-right: 0.3rem;
}
.search-sources a {
  font-size: 0.75rem;
  color: #3b82f6;
  text-decoration: none;
  background: rgba(59, 130, 246, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.search-sources a:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}