/* 职责：页面专属样式——首页/认证/聊天/模型/密钥/统计/日志/反馈/设置/文档/QQ群/赞助/协议/模型状态/浮动按钮 */

/* ===== 浮动QQ按钮 ===== */
.floating-qq-btn {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 1500;
  background: linear-gradient(135deg, #12b7f5, #0d96d6);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(18, 183, 245, 0.4);
  transition: transform 0.25s ease;
  animation: float-pulse 2.5s ease-in-out infinite;
}

.floating-qq-btn:hover { transform: scale(1.15); filter: brightness(1.05); }

/* ===== 首页 ===== */
.home-page { min-height: calc(100vh - var(--header-height)); }

.hero { position: relative; padding: 80px var(--space-6) 100px; text-align: center; overflow: hidden; }

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(0,212,255,0.15), transparent 70%),
              radial-gradient(ellipse at bottom right, rgba(68,138,255,0.1), transparent 60%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 800px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: var(--radius-full);
  color: var(--accent-primary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-info));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-8);
}

.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 48px; flex-wrap: wrap; }

.btn-qq {
  background: linear-gradient(135deg, #12b7f5, #0d96d6);
  color: #fff;
  border: none;
  box-shadow: 0 2px 12px rgba(18, 183, 245, 0.3);
}

.hero-stats { display: flex; gap: var(--space-8); justify-content: center; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; gap: var(--space-1); }
.hero-stat .num { font-size: 28px; font-weight: 700; color: var(--accent-primary); }
.hero-stat .lbl { font-size: var(--text-sm); color: var(--text-muted); }

/* 特性区 */
.features { padding: 60px var(--space-6); max-width: 1200px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 28px; font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-2); }
.section-header p { font-size: var(--text-base); color: var(--text-muted); }

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: var(--transition);
}

.feature-card:hover { border-color: var(--accent-primary); transform: translateY(-4px); box-shadow: var(--shadow-md); }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.feature-icon.accent { background: rgba(0,212,255,0.15); color: var(--accent-primary); }
.feature-icon.success { background: rgba(0,230,118,0.15); color: var(--accent-success); }
.feature-icon.warning { background: rgba(255,171,0,0.15); color: var(--accent-warning); }
.feature-icon.info { background: rgba(68,138,255,0.15); color: var(--accent-info); }

.feature-card h3 { font-size: 17px; font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-2); }
.feature-card p { font-size: var(--text-md); color: var(--text-secondary); line-height: 1.7; }

/* CTA */
.cta { padding: 60px var(--space-6); }

.cta-card {
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(68,138,255,0.1));
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
}

.cta-card h2 { font-size: var(--text-2xl); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-2); }
.cta-card p { font-size: var(--text-base); color: var(--text-secondary); margin-bottom: var(--space-6); }

/* 页脚 */
.footer { padding: var(--space-8) var(--space-6); border-top: 1px solid var(--border-color); }

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-brand { display: flex; align-items: center; gap: var(--space-2); color: var(--text-secondary); font-size: var(--text-md); }
.footer-links { display: flex; gap: var(--space-4); font-size: var(--text-md); flex-wrap: wrap; }
.footer-copy { font-size: var(--text-sm); color: var(--text-muted); }

/* ===== 认证页（登录/注册/重置） ===== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height) - 48px);
  padding: var(--space-6);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
}

.auth-header { text-align: center; margin-bottom: var(--space-6); }
.auth-logo { display: inline-flex; margin-bottom: 12px; }
.auth-header h1 { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-1); }
.auth-header p { font-size: var(--text-md); color: var(--text-muted); }
.auth-form .form-group { margin-bottom: var(--space-4); }

.auth-footer {
  margin-top: var(--space-5);
  text-align: center;
  font-size: var(--text-md);
  color: var(--text-muted);
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
}

.auth-footer a:hover { text-decoration: underline; }
.link-qq { color: #12b7f5; }

/* 免责协议确认弹层（复用 modal） */
.disclaimer-modal-body { font-size: var(--text-md); line-height: 1.8; text-align: left; }
.disclaimer-modal-body a { text-decoration: underline; }

