/* 简白 - 全局样式 */

::selection {
  background: rgba(16, 163, 127, 0.4);
}

body {
  font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* 滚动条 */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* 加载动画 */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #10a37f;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 消息卡片 */
.msg-user {
  background: #1d2129;
  border: 1px solid #2a2f3a;
  border-radius: 12px;
  padding: 12px 16px;
}
.msg-bot {
  border-radius: 12px;
}

.tab-btn.active {
  color: #fff;
  border-color: #10a37f;
}

.tab-pane.hidden { display: none; }

.btn-ghost {
  background: transparent;
  border: 1px solid #2a2f3a;
  color: #d1d5db;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-ghost:hover {
  border-color: #10a37f;
  color: #fff;
}
.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fff;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.modal-card {
  background: #1d2129;
  border: 1px solid #2a2f3a;
  border-radius: 16px;
  padding: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

input[type="checkbox"] {
  accent-color: #10a37f;
}

textarea, input, select {
  color-scheme: dark;
}

/* 历史项 */
.history-item {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #d1d5db;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
}
.history-item:hover {
  background: #1d2129;
}
.history-item.active {
  background: #2a2f3a;
  color: #fff;
}
.history-item .meta {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}
.history-item.failed .meta {
  color: #f87171;
}

/* 图片消息 */
.img-card {
  background: #1d2129;
  border: 1px solid #2a2f3a;
  border-radius: 14px;
  overflow: hidden;
}
.img-card img {
  display: block;
  width: 100%;
  height: auto;
}
.img-card .footer {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #9ca3af;
}
.img-card .footer a {
  color: #10a37f;
}