/* ===== 概览页横幅与引导 ===== */
.qq-banner {
  background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(0,153,204,0.08));
  border: 2px solid rgba(0,212,255,0.35);
  border-radius: var(--radius-lg);
  padding: 14px var(--space-6);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.qq-banner-info { display: flex; align-items: center; gap: 12px; }
.qq-banner-icon { font-size: 28px; line-height: 1; }
.qq-banner-title { font-weight: 700; font-size: 15px; color: var(--text-primary); }
.qq-banner-sub { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }
.qq-banner-sub .qq-num { font-weight: 600; color: var(--accent-primary); letter-spacing: 0.5px; }

.btn-qq-join {
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  color: #fff;
  border: none;
  padding: 8px var(--space-5);
  border-radius: var(--radius-md);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,212,255,0.35);
  transition: var(--transition);
}

.btn-qq-join:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,212,255,0.45); color: #fff; }

.service-notice {
  background: linear-gradient(135deg, rgba(255,171,0,0.12), rgba(255,140,0,0.06));
  border: 1px solid rgba(255,171,0,0.3);
  border-radius: var(--radius-lg);
  padding: 12px var(--space-5);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--accent-warning);
}

.service-notice-icon { font-size: 18px; flex-shrink: 0; line-height: 1.4; }

/* 引导/提示卡片 */
.guide-card {
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-lg) !important;
}

.guide-card-info { border-left-color: var(--accent-info) !important; }
.guide-card-inner { padding: var(--space-4); display: flex; align-items: center; gap: 12px; }
.guide-card-title { font-weight: 600; margin-bottom: var(--space-1); }

/* ===== 密钥管理 ===== */
.key-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.key-prefix { font-size: var(--text-sm); color: var(--accent-primary); word-break: break-all; }

.key-created-info { display: flex; flex-direction: column; gap: 12px; }
.key-full-input { font-family: 'SF Mono', Monaco, Consolas, monospace; font-size: var(--text-sm); }

/* ===== 聊天页 ===== */
.chat-page {
  display: flex;
  height: calc(100vh - var(--header-height) - 48px);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.chat-sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.chat-sidebar-header {
  padding: 12px var(--space-4);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.chat-sidebar-header h3 { font-size: var(--text-base); font-weight: 600; color: var(--text-primary); }
.chat-history-list { flex: 1; overflow-y: auto; padding: var(--space-2); }

.chat-history-item {
  position: relative;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: var(--space-1);
}

.chat-history-item:hover { background: var(--bg-hover); }
.chat-history-item.active { background: var(--accent-bg); }

.chat-history-title {
  font-size: var(--text-md);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: var(--space-6);
}

.chat-history-meta { display: flex; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-1); }

.chat-history-del {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-card);
}

.chat-history-item:hover .chat-history-del { display: flex; }
.chat-history-del:hover { color: var(--accent-danger); background: rgba(255,82,82,0.1); }

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.chat-header {
  padding: 10px var(--space-4);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-secondary);
  flex-wrap: wrap;
}

.chat-model-select { display: flex; align-items: center; gap: var(--space-2); flex: 1; min-width: 0; }
.chat-model-select label { font-size: var(--text-sm); color: var(--text-muted); flex-shrink: 0; }

.chat-model-select .select {
  max-width: 320px;
  height: 32px;
  padding: 4px 30px 4px 10px;
  font-size: var(--text-sm);
}

.chat-actions { display: flex; gap: 6px; flex-shrink: 0; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 0;
}

.chat-empty { margin: auto; text-align: center; color: var(--text-muted); padding: 40px var(--space-5); }
.chat-empty-icon { display: flex; justify-content: center; margin-bottom: 12px; opacity: 0.4; }
.chat-empty h3 { font-size: 18px; color: var(--text-secondary); margin-bottom: var(--space-1); }
.chat-empty p { font-size: var(--text-md); }

.message { display: flex; gap: 12px; max-width: 80%; }

.message.user { align-self: flex-end; flex-direction: row-reverse; }

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.message-avatar.assistant { background: linear-gradient(135deg, var(--accent-primary), var(--accent-info)); color: #0a0e27; }
.message-avatar.user { background: linear-gradient(135deg, var(--accent-success), var(--accent-warning)); color: #0a0e27; }

.message-content { min-width: 0; flex: 1; }
.message-role { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-1); }

.message-text {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  line-height: 1.7;
  word-break: break-word;
  white-space: pre-wrap;
}

.message.user .message-text { background: rgba(0,212,255,0.1); border-color: rgba(0,212,255,0.2); }

/* 推理过程（可折叠） */
.reasoning-block {
  margin-bottom: var(--space-2);
  border: 1px solid rgba(124,77,255,0.3);
  border-radius: var(--radius-md);
  background: rgba(124,77,255,0.05);
  overflow: hidden;
}

.reasoning-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) 12px;
  cursor: pointer;
  user-select: none;
  font-size: var(--text-sm);
  color: var(--accent-purple);
  transition: var(--transition);
}

.reasoning-header:hover { background: rgba(124,77,255,0.1); }
.reasoning-count { font-size: var(--text-xs); color: var(--text-muted); margin-left: auto; }
.reasoning-toggle { display: flex; transition: transform 0.2s; }
.reasoning-block.collapsed .reasoning-toggle { transform: rotate(-90deg); }

.reasoning-content {
  padding: var(--space-2) 12px 12px;
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
  border-top: 1px solid rgba(124,77,255,0.2);
  max-height: 400px;
  overflow-y: auto;
}

.reasoning-block.collapsed .reasoning-content { display: none; }

/* 联网搜索结果 */
.search-results { margin-bottom: var(--space-2); border: 1px solid var(--border-light); border-radius: var(--radius-md); overflow: hidden; }
.search-result-item { padding: var(--space-2) 12px; border-bottom: 1px solid var(--border-light); }
.search-result-item:last-child { border-bottom: none; }

.search-result-title {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--accent-primary);
  font-size: var(--text-md);
  font-weight: 500;
  margin-bottom: var(--space-1);
}

.search-result-title:hover { text-decoration: underline; }
.search-result-snippet { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.5; }

/* 聊天输入区 */
.chat-input-area { padding: 12px var(--space-4); border-top: 1px solid var(--border-color); background: var(--bg-secondary); }
.chat-input-wrap { display: flex; gap: var(--space-2); align-items: flex-end; }

.chat-input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  line-height: 1.5;
  resize: none;
  min-height: 40px;
  max-height: 200px;
  font-family: inherit;
  transition: border-color 0.15s;
}

.chat-input:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 2px rgba(0,212,255,0.15); }

.chat-hints { margin-top: 6px; font-size: var(--text-xs); color: var(--text-muted); text-align: center; }
.chat-hint-warn { display: flex; align-items: center; gap: var(--space-1); justify-content: center; margin-top: var(--space-1); }
.chat-hint-warn .warn-icon { color: var(--accent-warning); font-size: 12px; }

/* ===== 模型卡片 ===== */
.model-card {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: var(--transition);
}

.model-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); }
.model-card.deprecated { opacity: 0.6; }

.model-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.model-card-names { display: flex; flex-direction: column; flex: 1; min-width: 0; }

.model-card-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-card-id {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-caps { display: flex; gap: var(--space-1); flex-wrap: wrap; }

.models-summary { margin-bottom: 12px; font-size: var(--text-md); color: var(--text-muted); }

/* ===== 反馈页 ===== */
.feedback-item { padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.feedback-item:last-child { border-bottom: none; }
.feedback-item-title { font-size: var(--text-md); }
.feedback-item-content { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: 6px; word-break: break-word; }

.feedback-reply {
  font-size: var(--text-sm);
  color: var(--accent-primary);
  padding: 6px 10px;
  background: rgba(0,212,255,0.06);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-1);
  word-break: break-word;
}

.feedback-time { font-size: var(--text-xs); color: var(--text-muted); }
.char-count { margin-top: var(--space-1); text-align: right; }

/* ===== 设置页 ===== */
.settings-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.theme-settings { display: flex; gap: var(--space-2); }
.settings-special-info { display: flex; flex-direction: column; gap: 0; }
.settings-inline { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 0; flex-wrap: wrap; }
.settings-concurrency { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.settings-note { padding: var(--space-2) 0; color: var(--accent-warning); font-size: var(--text-md); }

.tag-old { background: rgba(0, 212, 255, 0.12); color: var(--accent-primary); border: 1px solid rgba(0, 212, 255, 0.3); }
.tag-new { background: rgba(255, 171, 0, 0.12); color: var(--accent-warning); border: 1px solid rgba(255, 171, 0, 0.3); }
.tag-special { background: rgba(108, 67, 255, 0.12); color: #8f6bff; border: 1px solid rgba(108, 67, 255, 0.3); }

/* ===== 文档页 ===== */
.docs-table { width: 100%; font-size: var(--text-sm); border-collapse: collapse; }

.docs-table th {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
}

.docs-table td { padding: 6px 10px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); }
.docs-table tr:last-child td { border-bottom: none; }

.docs-note { font-size: var(--text-sm); color: var(--text-muted); margin-top: 10px; }
.docs-p { font-size: var(--text-md); line-height: 1.8; }
.docs-ol { padding-left: var(--space-5); line-height: 2; }
.docs-h4 { font-size: var(--text-md); margin-bottom: var(--space-2); }
.docs-card-h4 { font-size: var(--text-md); margin-bottom: var(--space-1); }
.docs-card-p { color: var(--text-muted); font-size: var(--text-sm); }
.docs-intro-box {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

/* ===== QQ群页 ===== */
.qq-page { max-width: 800px; margin: 0 auto; padding: 40px var(--space-5); }
.qq-page-header { text-align: center; margin-bottom: 40px; }
.qq-page-header .icon { font-size: 48px; margin-bottom: var(--space-4); }
.qq-page-header h1 { font-size: 28px; margin-bottom: var(--space-2); }
.qq-page-header p { color: var(--text-muted); font-size: 15px; }

.qq-list { display: flex; flex-direction: column; gap: var(--space-5); }

.qq-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
}

.qq-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.qq-card-head { padding: var(--space-6); color: #fff; position: relative; overflow: hidden; }
.qq-card-head h2 { font-size: 22px; margin: 0 0 var(--space-1); font-weight: 700; }
.qq-bubble-1 { position: absolute; right: -20px; top: -20px; width: 100px; height: 100px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.qq-bubble-2 { position: absolute; right: 30px; bottom: -30px; width: 80px; height: 80px; background: rgba(255,255,255,0.06); border-radius: 50%; }
.qq-card-body { padding: var(--space-6); }
.qq-card-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); }
.qq-label { font-size: var(--text-md); color: var(--text-muted); margin-bottom: var(--space-1); }
.qq-number-row { display: flex; align-items: center; gap: var(--space-2); }
.qq-number { font-size: 20px; font-weight: 700; color: var(--text-primary); letter-spacing: 1px; }
.qq-side { display: flex; align-items: center; gap: var(--space-4); }
.qq-members { text-align: center; }
.qq-members .lbl { font-size: var(--text-md); color: var(--text-muted); }
.qq-members .val { font-size: var(--text-lg); font-weight: 600; }
.btn-qq-join-lg { padding: 10px 28px; font-size: 15px; font-weight: 600; border-radius: 10px; color: #fff; border: none; }

.qq-note { margin-top: var(--space-8); padding: var(--space-5); background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border-color); }
.qq-note h3 { font-size: 15px; margin-bottom: 12px; }
.qq-note ul { color: var(--text-secondary); font-size: var(--text-md); line-height: 2; }

/* ===== 赞助页 ===== */
.sponsor-page { max-width: 800px; margin: 0 auto; padding: 40px var(--space-5); }
.sponsor-header { text-align: center; margin-bottom: 40px; }
.sponsor-header .icon { font-size: 48px; margin-bottom: 12px; }
.sponsor-header h1 { font-size: 28px; font-weight: 700; margin-bottom: var(--space-2); }
.sponsor-header p { color: var(--text-secondary); font-size: 15px; }

.sponsor-usage { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-5); }

.sponsor-usage-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
}

.sponsor-usage-item .pct { font-size: 28px; font-weight: 700; color: var(--accent-primary); }
.sponsor-usage-item .pct.success { color: var(--accent-success); }
.sponsor-usage-item .lbl { font-size: var(--text-md); color: var(--text-secondary); margin-top: var(--space-1); }
.sponsor-usage-item .desc { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

.sponsor-warm {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-warning);
  padding: 12px;
  margin-bottom: var(--space-4);
  background: rgba(255,171,0,0.08);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,171,0,0.2);
}

.sponsor-disclaimer {
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  line-height: 1.8;
}

/* ===== 免责协议页 ===== */
.legal-page { max-width: 900px; margin: 0 auto; padding: 30px var(--space-5) 60px; }

.legal-header { text-align: center; margin-bottom: 36px; padding-bottom: var(--space-6); border-bottom: 1px solid var(--border-color); }
.legal-header h1 { font-size: var(--text-2xl); font-weight: 700; margin-bottom: 6px; }
.legal-header .update-date { font-size: var(--text-md); color: var(--text-muted); }

.legal-toc {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  float: right;
  width: 220px;
  margin-left: var(--space-6);
  margin-bottom: var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  font-size: var(--text-md);
}

.legal-toc-title { font-weight: 600; margin-bottom: 10px; color: var(--text-primary); }
.legal-toc a { display: block; padding: var(--space-1) 0; color: var(--text-secondary); transition: var(--transition); }
.legal-toc a:hover { color: var(--accent-primary); }

.legal-section { margin-bottom: 28px; }

.legal-section h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.legal-section p { font-size: var(--text-base); line-height: 1.9; color: var(--text-secondary); margin-bottom: var(--space-2); }
.legal-section li { font-size: var(--text-base); line-height: 1.8; color: var(--text-secondary); margin-bottom: var(--space-1); }

.legal-footer-card {
  text-align: center;
  margin-top: 40px;
  padding: var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.legal-footer-card p { color: var(--text-secondary); font-size: var(--text-base); margin-bottom: 12px; }

/* ===== 模型状态监控页 ===== */
.ms-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: var(--space-5); }
.ms-summary .stat-card { padding: 12px; margin-bottom: 0; }
.ms-summary .stat-value { font-size: 20px; }

.ms-degraded {
  background: rgba(255,171,0,0.12);
  border: 1px solid rgba(255,171,0,0.35);
  border-radius: 10px;
  padding: 10px var(--space-4);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-md);
}

.ms-section { margin-bottom: var(--space-5); }
.ms-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 var(--space-1); }
.ms-section-title { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); display: flex; align-items: center; }
.ms-section-count { font-size: var(--text-sm); color: var(--text-muted); background: var(--bg-secondary); padding: 2px 10px; border-radius: var(--radius-full); }

.ms-card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }

.ms-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: box-shadow 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.ms-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.25); transform: translateY(-1px); }
.ms-card.st-normal { border-left: 3px solid var(--accent-success); }
.ms-card.st-warning { border-left: 3px solid var(--accent-warning); }
.ms-card.st-abnormal { border-left: 3px solid var(--accent-danger); }

.ms-card-header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ms-card-title-group { display: flex; align-items: center; gap: var(--space-1); min-width: 0; flex: 1; overflow: hidden; flex-wrap: wrap; }
.ms-card-names { display: flex; flex-direction: column; min-width: 0; }

.ms-model-name {
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: 'SF Mono', 'Cascadia Code', monospace;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-model-id { display: flex; align-items: center; gap: 2px; margin-top: 1px; }
.ms-model-id .text { font-size: 10px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ms-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  padding: 0 5px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}

.ms-badge-rec { background: rgba(0,230,118,0.2); color: #00e676; border: 1px solid rgba(0,230,118,0.35); }

.ms-health { display: flex; align-items: center; gap: var(--space-1); flex-shrink: 0; }
.ms-health-bar { width: 44px; height: 5px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }
.ms-health-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.ms-health-fill.s { background: var(--accent-success); }
.ms-health-fill.w { background: var(--accent-warning); }
.ms-health-fill.d { background: var(--accent-danger); }
.ms-health-score { font-size: var(--text-md); font-weight: 700; min-width: 20px; text-align: right; color: var(--text-primary); }

.ms-bucket-row {
  display: flex;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: 5px;
  align-items: center;
  flex-wrap: wrap;
}

.ms-bucket-row .sep { color: var(--border-color); }
.ms-bucket-row strong { font-weight: 600; }
.c-success { color: var(--accent-success); }
.c-warning { color: var(--accent-warning); }
.c-danger { color: var(--accent-danger); }

.ms-metrics { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.ms-metric { display: flex; align-items: center; gap: 3px; }
.ms-metric-label { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.ms-metric-val { font-size: var(--text-xs); font-weight: 600; color: var(--text-primary); white-space: nowrap; }

/* ===== 日志详情 ===== */
.log-detail { display: flex; flex-direction: column; gap: 10px; }

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-md);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-muted); min-width: 80px; }

.error-pre {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  font-size: var(--text-sm);
  color: var(--accent-danger);
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ===== 响应式：页面级 ===== */
@media (max-width: 768px) {
  .chat-page { flex-direction: column; height: auto; min-height: 70vh; }
  .chat-sidebar { width: 100%; max-height: 240px; border-right: none; border-bottom: 1px solid var(--border-color); }
  .message { max-width: 95%; }
  .hero-title { font-size: 32px; }
  .hero-stats { gap: var(--space-4); }
  .hero-stat .num { font-size: 20px; }
  .features, .cta { padding: var(--space-8) var(--space-4); }
  .footer-inner { flex-direction: column; text-align: center; }
  .legal-toc { float: none; width: 100%; margin: 0 0 var(--space-5) 0; position: relative; top: 0; }
  .sponsor-usage { grid-template-columns: 1fr; }
  .sponsor-warm { font-size: 18px; padding: 10px; }
  .ms-summary { grid-template-columns: repeat(2, 1fr); }
  .ms-card-header { flex-direction: column; align-items: flex-start; }
  .ms-metrics { gap: var(--space-1) 12px; }
  .ms-metric-val { font-size: var(--text-md); }
  .ms-model-name { font-size: var(--text-md); }
  .ms-card-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .floating-qq-btn { width: 46px; height: 46px; font-size: 19px; bottom: var(--space-4); right: var(--space-4); }
}

@media (max-width: 480px) {
  .hero-title { font-size: 24px; }
  .sponsor-header h1 { font-size: 22px; }
  .sponsor-usage { grid-template-columns: 1fr; }
  .ms-summary { grid-template-columns: repeat(2, 1fr); }
  .ms-metrics { gap: 2px 10px; }
  .ms-card { padding: 10px 12px; }
}
