/* Fish Ai 主页样式 — 从 html/index.html 内联 style 抽取（2026-07-26） */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-light: #e0f2fe;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-hover: #f1f5f9;
  --border: #e5e7eb;
  --border-soft: #f0f0f0;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --sidebar-w: 280px;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; outline: none; border: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== Layout ===== */
.app { display: flex; height: 100vh; height: 100dvh; }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  z-index: 100;
}
.sidebar-header {
  padding: 16px 16px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 19px; font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.logo-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(14,165,233,.35);
  overflow: hidden;
}
.logo-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo .logo-text { background: linear-gradient(135deg, #0ea5e9, #0284c7); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.new-chat-btn {
  margin: 10px 14px 6px;
  padding: 11px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s, transform .1s;
  box-shadow: 0 2px 8px rgba(14,165,233,.3);
}
.new-chat-btn:hover { background: var(--primary-dark); }
.new-chat-btn:active { transform: scale(.98); }
.new-chat-btn svg { width: 17px; height: 17px; }

.nav-menu { padding: 6px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--text-secondary);
  font-size: 14px;
  width: 100%;
  text-align: left;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

/* 「模型上新」特别高亮 */
.nav-item.nav-item-new {
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  color: #b45309;
  margin: 2px 2px;
  box-shadow: 0 2px 8px rgba(245,158,11,.12);
  position: relative;
  overflow: hidden;
}
.nav-item.nav-item-new::before {
  content: '';
  position: absolute;
  top: -16px; right: -16px;
  width: 56px; height: 56px;
  background: radial-gradient(circle, rgba(251,191,36,.32), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.nav-item.nav-item-new svg { color: #f59e0b; }
.nav-item.nav-item-new:hover {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #f59e0b;
  color: #92400e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,158,11,.22);
}
.nav-item.nav-item-new .ni-badge {
  margin-left: auto;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 999px;
  letter-spacing: .5px;
  box-shadow: 0 2px 6px rgba(239,68,68,.35);
  position: relative;
  z-index: 1;
}
.nav-item.nav-item-api { position: relative; margin: 3px 2px; overflow: hidden; color: #075985; border: 1px solid #bae6fd; background: linear-gradient(135deg, #f0f9ff, #eef6ff); box-shadow: 0 2px 8px rgba(14, 116, 186, .08); }
.nav-item.nav-item-api::after { content:""; position:absolute; top:-22px; right:-20px; width:68px; height:68px; border-radius:50%; background:radial-gradient(circle, rgba(56,189,248,.28), transparent 68%); pointer-events:none; }
.nav-item.nav-item-api svg { color:#0284c7; }.nav-item.nav-item-api:hover { color:#0c4a6e; border-color:#7dd3fc; background:linear-gradient(135deg, #e0f2fe, #eaf4ff); transform:translateY(-1px); box-shadow:0 5px 13px rgba(14,116,186,.14); }
.api-nav-badge { position:relative; z-index:1; margin-left:auto; padding:2px 6px; color:#fff; border-radius:999px; background:linear-gradient(135deg,#0284c7,#2563eb); box-shadow:0 2px 5px rgba(37,99,235,.22); font:800 8px/1.35 ui-monospace,Consolas,monospace; letter-spacing:.08em; }
.nav-item.nav-item-qq {
  color: var(--text-secondary);
}
.nav-item.nav-item-qq:hover {
  color: var(--primary-dark); background: var(--primary-light);
}
.nav-item-qq svg { color: var(--primary); }
.nav-item-qq .qq-nav-tag { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 9px; font-weight: 800; letter-spacing: .3px; }

.history-label {
  padding: 14px 16px 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: .3px;
  display: flex; align-items: center; justify-content: space-between;
}
.clear-history {
  color: var(--text-muted);
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 5px;
}
.clear-history:hover { color: #ef4444; background: #fef2f2; }
.history-actions { display: flex; align-items: center; gap: 3px; }
.history-action { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); border-radius: 6px; transition: all .15s; }
.history-action svg { width: 14px; height: 14px; }
.history-action:hover { color: var(--primary); background: var(--primary-light); }
.history-action.danger:hover { color: #ef4444; background: #fef2f2; }
.history-action#toggleHistoryBtn svg { transition: transform .2s ease; }
.sidebar.history-collapsed .history-action#toggleHistoryBtn svg { transform: rotate(-90deg); }
.sidebar.history-collapsed .history-list { display: none; }
.sidebar.history-collapsed .history-label { padding-bottom: 12px; }

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px 10px;
}
.history-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--text-secondary);
  font-size: 13.5px;
  cursor: pointer;
  transition: background .15s, color .15s;
  position: relative;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
}
.history-item:hover { background: var(--bg-hover); color: var(--text); }
.history-item.active { background: var(--primary-light); color: var(--primary-dark); }
.history-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.history-item .h-title { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.history-item .del-btn {
  display: flex;
  width: 22px; height: 22px;
  border-radius: 5px;
  align-items: center; justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity .15s, color .15s, background .15s;
}
.history-item .del-btn:hover { color: #ef4444; background: #fef2f2; opacity: 1; }
.history-item:hover .del-btn { opacity: 1; }
.history-empty { padding: 20px 14px; text-align: center; color: var(--text-muted); font-size: 13px; }

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.user-box {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}
.user-box:hover { background: var(--bg-hover); }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent;
}
.avatar svg { display: block; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-status { font-size: 12px; color: var(--text-muted); }
.user-status.logged { color: var(--primary); }

/* ===== Main ===== */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
  position: relative;
}
.main-header {
  height: 64px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center;
  padding: 0 16px;
  gap: 12px;
  position: relative;
}
.menu-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: 9px;
  align-items: center; justify-content: center;
  color: var(--text);
}
.menu-toggle:hover { background: var(--bg-hover); }
.menu-toggle svg { width: 22px; height: 22px; }
.header-side { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.header-side.right { justify-content: flex-end; }
.chat-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 模型选择器(顶部居中显眼) ===== */
.model-picker { position: relative; }
.model-select {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(14,165,233,.14);
  min-width: 240px;
}
.model-select:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 22px rgba(14,165,233,.26);
  transform: translateY(-1px);
}
.model-select.open {
  border-color: var(--primary);
  box-shadow: 0 8px 26px rgba(14,165,233,.32);
}
.ms-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 3px 8px rgba(14,165,233,.35);
  flex-shrink: 0;
}
.ms-icon svg { width: 18px; height: 18px; display: block; }
.ms-info { flex: 1; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; min-width: 0; }
.ms-name { font-size: 14.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.ms-price { font-size: 11.5px; color: var(--primary); font-weight: 600; margin-top: 2px; white-space: nowrap; }
.ms-arrow {
  width: 16px; height: 16px;
  color: var(--text-muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.model-select.open .ms-arrow { transform: rotate(180deg); color: var(--primary); }

/* 下拉面板 */
.model-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 50px rgba(0,0,0,.18);
  width: 540px;
  max-width: 92vw;
  max-height: 70vh;
  overflow: hidden;
  z-index: 150;
  animation: dropDown .22s ease;
}
@keyframes dropDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.97); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.model-picker.open .model-dropdown { display: flex; flex-direction: column; }

/* 分类 Tab */
.md-tabs {
  display: flex; gap: 4px;
  padding: 8px 8px 0;
  border-bottom: 1px solid var(--border-soft);
}
.md-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  transition: all .18s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.md-tab .md-tab-count {
  font-size: 10.5px;
  background: rgba(0,0,0,.06);
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
}
.md-tab.active {
  color: var(--primary);
  background: linear-gradient(180deg, transparent, rgba(14,165,233,.06));
  box-shadow: inset 0 -2px 0 var(--primary);
}
.md-tab.active .md-tab-count { background: var(--primary); color: #fff; }

/* 搜索框 */
.md-search {
  padding: 10px 12px 8px;
  position: relative;
}
.md-search input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  transition: all .15s;
  font-family: inherit;
}
.md-search input:focus { border-color: var(--primary); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(14,165,233,.12); }
.md-search svg {
  position: absolute;
  left: 22px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--text-muted);
}

/* 列表区 */
.md-list {
  flex: 1; overflow-y: auto;
  padding: 4px 8px 10px;
}
.md-group-title {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-muted);
  padding: 10px 8px 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.md-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px;
  border-radius: 11px;
  cursor: pointer;
  transition: all .15s;
  border: 1px solid transparent;
  position: relative;
}
.md-item:hover { background: var(--bg-soft); border-color: var(--border); }
.md-item.active {
  background: linear-gradient(135deg, #e0f2fe, #cffafe);
  border-color: rgba(14,165,233,.35);
}
.md-item-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  transition: all .15s;
}
.md-item-icon svg { width: 20px; height: 20px; display: block; color: #fff; }
.md-item.active .md-item-icon {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4) !important;
  color: #fff;
  box-shadow: 0 4px 12px rgba(14,165,233,.4);
  transform: scale(1.05);
}
.md-item.active .md-item-icon svg path,
.model-select.open .ms-icon svg path { fill: #fff !important; }
.md-item.active .md-item-icon svg rect,
.model-select.open .ms-icon svg rect { fill: #fff !important; }
.md-item-main { flex: 1; min-width: 0; }
.md-item-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.md-item-tags {
  display: flex; gap: 4px; margin-top: 4px;
  flex-wrap: wrap;
}
.md-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 5px;
  white-space: nowrap;
  letter-spacing: .2px;
}
.md-tag-vendor    { background: #ede9fe; color: #7c3aed; }
.md-tag-billing   { background: #fef3c7; color: #d97706; }
.md-tag-mm        { background: #d1fae5; color: #059669; }
.md-tag-fast      { background: #dbeafe; color: #2563eb; }
.md-tag-pro       { background: linear-gradient(135deg, #ef4444, #f59e0b); color: #fff; }
.md-tag-cheap     { background: #d1fae5; color: #047857; }
.md-tag-powerful  { background: #fce7f3; color: #be185d; }
.md-item-price {
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.3;
}
.md-item-price .mp-out { color: var(--text-muted); font-weight: 600; font-size: 10.5px; }
.md-item.active .md-item-price { color: var(--primary-dark); }
.md-item-check {
  position: absolute;
  top: 8px; right: 8px;
  width: 18px; height: 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.md-item.active .md-item-check { display: flex; }
.md-loading, .md-empty {
  text-align: center;
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* chat body */
.chat-body {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: auto;
}
.welcome {
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
  text-align: center;
}
.welcome-logo {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(14,165,233,.3);
  overflow: hidden;
}
.welcome-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.welcome h1 { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.welcome p { color: var(--text-secondary); font-size: 15px; margin-bottom: 28px; }
.suggest-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 620px;
}
.suggest-card {
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  transition: all .18s;
}
.suggest-card:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.suggest-card .sc-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; color: var(--primary); }
.suggest-card .sc-icon svg { width: 17px; height: 17px; }
.suggest-card .sc-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.suggest-card .sc-desc { font-size: 12.5px; color: var(--text-muted); }

/* messages */
.messages { padding: 24px 0 8px; max-width: 820px; margin: 0 auto; }
.msg {
  padding: 10px 24px;
  display: flex;
  gap: 14px;
  content-visibility: auto;
  contain-intrinsic-size: auto 180px;
}
.msg-avatar {
  width: 34px; height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
}
.msg.user .msg-avatar { background: linear-gradient(135deg, #34d399, #10b981); }
.msg.assistant .msg-avatar { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-content { flex: 1; min-width: 0; padding-top: 4px; }
.msg-content .role { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.msg.user .role { color: #10b981; }
.msg.assistant .role { color: var(--primary); }
.msg-bubble {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
/* 错误消息气泡：红色边框 + 浅红背景，便于一眼区分 */
.msg.assistant.msg-error .msg-bubble {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fca5a5;
  color: #991b1b;
  box-shadow: 0 2px 8px rgba(239,68,68,.08);
}
.msg.assistant.msg-error .msg-bubble p { color: #991b1b; }
.msg.assistant.msg-error .msg-bubble code:not(pre code) { background: #fecaca; color: #7f1d1d; }
.msg.assistant.msg-error .msg-bubble strong { color: #7f1d1d; }

/* 用户消息气泡容器 + 底部复制按钮 */
.msg.user .msg-bubble-wrap { position: relative; display: inline-block; max-width: 100%; }
.msg.user .user-copy-btn {
  display: flex; align-items: center; gap: 3px;
  padding: 3px 7px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .15s, transform .15s, color .15s, background .15s, border-color .15s;
  z-index: 2;
}
.msg.user .user-copy-btn svg { width: 12px; height: 12px; }
/* 底部按钮：常驻在气泡下方右侧 */
.msg.user .user-copy-bottom {
  display: flex; justify-content: flex-end;
  margin-top: 4px;
}
.msg.user .user-copy-btn-bottom {
  position: relative;
  opacity: 0;
  transform: translateY(2px);
}
.msg.user:hover .user-copy-btn-bottom,
.msg.user .user-copy-btn-bottom:focus { opacity: 1; transform: translateY(0); }
/* 按钮 hover/copied 状态 */
.msg.user .user-copy-btn:hover { color: var(--primary); border-color: var(--primary); }
.msg.user .user-copy-btn.copied {
  background: #10b981; color: #fff; border-color: #10b981;
  opacity: 1; transform: translateY(0);
}
/* 手机端不支持 hover，常驻显示 */
@media (hover: none) {
  .msg.user .user-copy-btn { opacity: 1; transform: translateY(0); }
}

/* 助手回答底部操作 */
.assistant-actions { display: flex; align-items: center; margin-top: 8px; }
.assistant-copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 5px 10px;
  border: 1px solid #dbe7f2; border-radius: 7px;
  background: #f8fbfe; color: var(--text-secondary);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.assistant-copy-btn svg { width: 14px; height: 14px; }
.assistant-copy-btn:hover { color: #0284c7; background: #f0f9ff; border-color: #7dd3fc; box-shadow: 0 3px 10px rgba(14,165,233,.12); transform: translateY(-1px); }
.assistant-copy-btn.copied { color: #047857; background: #ecfdf5; border-color: #6ee7b7; box-shadow: none; transform: none; }
.msg.assistant.msg-error .assistant-copy-btn { background: #fff7f7; border-color: #fecaca; color: #991b1b; }
.msg.assistant.msg-error .assistant-copy-btn:hover { background: #fef2f2; border-color: #f87171; }

/* 代码块：让 .code-wrap 成为定位上下文，便于悬浮按钮 */
.code-wrap { position: relative; }
/* 上面已有 .code-wrap 完整定义（含 overflow:hidden + position:relative），这里仅做 CSS 来源标注 */

/* 代码块底部复制按钮：悬浮在右下角的浅色图标按钮 */
.copy-btn-bottom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.9);    /* 浅色半透白，不再死黑 */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 0, 0, 0.08);    /* 浅边 */
  color: #475569;                            /* 中性灰图标 */
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);  /* 浅阴影 */
}
.copy-btn-bottom svg { width: 14px; height: 14px; }
/* 鼠标悬停代码块时显示，复制后常驻（.copied） */
.code-wrap:hover .copy-btn-bottom,
.copy-btn-bottom:focus,
.copy-btn-bottom.copied {
  opacity: 1;
  transform: translateY(0);
}
.copy-btn-bottom:hover {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.18);
}
/* 复制成功态 */
.copy-btn-bottom.copied,
.copy-btn.copied {
  background: #10b981 !important;
  color: #fff !important;
  border-color: #10b981 !important;
  opacity: 1;
}
/* 手机端无法 hover，常驻显示 */
@media (hover: none) {
  .copy-btn-bottom { opacity: 1; transform: translateY(0); }
}
.msg-bubble p { margin-bottom: 10px; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble ul, .msg-bubble ol { margin: 8px 0 10px 22px; }
.msg-bubble li { margin-bottom: 4px; }
.msg-bubble a { color: var(--primary); }
.msg-bubble strong { font-weight: 600; }
.msg-bubble blockquote { border-left: 3px solid var(--primary); padding: 4px 12px; margin: 8px 0; color: var(--text-secondary); background: var(--bg-soft); border-radius: 0 6px 6px 0; }

/* Markdown 数据表格 */
.md-table-card {
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid #d8e5f2;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 80, 128, .08);
}
.md-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 43px;
  padding: 7px 9px 7px 15px;
  border-bottom: 1px solid #dce8f4;
  background: linear-gradient(135deg, #f4f9ff, #edf6ff);
}
.md-table-toolbar > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #42617e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
}
.md-table-toolbar > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2496ed;
  box-shadow: 0 0 0 4px rgba(36, 150, 237, .12);
}
.md-table-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  color: #286da8;
  border: 1px solid #c7dced;
  border-radius: 7px;
  background: rgba(255, 255, 255, .86);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: .15s ease;
}
.md-table-copy svg { width: 14px; height: 14px; }
.md-table-copy:hover { color: #0879c9; border-color: #7db8e4; background: #fff; box-shadow: 0 3px 10px rgba(25, 118, 181, .12); transform: translateY(-1px); }
.md-table-copy.copied { color: #047857; border-color: #6ee7b7; background: #ecfdf5; transform: none; }
.md-table-scroll { width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #bed2e5 transparent; }
.md-table-card table { width: 100%; min-width: 520px; border-spacing: 0; border-collapse: separate; font-size: 14px; line-height: 1.5; }
.md-table-card th,
.md-table-card td { padding: 12px 15px; text-align: left; vertical-align: top; border-right: 1px solid #e5edf5; border-bottom: 1px solid #e5edf5; }
.md-table-card th:last-child,
.md-table-card td:last-child { border-right: 0; }
.md-table-card tbody tr:last-child td { border-bottom: 0; }
.md-table-card th { color: #183b5c; background: #eaf4ff; font-size: 13px; font-weight: 750; white-space: nowrap; }
.md-table-card td { color: #334b63; background: #fff; }
.md-table-card tbody tr:nth-child(even) td { background: #f8fbfe; }
.md-table-card tbody tr:hover td { background: #eff7ff; }
.md-table-card code { color: #c02666; border-radius: 4px; background: #fce7f3; font-size: 12px; }

@media (max-width: 600px) {
  .md-table-card { margin: 13px 0; border-radius: 10px; }
  .md-table-card table { min-width: 460px; font-size: 13px; }
  .md-table-card th, .md-table-card td { padding: 10px 12px; }
  .md-table-copy { min-height: 32px; }
}

/* code block */
.code-wrap { margin: 12px 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #fafafa; position: relative; }
.code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  background: #f1f5f9;
  font-size: 12.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.code-head-actions { display: flex; align-items: center; gap: 4px; }
.code-lang { font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.code-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  transition: all .15s;
}
.code-toggle:hover { background: #e2e8f0; color: var(--text); }
.code-toggle svg { width: 13px; height: 13px; transition: transform .2s ease; }
.code-wrap.is-collapsed .code-toggle svg { transform: rotate(-90deg); }
.code-body { display: block; }
.code-wrap.is-collapsed .code-body { display: none; }
.code-foot {
  display: flex;
  justify-content: center;
  padding: 6px 10px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
}
.code-wrap.is-collapsed .code-foot { border-top: 0; }
.copy-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  transition: all .15s;
}
.copy-btn:hover { background: #e2e8f0; color: var(--text); }
.copy-btn svg { width: 13px; height: 13px; }
.code-wrap pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.code-wrap pre code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 13.5px; line-height: 1.6; background: transparent !important; padding: 0 !important; }
.msg-bubble code:not(pre code) { background: #f1f5f9; color: #db2777; padding: 2px 6px; border-radius: 5px; font-family: Consolas, Menlo, monospace; font-size: 13px; }
.msg-actions { display: flex; gap: 6px; margin-top: 8px; }
.msg-action-btn { display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 6px; font-size: 12px; color: var(--text-muted); }
.msg-action-btn:hover { background: var(--bg-hover); color: var(--text); }
.msg-action-btn svg { width: 14px; height: 14px; }

/* typing indicator */
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); opacity: .4; animation: blink 1.4s infinite both; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity:.3; transform: scale(.8);} 40% { opacity:1; transform: scale(1);} }

/* ===== 流式输出（SSE）优化 ===== */
/* 思考中骨架屏（AI 未响应时显示） */
.skeleton { padding: 2px 0; }
.sk-line {
  height: 11px;
  margin-bottom: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}
.sk-line:last-child { margin-bottom: 0; }
.sk-line.short { width: 55%; }
@keyframes sk-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
/* 深色模式兜底 */
@media (prefers-color-scheme: dark) {
  .sk-line {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
  }
}
.stream-status {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: .85;
}
.stream-status.stopped {
  color: #ef4444;
  font-weight: 600;
}
/* 已停止的消息结尾标识 */
.msg-stopped-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  padding: 2px 8px;
  font-size: 11px;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 4px;
}
.stream-text {
  display: block;
  word-break: break-word;
}
.stream-text.streaming-plain,
.long-answer-plain {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.stream-text:empty { display: none; }
.stream-cursor {
  display: inline-block;
  width: 6px;
  height: 15px;
  background-color: var(--primary);
  animation: cursorBlink 1s step-end infinite;
  margin-left: 3px;
  vertical-align: middle;
}
@keyframes cursorBlink { 50% { opacity: 0; } }
.stream-image {
  display: block;
  max-width: 100%;
  max-height: 480px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin: 4px 0;
  background: var(--bg-soft);
}
.image-warning {
  display: block;
  margin: 4px 0 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d;
  border-radius: 8px;
  line-height: 1.5;
}

.output-limit-warning {
  display: block;
  margin: 12px 0 4px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d;
  border-radius: 8px;
  line-height: 1.5;
}

.image-missing {
  display: inline-block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
}
.stream-image-prompt {
  margin-top: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--bg-soft);
  border-radius: 8px;
  line-height: 1.6;
}

/* ===== Input ===== */
.input-area {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
}
.input-box {
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
  padding: 4px;
}
.input-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,233,.1); }
.input-preview { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 8px 0; }
.preview-file {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 12.5px;
  max-width: 200px;
}
.preview-file img { width: 30px; height: 30px; border-radius: 5px; object-fit: cover; }
.preview-file .pf-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-file .pf-remove { cursor: pointer; color: var(--text-muted); display: flex; }
.preview-file .pf-remove:hover { color: #ef4444; }
.preview-file .pf-remove svg { width: 14px; height: 14px; }

.input-row { display: flex; align-items: flex-end; gap: 6px; padding: 6px 8px 6px 6px; }
.input-tools { display: flex; gap: 2px; }
.tool-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all .15s;
  flex-shrink: 0;
}
.tool-btn:hover { background: var(--bg-hover); color: var(--primary); }
.tool-btn svg { width: 19px; height: 19px; }
.tool-btn.active { color: var(--primary); background: var(--primary-light); }
#msgInput {
  flex: 1;
  resize: none;
  border: none;
  background: transparent;
  font-size: 15px;
  line-height: 1.5;
  max-height: 160px;
  padding: 8px 4px;
  color: var(--text);
}
#msgInput::placeholder { color: var(--text-muted); }
.send-btn {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.send-btn:hover { background: var(--primary-dark); }
.send-btn:disabled { background: #d1d5db; cursor: not-allowed; }
.send-btn svg { width: 18px; height: 18px; }
/* 流式响应中的「停止」圆形按钮 */
.send-btn.is-streaming {
  width: 44px; height: 44px;
  border-radius: 50%;               /* 圆形 */
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(239,68,68,.35);
  animation: stopPulse 1.6s ease-in-out infinite;
}
.send-btn.is-streaming:hover { background: linear-gradient(135deg, #dc2626, #b91c1c) !important; }
.send-btn.is-streaming svg { width: 18px; height: 18px; }
@keyframes stopPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(239,68,68,.35); }
  50%      { box-shadow: 0 4px 22px rgba(239,68,68,.55); }
}
.input-hint { text-align: center; font-size: 11.5px; color: var(--text-muted); margin-top: 8px; }
.input-counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  transition: color .15s;
}
.input-counter.warn { color: #f59e0b; font-weight: 600; }
.input-counter.over { color: #ef4444; font-weight: 700; }

/* overlay for mobile */
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 90;
}
.overlay.show { display: block; }

/* ===== Modal ===== */
.modal-mask {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  align-items: center; justify-content: center;
  padding: 16px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  max-height: 85vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: pop .2s ease;
}
.modal.modal-wide { max-width: 760px; }
.modal.modal-points { max-height:min(960px,96vh); }
.modal.modal-redeem { max-width: 620px; }

/* ===== 积分兑换 ===== */
.redeem-panel { color:#172033; }
.redeem-hero {
  display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:16px;
  margin:-20px -20px 22px; padding:26px 24px;
  color:#f8fafc; background:#18202c; border-bottom:4px solid #10b981;
}
.redeem-hero-icon { width:54px; height:54px; display:grid; place-items:center; color:#34d399; background:#243142; border:1px solid #3a4a5e; border-radius:8px; }
.redeem-hero-icon svg { width:31px; height:31px; }
.redeem-hero span, .redeem-success > span { display:block; margin-bottom:5px; color:#34d399; font-size:10px; font-weight:800; letter-spacing:1.2px; }
.redeem-hero h3 { margin:0; font-size:21px; letter-spacing:0; }
.redeem-hero p { margin:5px 0 0; color:#aeb9c8; font-size:12px; }
.redeem-balance { min-width:110px; padding-left:18px; border-left:1px solid #3a4656; text-align:right; }
.redeem-balance small { display:block; color:#9daabc; font-size:11px; }
.redeem-balance strong { display:block; margin-top:3px; color:#fff; font-size:20px; }
.redeem-form label { display:block; margin-bottom:8px; color:#344054; font-size:13px; font-weight:700; }
.redeem-input-wrap { position:relative; }
.redeem-input-wrap > svg { position:absolute; left:15px; top:50%; width:20px; height:20px; color:#8491a3; transform:translateY(-50%); pointer-events:none; }
.redeem-input-wrap input { width:100%; height:54px; padding:0 54px 0 48px; color:#172033; background:#f8fafc; border:1px solid #cbd5e1; border-radius:8px; outline:none; font:700 15px/1 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing:.5px; transition:border-color .2s,box-shadow .2s; }
.redeem-input-wrap input:focus { border-color:#10b981; box-shadow:0 0 0 3px rgba(16,185,129,.13); }
.redeem-paste { position:absolute; right:8px; top:8px; width:38px; height:38px; display:grid; place-items:center; color:#047857; background:#e8f8f1; border-radius:6px; }
.redeem-paste:hover { background:#d1f2e4; }
.redeem-paste svg { width:18px; height:18px; }
.redeem-submit { width:100%; height:50px; margin-top:14px; display:flex; align-items:center; justify-content:center; gap:8px; color:#fff; background:#059669; border-radius:8px; font-size:15px; font-weight:800; transition:background .2s,transform .15s; }
.redeem-submit:hover { background:#047857; transform:translateY(-1px); }
.redeem-submit:disabled { opacity:.6; cursor:wait; transform:none; }
.redeem-submit svg { width:18px; height:18px; }
.redeem-note { display:flex; align-items:flex-start; gap:9px; margin-top:16px; padding:11px 13px; color:#667085; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; font-size:12px; }
.redeem-note > span { width:17px; height:17px; flex:none; display:grid; place-items:center; color:#047857; border:1px solid #10b981; border-radius:50%; font-size:10px; font-weight:800; }
.redeem-note p { margin:0; line-height:1.5; }
.redeem-login { padding:30px 10px; text-align:center; }
.redeem-login-icon { width:56px; height:56px; margin:0 auto 14px; display:grid; place-items:center; color:#059669; background:#ecfdf5; border-radius:8px; }
.redeem-login-icon svg { width:30px; height:30px; }
.redeem-login h3 { margin:0 0 20px; font-size:18px; }
.redeem-login .login-submit { max-width:220px; margin:auto; }
.redeem-success { padding:28px 10px 20px; text-align:center; }
.redeem-success-icon { width:64px; height:64px; margin:0 auto 15px; display:grid; place-items:center; color:#fff; background:#059669; border-radius:50%; box-shadow:0 8px 22px rgba(5,150,105,.22); }
.redeem-success-icon svg { width:35px; height:35px; }
.redeem-success h3 { margin:0 0 9px; font-size:24px; }
.redeem-success strong { display:block; color:#047857; font-size:29px; }
.redeem-success p { margin:8px 0 22px; color:#667085; }
.redeem-success button { min-width:150px; height:42px; color:#fff; background:#18202c; border-radius:8px; font-weight:700; }

@media (max-width: 540px) {
  .redeem-hero { grid-template-columns:auto 1fr; margin:-16px -16px 19px; padding:20px 16px; }
  .redeem-hero-icon { width:46px; height:46px; }
  .redeem-balance { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; padding:12px 0 0; border-left:0; border-top:1px solid #3a4656; text-align:left; }
  .redeem-balance strong { font-size:18px; }
}
.modal.modal-api-logs { max-width: min(1380px, 96vw); max-height: 92vh; border:1px solid #cbd5e1; box-shadow:0 32px 90px rgba(15,23,42,.32); }
.modal.modal-api-logs .modal-head { color:#172033; border-color:#dbeafe; background:linear-gradient(135deg,#f8fbff,#f5f3ff); }
.modal.modal-api-logs .modal-head h2 { font-size:15px; letter-spacing:.04em; }
.modal.modal-api-logs .modal-close { color:#64748b; }
.modal.modal-api-logs .modal-close:hover { color:#2563eb; background:#e0e7ff; }
.modal.modal-api-logs .modal-body { padding:0; background:#f1f5f9; }
@keyframes pop { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-close { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); }
.modal-close:hover { background: var(--bg-hover); color: var(--text); }
.modal-close svg { width: 20px; height: 20px; }
.modal-body { padding: 20px; overflow-y: auto; }

/* ===== API 调用日志 ===== */
.api-console { min-height:540px; padding:0 18px 18px; background:linear-gradient(180deg,#eef8ff 0,#f5f3ff 166px,#f4f7fb 166px); }
.api-console-hero { min-height:112px; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:21px 8px 24px; color:#172033; }
.api-console-copy { display:flex; flex-direction:column; align-items:flex-start; gap:5px; }
.api-console-kicker { display:flex; align-items:center; gap:7px; color:#0284c7; font:700 9px/1 ui-monospace,Consolas,monospace; letter-spacing:.18em; }
.api-console-kicker i,.api-console-signal i { width:7px; height:7px; border-radius:50%; background:#14b8a6; box-shadow:0 0 0 4px rgba(20,184,166,.12),0 0 12px rgba(20,184,166,.45); }
.api-console-copy strong { font-size:22px; letter-spacing:-.02em; }
.api-console-copy>span { color:#64748b; font-size:12px; }
.api-console-signal { display:flex; align-items:center; gap:9px; padding:8px 12px; border:1px solid #bae6fd; border-radius:999px; background:rgba(255,255,255,.72); color:#0f766e; font-size:11px; box-shadow:0 4px 14px rgba(14,165,233,.08); }
.api-console-signal i { width:6px; height:6px; animation:apiSignal 1.8s ease-in-out infinite; }
@keyframes apiSignal { 50% { opacity:.35; box-shadow:0 0 0 7px rgba(45,212,191,0); } }
.api-logs-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.api-stat-card { min-height:88px; display:flex; align-items:center; gap:12px; padding:15px; background:rgba(255,255,255,.98); border:1px solid #e2e8f0; border-radius:14px; box-shadow:0 8px 24px rgba(15,23,42,.09); transition:transform .2s,box-shadow .2s; }
.api-stat-card:hover { transform:translateY(-2px); box-shadow:0 12px 28px rgba(15,23,42,.13); }
.api-stat-icon { width:38px; height:38px; flex:0 0 auto; display:grid; place-items:center; border-radius:11px; background:#f5f3ff; color:#7c3aed; }
.api-stat-icon svg { width:19px; height:19px; }
.api-stat-label { margin-bottom:5px; font-size:10px; color:#64748b; letter-spacing:.06em; }
.api-stat-value { font:800 19px/1.2 ui-monospace,Consolas,monospace; color:#0f172a; letter-spacing:-.04em; }
.api-stat-points .api-stat-value { color:#7c3aed; }
.api-stat-points-total .api-stat-value { color:#4f46e5; }
.api-stat-requests .api-stat-value { color:#0ea5e9; }
.api-stat-tokens .api-stat-value { color:#0d9488; }
.api-stat-points-total .api-stat-icon { color:#4f46e5; background:#eef2ff; }.api-stat-requests .api-stat-icon { color:#0284c7; background:#e0f2fe; }.api-stat-tokens .api-stat-icon { color:#0d9488; background:#ccfbf1; }
.api-date-filter { margin-top:14px; padding:14px 15px; border:1px solid #dbe3ee; border-radius:14px; background:rgba(255,255,255,.94); box-shadow:0 5px 18px rgba(15,23,42,.055); }
.api-date-filter-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.api-date-filter-title { display:flex; align-items:center; gap:9px; }.api-date-filter-title>div { display:flex; align-items:baseline; gap:8px; }.api-date-filter-title strong { color:#172033; font-size:12px; }.api-date-filter-title small { color:#94a3b8; font-size:9.5px; }
.api-date-filter-icon { width:29px; height:29px; display:grid; place-items:center; border-radius:9px; color:#4f46e5; background:linear-gradient(135deg,#e0f2fe,#ede9fe); }.api-date-filter-icon svg { width:15px; height:15px; }
.api-date-summary { padding:4px 9px; border:1px solid #c7d2fe; border-radius:999px; color:#4f46e5; background:#eef2ff; font:700 9.5px/1.4 Consolas,monospace; }
.api-date-filter-controls { display:flex; align-items:flex-end; gap:12px; }
.api-date-presets { display:flex; gap:4px; padding:3px; flex:0 0 auto; border:1px solid #e2e8f0; border-radius:10px; background:#f8fafc; }
.api-date-preset { height:31px; padding:0 11px; border-radius:7px; color:#64748b; font-size:10.5px; font-weight:700; transition:.16s; }.api-date-preset:hover { color:#4f46e5; background:#eef2ff; }.api-date-preset.active { color:#fff; background:linear-gradient(135deg,#0ea5e9,#6366f1); box-shadow:0 4px 10px rgba(79,70,229,.2); }
.api-date-divider { width:1px; height:34px; flex:0 0 auto; background:#e2e8f0; }
.api-date-fields { display:flex; align-items:flex-end; gap:8px; flex:1; }.api-date-fields label { display:flex; flex-direction:column; gap:4px; flex:1; max-width:190px; color:#64748b; font-size:9px; font-weight:700; }.api-date-fields input { width:100%; height:34px; padding:0 10px; border:1px solid #dbe3ee; border-radius:9px; color:#334155; background:#fff; font:600 11px Consolas,monospace; outline:none; transition:.16s; color-scheme:light; }.api-date-fields input:hover { border-color:#a5b4fc; }.api-date-fields input:focus { border-color:#6366f1; box-shadow:0 0 0 3px rgba(99,102,241,.1); }.api-date-fields b { height:34px; display:flex; align-items:center; color:#94a3b8; font-size:10px; font-weight:500; }
.api-date-actions { display:flex; align-items:center; gap:6px; margin-left:auto; }.api-date-actions button { height:34px; padding:0 12px; border-radius:9px; font-size:10.5px; font-weight:800; transition:.16s; }.api-date-reset { border:1px solid #e2e8f0; color:#64748b; background:#fff; }.api-date-reset:hover { border-color:#cbd5e1; color:#334155; background:#f8fafc; }.api-date-submit { display:flex; align-items:center; gap:6px; color:#fff; background:linear-gradient(135deg,#0ea5e9,#6366f1); box-shadow:0 5px 12px rgba(79,70,229,.2); }.api-date-submit svg { width:13px; height:13px; }.api-date-submit:hover { transform:translateY(-1px); box-shadow:0 7px 16px rgba(79,70,229,.26); }
.api-range-stats[hidden] { display:none; }.api-range-stats { margin-top:16px; }.api-range-stats-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 3px 9px; }.api-range-stats-head>div { display:flex; align-items:center; gap:8px; }.api-range-stats-head i { width:4px; height:18px; border-radius:5px; background:linear-gradient(#8b5cf6,#06b6d4); }.api-range-stats-head strong { color:#0f172a; font-size:12px; }.api-range-stats-head>span { padding:4px 9px; border-radius:999px; color:#4f46e5; background:#e0e7ff; font:700 9.5px Consolas,monospace; }.api-range-stats-grid .api-stat-card { min-height:76px; box-shadow:0 5px 16px rgba(15,23,42,.06); }
.api-list-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:22px 3px 10px; }
.api-list-toolbar>div { display:flex; align-items:center; gap:8px; }.api-list-toolbar i { width:4px; height:18px; border-radius:5px; background:linear-gradient(#06b6d4,#6366f1); }.api-list-toolbar strong { color:#0f172a; font-size:14px; }.api-list-toolbar span,.api-list-toolbar small { color:#94a3b8; font-size:10px; }.api-list-toolbar small { padding:5px 9px; border-radius:999px; background:#e2e8f0; }
.api-logs-table { min-width:1120px; border:1px solid #dbe3ee; border-radius:14px; overflow:hidden; background:#fff; box-shadow:0 5px 18px rgba(15,23,42,.06); }
#apiLogsWrap { overflow-x:auto; }
.api-logs-head,.api-log-row { display:grid; grid-template-columns:34px 170px 170px minmax(150px,1fr) 150px 105px 125px 118px; align-items:center; }
.api-logs-head { min-height:42px; padding:0 10px; color:#64748b; background:#f8fafc; border-bottom:1px solid #e2e8f0; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.07em; }
.api-log-entry { position:relative; border-bottom:1px solid #edf0f3; }
.api-log-entry::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:#cbd5e1; opacity:0; transition:.2s; }.api-log-entry.api-log-success::before { background:#10b981; }.api-log-entry.api-log-failed::before { background:#ef4444; }.api-log-entry.api-log-interrupted::before { background:#f59e0b; }
.api-log-entry:last-child { border-bottom:0; }
.api-log-row { min-height:76px; padding:0 10px; transition:background .15s; }
.api-log-entry:hover::before,.api-log-entry.open::before { opacity:1; }.api-log-entry:hover>.api-log-row,.api-log-entry.open>.api-log-row { background:#f8fbff; }
.api-log-toggle { width:26px; height:26px; display:flex; align-items:center; justify-content:center; border:1px solid #e2e8f0; border-radius:8px; color:#64748b; background:#fff; transition:.18s; }
.api-log-toggle:hover { border-color:#7dd3fc; background:#e0f2fe; color:#0284c7; }
.api-log-toggle svg { width:15px; height:15px; transition:transform .2s; }
.api-log-entry.open .api-log-toggle svg { transform:rotate(90deg); }
.api-log-cell { min-width:0; padding:10px 8px; font-size:12px; color:#334155; }
.api-log-time { display:flex; align-items:flex-start; flex-direction:column; gap:7px; font-family:Consolas,monospace; }
.api-status { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:10px; font:700 9px/1.6 "Microsoft YaHei",sans-serif; }.api-status::before { content:''; width:5px; height:5px; border-radius:50%; background:currentColor; }
.api-status.success { color:#15803d; background:#dcfce7; }.api-status.failed { color:#b91c1c; background:#fee2e2; }.api-status.interrupted { color:#a16207; background:#fef3c7; }
.api-log-key { display:flex; flex-direction:column; gap:5px; }.api-log-key strong { color:#172033; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.api-log-key code { color:#94a3b8; font-size:10px; }
.api-model-pill { display:inline-flex; max-width:100%; padding:6px 9px; border:1px solid #bae6fd; border-radius:8px; color:#075985; background:linear-gradient(135deg,#f0f9ff,#ecfeff); font:700 11px Consolas,monospace; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.api-log-latency { display:flex; flex-direction:column; align-items:flex-start; gap:6px; }.api-time-pair { display:flex; align-items:center; gap:6px; }
.api-time-badge { min-width:53px; display:inline-flex; align-items:baseline; justify-content:center; gap:2px; padding:5px 6px; border-radius:8px; }.api-time-badge b { font-size:12px; }.api-time-badge small { font-size:9px; font-weight:800; opacity:.7; }
.api-time-badge.fast { color:#15803d; background:#dcfce7; }.api-time-badge.medium { color:#b45309; background:#ffedd5; }.api-time-badge.slow { color:#b91c1c; background:#fee2e2; }.api-time-empty { width:53px; text-align:center; color:#94a3b8; }
.api-stream-tag { padding:2px 7px; border-radius:9px; font-size:9px; font-weight:700; }.api-stream-tag.stream { color:#1d4ed8; background:#dbeafe; }.api-stream-tag.normal { color:#64748b; background:#f1f5f9; }
.api-log-points { display:flex; flex-direction:column; gap:2px; }.api-log-points strong { font:700 14px Consolas,monospace; color:#7c3aed; }.api-log-points span { font-size:9px; color:#94a3b8; }
.api-log-cny { font:600 12px Consolas,monospace; color:#0f766e; }.api-log-ip { font:11px Consolas,monospace; color:#64748b; overflow:hidden; text-overflow:ellipsis; }
.api-ip-title { display:flex; align-items:center; gap:5px; overflow:visible; }.api-ip-title i { position:relative; z-index:100; width:15px; height:15px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:#94a3b8; color:#fff; font-size:9px; font-style:normal; cursor:help; outline:none; }.api-ip-title i:after { content:attr(data-tooltip); position:absolute; z-index:101; right:-8px; top:calc(100% + 9px); width:220px; padding:9px 11px; border-radius:8px; background:#172033; color:#fff; font:11px/1.55 "Microsoft YaHei",sans-serif; font-weight:400; box-shadow:0 8px 24px rgba(15,23,42,.2); opacity:0; visibility:hidden; transform:translateY(-4px); pointer-events:none; transition:.15s; }.api-ip-title i:before { content:""; position:absolute; z-index:102; right:3px; top:calc(100% + 4px); border:5px solid transparent; border-bottom-color:#172033; opacity:0; visibility:hidden; transition:.15s; }.api-ip-title i:hover:after,.api-ip-title i:hover:before,.api-ip-title i:focus:after,.api-ip-title i:focus:before { opacity:1; visibility:visible; transform:translateY(0); }
.api-log-detail { display:none; padding:0 18px 18px 44px; background:#f8fafc; border-top:1px solid #e5e7eb; }.api-log-entry.open .api-log-detail { display:block; animation:apiDetailIn .2s ease; }@keyframes apiDetailIn { from { opacity:0; transform:translateY(-4px); } }
.api-detail-head { display:flex; align-items:center; gap:8px; padding:14px 16px 0; border-left:3px solid #38bdf8; color:#0284c7; font:800 10px Consolas,monospace; letter-spacing:.12em; }.api-detail-head small { color:#94a3b8; font:400 10px "Microsoft YaHei",sans-serif; letter-spacing:0; }
.api-detail-grid { display:grid; grid-template-columns:105px minmax(0,1fr); gap:10px 14px; padding:13px 16px 17px; border-left:3px solid #38bdf8; color:#334155; font-size:12px; line-height:1.65; }.api-detail-grid>span { color:#64748b; text-align:right; }.api-detail-grid code { font:11px/1.65 Consolas,monospace; color:#1e293b; overflow-wrap:anywhere; }.api-detail-grid b { color:#0284c7; margin:0 5px; }.api-formula { display:block; padding:10px 12px; border-radius:8px; background:#fff; border:1px solid #dbe3ee; color:#6d28d9!important; box-shadow:inset 3px 0 #8b5cf6; }.api-detail-error { color:#b91c1c; }
.api-token-usage { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.api-cache-rate { display:inline-flex; align-items:center; gap:4px; padding:4px 11px; border-radius:999px; color:#064e3b; background:linear-gradient(135deg,#d1fae5 0%,#86efac 55%,#34d399 100%); border:1px solid rgba(16,185,129,.3); font:600 11px "Microsoft YaHei",sans-serif; letter-spacing:.2px; box-shadow:inset 0 1px 0 rgba(255,255,255,.6), 0 2px 6px rgba(16,185,129,.18); }
.api-cache-rate b { font:700 12px Consolas,monospace; color:#047857; }
.api-logs-pagination { position:sticky; left:0; display:flex; align-items:center; justify-content:center; gap:16px; margin-top:14px; color:#64748b; font-size:11px; }.api-logs-pagination button { padding:8px 15px; border:1px solid #dbe2ea; border-radius:9px; background:#fff; color:#334155; font-weight:700; box-shadow:0 2px 5px rgba(15,23,42,.04); }.api-logs-pagination button:hover:not(:disabled) { border-color:#38bdf8; color:#0284c7; transform:translateY(-1px); }.api-logs-pagination button:disabled { opacity:.4; cursor:not-allowed; }
.api-logs-loading,.api-logs-empty { padding:56px 20px; border:1px dashed #cbd5e1; border-radius:14px; text-align:center; color:#94a3b8; background:rgba(255,255,255,.7); }.api-logs-empty strong,.api-logs-empty span { display:block; }.api-logs-empty strong { margin-bottom:6px; color:#64748b; font-size:13px; }.api-logs-empty span { font:10px Consolas,monospace; }

@media(max-width:1050px) and (min-width:761px){
  .api-date-filter-controls { flex-wrap:wrap; }.api-date-fields { min-width:340px; }.api-date-actions { margin-left:0; }
}
@media(max-width:760px){
  .modal.modal-api-logs { max-width:100%; max-height:94vh; }
  .api-console { padding:0 10px 14px; background:linear-gradient(180deg,#eef8ff 0,#f5f3ff 152px,#f4f7fb 152px); }.api-console-hero { min-height:98px; padding:16px 4px 20px; }.api-console-copy strong { font-size:18px; }.api-console-copy>span { font-size:10px; }.api-console-signal { display:none; }.api-logs-stats { grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:8px; }.api-stat-card { min-height:74px; gap:9px; padding:11px; border-radius:12px; }.api-stat-icon { width:32px; height:32px; }.api-stat-value { font-size:15px; }
  .api-date-filter { padding:12px; }.api-date-filter-head { align-items:flex-start; }.api-date-filter-title>div { display:block; }.api-date-filter-title small { display:block; margin-top:2px; }.api-date-summary { max-width:45%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.api-date-filter-controls { align-items:stretch; flex-direction:column; gap:9px; }.api-date-presets { display:grid; grid-template-columns:repeat(4,1fr); }.api-date-preset { padding:0 5px; }.api-date-divider { display:none; }.api-date-fields { align-items:flex-end; width:100%; }.api-date-fields label { max-width:none; }.api-date-actions { width:100%; margin:0; }.api-date-actions button { flex:1; justify-content:center; }.api-list-toolbar { padding-top:18px; }.api-list-toolbar small { display:none; }
  #apiLogsWrap { overflow:visible; }.api-logs-table { min-width:0; border:0; background:transparent; }.api-logs-head { display:none; }
  .api-log-entry { margin-bottom:10px; border:1px solid #dbe3ee; border-radius:13px; overflow:hidden; background:#fff; box-shadow:0 4px 12px rgba(15,23,42,.05); }
  .api-log-row { display:grid; grid-template-columns:28px 1fr 1fr; min-height:0; padding:10px; align-items:start; }
  .api-log-toggle { grid-row:1/5; }.api-log-cell { padding:7px; }.api-log-cell:before { content:attr(data-label); display:block; margin-bottom:4px; color:#94a3b8; font-size:9px; font-family:"Microsoft YaHei",sans-serif; }
  .api-log-time,.api-log-key { grid-column:span 1; }.api-log-cell[data-label="模型"],.api-log-latency { grid-column:span 2; }.api-log-points,.api-log-cny,.api-log-ip { grid-column:span 1; }
  .api-log-detail { padding:0 10px 12px; }.api-detail-head { border-left:0; border-top:3px solid #38bdf8; padding-left:10px; }.api-detail-grid { grid-template-columns:1fr; gap:5px; border-left:0; }.api-detail-grid>span { margin-top:8px; text-align:left; font-weight:700; }
  .api-token-usage { flex-direction:column; align-items:flex-start; }
}
.qq-panel { text-align:center; }
.qq-hero { position:relative; overflow:hidden; margin:-4px -4px 14px; padding:20px; border:1px solid #bfdbfe; border-radius:18px; background:linear-gradient(135deg,#eff8ff 0%,#eef2ff 54%,#faf5ff 100%); box-shadow:0 14px 32px rgba(59,130,246,.12); isolation:isolate; }
.qq-hero::after { content:''; position:absolute; inset:0; z-index:-1; opacity:.3; background-image:linear-gradient(rgba(99,102,241,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(99,102,241,.08) 1px,transparent 1px); background-size:25px 25px; mask-image:linear-gradient(90deg,#000,transparent 90%); }
.qq-aurora { position:absolute; z-index:-1; border-radius:50%; pointer-events:none; }.qq-aurora-one { width:210px; height:210px; right:-75px; top:-110px; background:radial-gradient(circle,rgba(34,211,238,.28),transparent 68%); }.qq-aurora-two { width:180px; height:180px; left:25%; bottom:-145px; background:radial-gradient(circle,rgba(167,139,250,.28),transparent 68%); }
.qq-verified { width:max-content; display:flex; align-items:center; gap:7px; margin-bottom:15px; color:#0284c7; font:800 9px Consolas,monospace; letter-spacing:.14em; }.qq-verified i { width:7px; height:7px; border-radius:50%; background:#14b8a6; box-shadow:0 0 0 4px rgba(20,184,166,.1),0 0 10px rgba(20,184,166,.45); }
.qq-identity { display:flex; align-items:center; gap:14px; text-align:left; }
.qq-group-icon { position:relative; width:58px; height:58px; flex:0 0 auto; display:flex; align-items:center; justify-content:center; border:4px solid rgba(255,255,255,.85); border-radius:18px; color:#fff; background:linear-gradient(135deg,#0ea5e9,#6366f1); box-shadow:0 0 0 1px rgba(99,102,241,.16),0 8px 20px rgba(79,70,229,.2); }
.qq-group-icon svg { width:29px; height:29px; }.qq-group-icon span { position:absolute; right:-3px; bottom:-3px; width:13px; height:13px; border:3px solid #f2f6ff; border-radius:50%; background:#10b981; box-shadow:0 0 8px rgba(16,185,129,.55); }
.qq-identity-copy { flex:1; min-width:0; }.qq-hero h4 { color:#172033; font-size:19px; font-weight:800; }.qq-hero p { margin-top:4px; color:#64748b; font-size:12px; line-height:1.6; }
.qq-number-box { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:18px; padding:12px 12px 12px 15px; border:1px solid rgba(165,180,252,.7); border-radius:13px; background:rgba(255,255,255,.82); box-shadow:0 5px 18px rgba(79,70,229,.08); backdrop-filter:blur(8px); }
.qq-number-meta { min-width: 0; text-align: left; }
.qq-number-label { display:block; margin-bottom:2px; color:#64748b; font-size:10px; }.qq-number-label b { margin-left:4px; color:#0f766e; font-size:9px; }
.qq-number { display:block; color:#3730a3; font:800 21px/1.35 Consolas,Menlo,monospace; letter-spacing:1px; }
.qq-copy-btn { flex-shrink:0; display:flex; align-items:center; justify-content:center; gap:6px; padding:10px 15px; border-radius:9px; color:#fff; background:linear-gradient(135deg,#0ea5e9,#6366f1); font-size:12px; font-weight:800; box-shadow:0 5px 14px rgba(99,102,241,.22); transition:all .15s; }
.qq-copy-btn svg { width: 15px; height: 15px; }
.qq-copy-btn:hover { transform:translateY(-2px); box-shadow:0 8px 19px rgba(99,102,241,.3); }
.qq-copy-btn.copied { background: #10b981; }
.qq-benefits { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.qq-benefit { padding:13px 9px; border:1px solid #e2e8f0; border-radius:13px; background:#fff; text-align:left; box-shadow:0 4px 12px rgba(15,23,42,.04); transition:.2s; }.qq-benefit:hover { transform:translateY(-2px); border-color:#c7d2fe; box-shadow:0 8px 18px rgba(79,70,229,.08); }
.qq-benefit-icon { width:32px; height:32px; display:grid; place-items:center; margin-bottom:8px; border-radius:9px; color:#0284c7; background:#e0f2fe; }.qq-benefit-help .qq-benefit-icon { color:#7c3aed; background:#f3e8ff; }.qq-benefit-dev .qq-benefit-icon { color:#0f766e; background:#ccfbf1; }.qq-benefit svg { width:17px; height:17px; }.qq-benefit strong { display:block; color:#1e293b; font-size:11.5px; }.qq-benefit span { display:block; margin-top:3px; color:#94a3b8; font-size:9.5px; line-height:1.4; }
.qq-group-tip { display:flex; align-items:center; justify-content:center; gap:7px; margin:13px 4px 0; color:#94a3b8; font-size:10.5px; line-height:1.6; }.qq-group-tip i { width:5px; height:5px; border-radius:50%; background:#10b981; }
@media (max-width: 420px) {
  .qq-number-box { align-items: stretch; flex-direction: column; }
  .qq-copy-btn { width: 100%; }
  .qq-benefits { grid-template-columns:1fr; }.qq-benefit { display:grid; grid-template-columns:32px 1fr; column-gap:9px; }.qq-benefit-icon { grid-row:1/3; margin:0; }.qq-benefit span { grid-column:2; }
}
.login-field { margin-bottom: 14px; }
.login-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.login-field input {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--border); border-radius: 9px;
  font-size: 14px;
  transition: border-color .15s;
}
.login-field input:focus { border-color: var(--primary); }
.auth-tabs {
  display: flex;
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1; padding: 9px;
  border-radius: 7px;
  font-size: 14px; font-weight: 600;
  color: var(--text-secondary);
  transition: all .18s;
}
.auth-tab.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.send-code-btn {
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  color: var(--primary);
  white-space: nowrap;
  transition: all .15s;
}
.send-code-btn:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-light); }
.send-code-btn:disabled { color: var(--text-muted); cursor: not-allowed; }
.captcha-box { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; }
.captcha-box .captcha-input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; letter-spacing: 2px; transition: border-color .15s, box-shadow .15s; }
.captcha-box .captcha-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,233,.12); }
.captcha-img-wrap { position: relative; width: 130px; height: 38px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #0f172a; flex-shrink: 0; cursor: pointer; }
.captcha-img-wrap img { width: 100%; height: 100%; display: block; }
.captcha-refresh { width: 36px; height: 38px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; transition: all .15s; }
.captcha-refresh:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.captcha-refresh svg { width: 15px; height: 15px; }
.form-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.remember-me { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-secondary); cursor: pointer; user-select: none; }
.remember-me input, .auth-agreement input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; flex: 0 0 16px; margin: 0; border: 1.5px solid #cbd5e1; border-radius: 5px; background: #fff; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.remember-me input:hover, .auth-agreement input:hover { border-color: var(--primary); }
.remember-me input:checked, .auth-agreement input:checked { border-color: var(--primary); background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.2 8.2 2.9 2.9 6.7-6.5' fill='none' stroke='white' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px 13px no-repeat; box-shadow: 0 2px 5px rgba(14,165,233,.24); }
.remember-me input:focus-visible, .auth-agreement input:focus-visible { outline: 2px solid rgba(14,165,233,.35); outline-offset: 2px; }
.switch-link { font-size: 13px; color: var(--primary); cursor: pointer; }
.switch-link:hover { text-decoration: underline; }
.form-tip { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 14px; }
.form-tip a { color: var(--primary); cursor: pointer; }
.login-submit {
  width: 100%; padding: 12px;
  background: var(--primary); color: #fff;
  border-radius: 10px; font-size: 15px; font-weight: 600;
  transition: background .15s;
}
.login-submit:hover { background: var(--primary-dark); }
.auth-agreement { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 4px; margin: 13px auto 0; color: var(--text-muted); font-size: 12px; line-height: 1.7; cursor: pointer; user-select: none; text-align: center; }
.auth-agreement input { margin-right: 2px; }
.auth-agreement a { color: var(--primary); white-space: nowrap; }
.auth-agreement a:hover { text-decoration: underline; }
.price-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
  transition: border-color .15s;
}
.price-card:hover { border-color: var(--primary); }
.price-card .pc-name { font-weight: 600; font-size: 15px; }
.price-card .pc-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.price-card .pc-price { font-weight: 700; color: var(--primary); font-size: 16px; }

/* ===== 模型价格窗口 ===== */
.mp-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; padding: 4px 4px 14px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 14px;
}
.mp-title { font-size: 17px; font-weight: 800; color: var(--text); }
.mp-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.mp-legend { display: flex; gap: 8px; flex-wrap: wrap; }
.mp-leg-item {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg-soft); padding: 4px 10px; border-radius: 8px;
  font-size: 11.5px; color: var(--text-muted);
}
.mp-leg-item b { color: var(--primary); font-weight: 700; }
.price-loading { padding: 30px; text-align: center; color: var(--text-muted); font-size: 13px; }
.price-error { padding: 20px; text-align: center; color: #ef4444; font-size: 13px;
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; }

.price-section-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin: 18px 0 10px; display: flex; align-items: center; gap: 8px;
}
.price-section-title:first-child { margin-top: 0; }
.price-section-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}
.price-section-count { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.price-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.model-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px;
  background: #fff;
  transition: all .2s;
}
.model-card:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(14,165,233,.08); }
.mc-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.mc-icon svg { width: 22px; height: 22px; }
.mc-info { flex: 1; min-width: 0; }
.mc-name { font-weight: 700; font-size: 13.5px; color: var(--text);
  display: flex; align-items: center; gap: 6px; }
.mc-name .mc-tag {
  font-size: 9.5px; font-weight: 600;
  padding: 1px 5px; border-radius: 4px;
  background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff;
}
.mc-tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.mc-tag-mini {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: var(--bg-soft); color: var(--text-muted);
}
.mc-tag-mini.acc { background: #d1fae5; color: #047857; }
.mc-tag-mini.mm { background: #ddd6fe; color: #6d28d9; }
.mc-tag-mini.hot { background: #fee2e2; color: #dc2626; }
.mc-price { text-align: right; flex-shrink: 0; }
.mc-pa { font-weight: 800; font-size: 13px; color: var(--primary); }
.mc-pa.out { color: #6366f1; }
.mc-pl { font-size: 9.5px; color: var(--text-muted); margin-top: 1px; }
.mc-call {
  font-weight: 800; font-size: 16px; color: var(--primary); line-height: 1;
}
.mc-call-sub { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* ===== 模型上新 弹窗 ===== */
.nm-head {
  display: flex; align-items: center; gap: 14px;
  margin: -20px -20px 16px;
  padding: 22px 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fbcfe8 100%);
  position: relative;
  overflow: hidden;
}
.nm-head::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(251,191,36,.45), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.nm-head::after {
  content: '';
  position: absolute;
  bottom: -50px; left: -30px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(244,114,182,.25), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.nm-head-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 6px 18px rgba(239,68,68,.35);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  animation: nmPop 0.6s cubic-bezier(.34,1.56,.64,1);
}
@keyframes nmPop { 0% { transform: scale(.5) rotate(-15deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.nm-head-icon svg { width: 26px; height: 26px; }
.nm-head-meta { flex: 1; min-width: 0; position: relative; z-index: 1; }
.nm-head-title { font-size: 18px; font-weight: 800; color: #7c2d12; margin-bottom: 4px; }
.nm-head-sub { font-size: 12.5px; color: #92400e; line-height: 1.5; }
.nm-head-count {
  background: #fff;
  color: #b45309;
  font-size: 12px; font-weight: 800;
  padding: 6px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(120,53,15,.15);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.nm-loading, .nm-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
  font-size: 13.5px;
}
.nm-empty .nm-empty-icon { font-size: 42px; margin-bottom: 8px; opacity: .55; }
.nm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nm-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #fffbeb, #ffffff 60%);
  border: 1px solid #fde68a;
  border-radius: 14px;
  cursor: pointer;
  transition: all .2s ease;
  overflow: hidden;
}
.nm-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(251,191,36,.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transition: transform .3s ease;
}
.nm-card:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245,158,11,.18);
}
.nm-card:hover::before { transform: scale(1.4); }
.nm-card.active {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fef3c7, #fff7ed 60%);
  box-shadow: 0 0 0 3px rgba(245,158,11,.18), 0 8px 22px rgba(245,158,11,.2);
}
.nm-card.active::after {
  content: '✓';
  position: absolute;
  top: 10px; right: 12px;
  width: 22px; height: 22px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  box-shadow: 0 2px 6px rgba(239,68,68,.4);
}
.nm-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
}
.nm-icon svg { width: 24px; height: 24px; display: block; }
.nm-main { flex: 1; min-width: 0; }
.nm-name {
  display: flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.nm-tag-new {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 999px;
  letter-spacing: .5px;
  box-shadow: 0 2px 5px rgba(239,68,68,.35);
}
.nm-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.nm-tags { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.nm-tag {
  font-size: 10px;
  padding: 1.5px 7px;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-weight: 600;
}
.nm-tag-pro { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; }
.nm-tag-mm  { background: #d1fae5; color: #047857; }
.nm-card.active .nm-name { color: #92400e; }

@media (max-width: 600px) {
  .price-grid { grid-template-columns: 1fr; }
  .mp-head { flex-direction: column; align-items: flex-start; }
}

/* ===== 侧栏底部用户区积分盒 ===== */
.user-box { display: flex; align-items: center; gap: 10px; padding: 8px 6px; }
.user-points-box {
  margin-left: auto; text-align: right; padding: 4px 10px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 8px; line-height: 1.2; min-width: 60px;
}
.up-label { font-size: 10px; color: #92400e; font-weight: 600; text-align: center; }
.up-value { font-size: 13px; font-weight: 800; color: #b45309; }

/* ===== 个人中心 ===== */
.modal.modal-profile { max-width:780px; max-height:92vh; border:1px solid #dbe3ee; box-shadow:0 30px 80px rgba(15,23,42,.28); }
.modal.modal-profile .modal-head { background:#f8fafc; }
.modal.modal-profile .modal-body { padding:16px; background:#f4f7fb; }
.profile-card { display:flex; flex-direction:column; gap:14px; }
.profile-hero { position:relative; overflow:hidden; padding:22px; border:1px solid #bfdbfe; border-radius:18px; color:#172033; background:linear-gradient(135deg,#f0f9ff 0%,#eef2ff 52%,#faf5ff 100%); box-shadow:0 14px 32px rgba(59,130,246,.13); isolation:isolate; }
.profile-hero::after { content:''; position:absolute; inset:0; z-index:-1; opacity:.38; background-image:linear-gradient(rgba(99,102,241,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(99,102,241,.08) 1px,transparent 1px); background-size:28px 28px; mask-image:linear-gradient(90deg,#000,transparent 78%); }
.profile-glow { position:absolute; z-index:-1; border-radius:50%; filter:blur(4px); pointer-events:none; }.profile-glow-one { width:260px; height:260px; right:-90px; top:-130px; background:radial-gradient(circle,rgba(34,211,238,.3),transparent 68%); }.profile-glow-two { width:220px; height:220px; left:34%; bottom:-180px; background:radial-gradient(circle,rgba(167,139,250,.28),transparent 68%); }
.profile-head { display:flex; align-items:center; gap:14px; position:relative; }
.profile-avatar {
  position:relative; width:64px; height:64px; border-radius:50%;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800;
  box-shadow:0 0 0 4px rgba(255,255,255,.8),0 0 0 5px rgba(99,102,241,.18),0 8px 20px rgba(79,70,229,.18);
  flex-shrink:0; overflow:visible;
  background: transparent;
}
.profile-avatar svg { display:block; width:100%; height:100%; border-radius:50%; overflow:hidden; }
.profile-online-dot { position:absolute; right:-1px; bottom:2px; width:14px; height:14px; border:3px solid #f3f7ff; border-radius:50%; background:#14b8a6; box-shadow:0 0 0 2px rgba(20,184,166,.14),0 0 9px rgba(20,184,166,.55); }
.profile-meta { flex: 1; min-width: 0; }
.profile-eyebrow { margin-bottom:4px; color:#0284c7; font:800 9px/1.2 Consolas,monospace; letter-spacing:.16em; }
.profile-name { display:flex; align-items:center; gap:8px; color:#172033; font-size:20px; font-weight:800; }
.profile-name span { padding:2px 7px; border:1px solid #99f6e4; border-radius:999px; color:#0f766e; background:rgba(204,251,241,.78); font-size:9px; }
.profile-id { display:flex; align-items:center; gap:7px; margin-top:5px; color:#64748b; font-size:11px; word-break:break-all; }.profile-id b { color:#7c3aed; font-family:Consolas,monospace; }.profile-id span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-status { display:flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid #bae6fd; border-radius:999px; color:#0f766e; background:rgba(255,255,255,.7); font-size:10px; box-shadow:0 4px 12px rgba(14,165,233,.08); }.profile-status i { width:6px; height:6px; border-radius:50%; background:#10b981; box-shadow:0 0 8px rgba(16,185,129,.55); }

.profile-points-card {
  display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-top:22px; padding-top:18px; color:#172033; position:relative; border-top:1px solid rgba(99,102,241,.14);
}
.ppc-label { display:flex; align-items:center; gap:7px; color:#64748b; font:700 9px Consolas,monospace; letter-spacing:.12em; }.ppc-gem { color:#06b6d4; }
.ppc-value { margin:5px 0 2px; color:#3730a3; font:800 34px/1.1 ui-monospace,Consolas,monospace; letter-spacing:-1.5px; text-shadow:0 5px 20px rgba(99,102,241,.14); }
.ppc-hint { color:#64748b; font-size:10px; }
.ppc-actions { display: flex; gap: 8px; }
.ppc-btn {
  padding:9px 14px; border-radius:9px; font-size:11.5px; font-weight:800;
  border:1px solid rgba(255,255,255,.22); cursor:pointer; transition:all .2s;
}
.ppc-btn.primary { color:#fff; border-color:#6366f1; background:linear-gradient(135deg,#0ea5e9,#6366f1); box-shadow:0 5px 16px rgba(99,102,241,.2); }
.ppc-btn.primary:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(99,102,241,.3); }
.ppc-btn.ghost { border-color:#c7d2fe; background:rgba(255,255,255,.72); color:#4f46e5; }
.ppc-btn.ghost:hover { background:#fff; border-color:#818cf8; }

.profile-section-label { display:flex; align-items:center; gap:10px; padding:2px 3px 0; color:#334155; font-size:12px; font-weight:800; }.profile-section-label i { flex:1; height:1px; background:linear-gradient(90deg,#dbe3ee,transparent); }
.profile-info-grid {
  display:grid; grid-template-columns:repeat(3,1fr); gap:9px;
}
.pig-item {
  min-width:0; display:flex; align-items:center; gap:10px; padding:12px; border:1px solid #e2e8f0; border-radius:12px; background:#fff; box-shadow:0 3px 10px rgba(15,23,42,.035); transition:.2s;
}
.pig-item:hover { transform:translateY(-2px); border-color:#bae6fd; box-shadow:0 8px 18px rgba(14,165,233,.08); }
.pig-icon { width:30px; height:30px; flex:0 0 auto; display:grid; place-items:center; border-radius:9px; color:#0284c7; background:#e0f2fe; font:800 12px Consolas,monospace; }.pig-nick .pig-icon { color:#7c3aed; background:#f3e8ff; }.pig-email .pig-icon { color:#0d9488; background:#ccfbf1; }.pig-date .pig-icon { color:#d97706; background:#fef3c7; }.pig-active .pig-icon { color:#059669; background:#d1fae5; }.pig-id .pig-icon { color:#475569; background:#e2e8f0; }
.pig-item>div:last-child { min-width:0; }
.pig-label { margin-bottom:2px; font-size:9px; color:#94a3b8; text-transform:uppercase; letter-spacing:.06em; }
.pig-value { overflow:hidden; color:#1e293b; font-size:11.5px; font-weight:700; word-break:break-all; text-overflow:ellipsis; }

.profile-logs {
  border:1px solid #dbe3ee; border-radius:15px; padding:14px; background:#fff; box-shadow:0 5px 15px rgba(15,23,42,.04);
}
.pl-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; flex-wrap:wrap; gap:10px; }
.pl-title { display:flex; align-items:center; gap:9px; color:#0f172a; }.pl-title-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:9px; color:#fff; background:linear-gradient(135deg,#06b6d4,#6366f1); font-size:16px; box-shadow:0 4px 10px rgba(99,102,241,.2); }.pl-title strong { display:block; font-size:13px; }.pl-title small { display:block; margin-top:1px; color:#94a3b8; font-size:9px; font-weight:400; }
.pl-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.pl-filter {
  padding:5px 10px; border:1px solid #e2e8f0; border-radius:8px;
  background:#f8fafc; color:#64748b; font-size:10px; cursor:pointer; transition:all .2s;
}
.pl-filter:hover { color: var(--primary); }
.pl-filter.active {
  color:#fff; border-color:#0ea5e9; background:linear-gradient(135deg,#0ea5e9,#6366f1); box-shadow:0 3px 9px rgba(14,165,233,.2);
}
.pl-list { display:flex; flex-direction:column; gap:5px; max-height:320px; overflow-y:auto; scrollbar-width:thin; scrollbar-color:#cbd5e1 transparent; }
.pl-pager {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border);
  gap: 8px;
}
.pl-page-btn {
  padding: 5px 12px; font-size: 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg-soft);
  color: var(--text-secondary); cursor: pointer; transition: all .15s;
}
.pl-page-btn:hover:not(:disabled) {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.pl-page-btn:disabled { opacity: .4; cursor: not-allowed; }
.pl-page-info { font-size: 12px; color: var(--text-muted); }
.pl-loading, .pl-empty {
  padding: 22px; text-align: center; color: var(--text-muted); font-size: 12.5px;
}
.pl-row {
  display: grid; grid-template-columns: 32px 1fr auto auto; gap: 10px; align-items: center;
  padding:9px 8px; border:1px solid transparent; border-bottom-color:#edf2f7; border-radius:9px; transition:.15s;
}
.pl-row:hover { border-color:#dbeafe; background:#f8fbff; }
.pl-row:last-child { border-bottom: none; }
.pl-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.pl-memo { font-size: 13px; color: var(--text); font-weight: 600; }
.pl-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pl-amount { font-size: 14px; font-weight: 800; text-align: right; }
.pl-after { font-size: 11px; color: var(--text-muted); text-align: right; min-width: 80px; }

.profile-logout {
  width:auto; align-self:center; padding:8px 22px !important; margin-top:0 !important; border-radius:9px !important; background:transparent !important; color:#94a3b8 !important; border:1px solid #dbe3ee !important; font-size:11px !important;
}
.profile-logout:hover { color:#dc2626 !important; border-color:#fecaca !important; background:#fef2f2 !important; }

@media (max-width: 700px) {
  .modal.modal-profile .modal-body { padding:10px; }.profile-hero { padding:17px; border-radius:15px; }.profile-status { display:none; }.profile-points-card { align-items:flex-start; flex-direction:column; gap:13px; margin-top:17px; }.ppc-actions { width:100%; }.ppc-btn { flex:1; }.profile-info-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 480px) {
  .profile-avatar { width:54px; height:54px; border-radius:50%; }.profile-avatar svg { border-radius:50%; }.profile-name { font-size:17px; }.profile-id span { max-width:170px; }.ppc-value { font-size:29px; }.profile-info-grid { grid-template-columns:1fr; }.pig-item { padding:10px; }
  .pl-row { grid-template-columns: 28px 1fr auto; }
  .pl-after { display: none; }
}

/* ===== 积分购买窗口 ===== */
.points-purchase { margin:-20px; padding:0 20px 20px; background:linear-gradient(180deg,#f8fbff 0,#f4f7fb 190px,#fff 190px); }
.points-recharge-alert + .points-purchase { margin-top:0; }
.points-recharge-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin:0 0 14px;
  padding: 10px 12px;
  color: #b45309;
  border: 1px solid #fed7aa;
  border-radius: 9px;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  font-size: 13px;
}
.points-recharge-alert span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #fff;
  border-radius: 50%;
  background: #f59e0b;
  font: 800 12px/1 Arial, sans-serif;
}
.points-head {
  position:relative; isolation:isolate; overflow:hidden;
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  padding:23px 22px;
  margin:0 -20px 18px;
  background:linear-gradient(135deg,#eff8ff 0%,#eef2ff 54%,#faf5ff 100%);
  border-bottom:1px solid #c7d2fe;
}
.points-head::after { content:''; position:absolute; inset:0; z-index:-1; opacity:.28; background-image:linear-gradient(rgba(99,102,241,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(99,102,241,.08) 1px,transparent 1px); background-size:26px 26px; mask-image:linear-gradient(90deg,#000,transparent 84%); }
.points-head-glow { position:absolute; z-index:-1; border-radius:50%; pointer-events:none; }.points-head-glow-one { width:220px; height:220px; right:-75px; top:-120px; background:radial-gradient(circle,rgba(34,211,238,.26),transparent 68%); }.points-head-glow-two { width:190px; height:190px; left:35%; bottom:-155px; background:radial-gradient(circle,rgba(167,139,250,.26),transparent 68%); }
.points-head-copy { min-width:0; }.points-head-kicker { width:max-content; display:flex; align-items:center; gap:7px; margin-bottom:6px; color:#0284c7; font:800 9px Consolas,monospace; letter-spacing:.15em; }.points-head-kicker i { width:7px; height:7px; border-radius:50%; background:#14b8a6; box-shadow:0 0 0 4px rgba(20,184,166,.1),0 0 10px rgba(20,184,166,.45); }
.points-head-title {
  color:#172033; font-size:20px; font-weight:800; letter-spacing:-.4px;
}
.points-head-sub { margin-top:4px; color:#64748b; font-size:11px; }
.points-balance {
  flex:0 0 auto; display:flex; align-items:center; gap:10px; min-width:150px;
  text-align:left; background:rgba(255,255,255,.76); border:1px solid rgba(165,180,252,.7);
  border-radius:14px; padding:10px 13px; box-shadow:0 7px 18px rgba(79,70,229,.09); backdrop-filter:blur(8px);
}
.pb-icon { width:34px; height:34px; flex:0 0 auto; display:grid; place-items:center; border-radius:10px; color:#fff; background:linear-gradient(135deg,#0ea5e9,#6366f1); box-shadow:0 4px 12px rgba(99,102,241,.2); }
.points-balance .pb-label { color:#94a3b8; font:700 8px Consolas,monospace; letter-spacing:.09em; }
.points-balance .pb-value { margin-top:3px; color:#3730a3; font:800 18px/1 Consolas,monospace; }
.points-section-title,.pay-method-title { display:flex; align-items:center; justify-content:space-between; margin:0 2px 10px; }.points-section-title>div,.pay-method-title>div { display:flex; align-items:center; gap:8px; }.points-section-title>div>span,.pay-method-title>div>span { display:grid; place-items:center; width:25px; height:25px; border-radius:8px; color:#fff; background:linear-gradient(135deg,#0ea5e9,#6366f1); font:800 9px Consolas,monospace; }.points-section-title strong,.pay-method-title strong { color:#1e293b; font-size:12px; }.points-section-title small,.pay-method-title small { color:#94a3b8; font-size:9.5px; font-weight:500; }

.points-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.points-card {
  position: relative;
  border:1px solid #dbe3ee;
  border-radius:15px;
  padding:17px 12px 14px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  box-shadow:0 4px 14px rgba(15,23,42,.04); transition:all .22s ease;
  overflow: hidden;
}
.points-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:linear-gradient(145deg,rgba(14,165,233,.07),rgba(139,92,246,.06));
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.points-card:hover { transform:translateY(-3px); box-shadow:0 11px 25px rgba(79,70,229,.11); border-color:#a5b4fc; }
.points-card:hover::before { opacity: 1; }
.points-card.active {
  border-color:#6366f1;
  background:linear-gradient(145deg,#eff8ff 0%,#f5f3ff 52%,#fff 100%);
  box-shadow:0 0 0 3px rgba(99,102,241,.11),0 11px 26px rgba(79,70,229,.14);
}
.points-card.active::before { opacity: 1; }
.pc-selected { position:absolute; left:9px; top:9px; width:19px; height:19px; display:grid; place-items:center; border:1px solid #cbd5e1; border-radius:50%; color:transparent; background:#fff; transition:.2s; z-index:2; }.pc-selected svg { width:12px; height:12px; }.points-card.active .pc-selected { color:#fff; border-color:#6366f1; background:linear-gradient(135deg,#0ea5e9,#6366f1); box-shadow:0 3px 9px rgba(99,102,241,.28); }
.pc-icon {
  width: 38px; height: 38px;
  margin: 0 auto 10px;
  border-radius:12px; background:linear-gradient(135deg,#e0f2fe,#e0e7ff); color:#4f46e5;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.points-card.active .pc-icon {
  background:linear-gradient(135deg,#0ea5e9,#6366f1);
  color: #fff;
  box-shadow:0 5px 14px rgba(99,102,241,.28);
  transform: scale(1.05);
}
.pc-icon svg { width: 20px; height: 20px; }
.pc-kicker { margin-bottom:3px; color:#a5b4fc; font:700 7.5px Consolas,monospace; letter-spacing:.1em; }
.pc-points {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  letter-spacing: -.3px;
}
.pc-base {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  min-height: 16px;
  white-space: nowrap;
}
.pc-base .pc-bonus {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  color:#b45309; border:1px solid #fde68a; background:linear-gradient(135deg,#fffbeb,#fef3c7);
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
}
.pc-price {
  display:flex; align-items:baseline; justify-content:center; gap:5px; color:#4f46e5;
}
.pc-price span { font-size:22px; font-weight:800; letter-spacing:-.5px; line-height:1; }.pc-price span::before {
  content: '¥';
  font-size: 14px;
  margin-right: 1px;
  opacity: .75;
  font-weight: 700;
}
.pc-price small { color:#94a3b8; font-size:8px; font-weight:500; }
.pc-tag {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 11px;
  background:linear-gradient(135deg,#f59e0b,#f97316);
  color: #fff;
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(245,158,11,.45);
  letter-spacing: .5px;
  z-index: 3;
}
.points-card.active .pc-tag {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 3px 10px rgba(239,68,68,.5);
}
.points-loading, .points-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 13.5px;
}
.points-error { color: #ef4444; }
.pay-method-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin:18px 2px 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}
.pay-method-title small { display:flex; align-items:center; gap:6px; }.pay-method-title small i { width:5px; height:5px; border-radius:50%; background:#10b981; box-shadow:0 0 7px rgba(16,185,129,.5); }
.pay-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pay-method {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding:12px;
  color: var(--text);
  border:1px solid #dbe3ee; border-radius:13px;
  background: #fff;
  text-align: left;
  transition: border-color .18s, box-shadow .18s, background .18s, transform .18s;
}
.pay-method:hover { transform:translateY(-2px); border-color:#a5b4fc; box-shadow:0 8px 18px rgba(79,70,229,.08); }
.pay-method.active.wxpay { border-color:#16a34a; background:linear-gradient(135deg,#f0fdf4,#fff); box-shadow:0 0 0 3px rgba(34,197,94,.08),0 7px 17px rgba(22,163,74,.07); }
.pay-method.active.alipay { border-color:#1677ff; background:linear-gradient(135deg,#eff6ff,#fff); box-shadow:0 0 0 3px rgba(22,119,255,.08),0 7px 17px rgba(22,119,255,.07); }
.pay-method-icon { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; }
.pay-method-icon svg { width: 27px; height: 27px; }
.wxpay-icon { background: linear-gradient(135deg, #22c55e, #09bb07); }
.alipay-icon { background: linear-gradient(135deg, #2897ff, #1677ff); }
.pay-method-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 2px; }
.pay-method-copy strong { color: var(--text); font-size: 13px; white-space: nowrap; }
.pay-method-copy small { color: var(--text-muted); font-size: 10.5px; }
.pay-method-copy em { margin-left: 3px; padding: 2px 5px; color: #7c3aed; border-radius: 5px; background: #ede9fe; font-size: 9px; font-style: normal; font-weight: 750; vertical-align: 1px; }
.pay-method-check { display: grid; place-items: center; flex: 0 0 auto; width: 18px; height: 18px; color: #fff; border: 1.5px solid #cbd5e1; border-radius: 50%; background: #fff; }
.pay-method-check svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pay-method.active.wxpay .pay-method-check { border-color: #16a34a; background: #16a34a; }
.pay-method.active.alipay .pay-method-check { border-color: #1677ff; background: #1677ff; }
.pay-btn {
  width: 100%;
  margin-top:18px; padding:14px; background:linear-gradient(135deg,#0ea5e9,#6366f1);
  color: #fff;
  border-radius:12px;
  font-size: 15px;
  font-weight: 700;
  box-shadow:0 7px 18px rgba(99,102,241,.25);
  transition: all .15s;
  letter-spacing: .5px;
}
.pay-btn:hover:not(:disabled) { transform:translateY(-2px); box-shadow:0 10px 24px rgba(99,102,241,.34); }
.pay-btn.alipay { background: linear-gradient(135deg, #2897ff, #1677ff); box-shadow: 0 4px 14px rgba(22,119,255,.32); }
.pay-btn.alipay:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(22,119,255,.42); }
.pay-btn:active:not(:disabled) { transform: scale(.99); }
.pay-btn:disabled { background: linear-gradient(135deg, #d1d5db, #9ca3af); box-shadow: none; cursor: not-allowed; }
.points-secure-tip { display:flex; align-items:flex-start; justify-content:center; gap:7px; margin:11px auto 0; max-width:610px; color:#94a3b8; font-size:9.5px; line-height:1.55; text-align:left; }.points-secure-tip svg { width:14px; height:14px; flex:0 0 auto; margin-top:1px; color:#10b981; }
/* ===== 邀请返利 ===== */
.referral-banner {
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  margin:-20px -20px 18px;
  padding:22px 24px;
  border-bottom:1px solid #c7d2fe;
  background:linear-gradient(135deg,#eff8ff 0%,#eef2ff 52%,#faf5ff 100%);
  color:#172033;
  position: relative;
  overflow: hidden;
}
.referral-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background:radial-gradient(circle,rgba(34,211,238,.25),transparent 70%);
  border-radius: 50%;
}
.referral-banner::after { content:''; position:absolute; left:38%; bottom:-100px; width:180px; height:180px; border-radius:50%; background:radial-gradient(circle,rgba(167,139,250,.25),transparent 70%); }
.rb-copy { position:relative; z-index:1; min-width:0; }
.rb-tag {
  width:max-content; display:flex; align-items:center; gap:7px;
  font-size: 11px;
  padding: 3px 10px;
  color:#0284c7;
  background:rgba(255,255,255,.68);
  border:1px solid #bae6fd;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.rb-tag i { width:6px; height:6px; border-radius:50%; background:#14b8a6; box-shadow:0 0 8px rgba(20,184,166,.5); }
.rb-title { color:#172033; font-size:20px; font-weight:800; margin-bottom:4px; letter-spacing:-.4px; }
.rb-sub { color:#64748b; font-size:12px; line-height:1.55; }
.rb-rate { position:relative; z-index:1; min-width:96px; padding:10px 14px; border:1px solid rgba(165,180,252,.7); border-radius:14px; background:rgba(255,255,255,.72); text-align:center; box-shadow:0 7px 18px rgba(79,70,229,.1); backdrop-filter:blur(8px); }.rb-rate strong { display:block; color:#4f46e5; font:900 31px/1 Consolas,monospace; letter-spacing:-2px; }.rb-rate strong small { font-size:15px; letter-spacing:0; }.rb-rate span { display:block; margin-top:4px; color:#64748b; font-size:9px; font-weight:700; letter-spacing:.08em; }

/* 未登录态 */
.referral-empty {
  text-align: center;
  padding: 36px 0 16px;
}
.re-icon-ring {
  width: 76px; height: 76px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0f2fe, #cffafe);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.re-icon-ring::before {
  content: '';
  position: absolute; inset: -8px;
  border: 2px dashed #93c5fd;
  border-radius: 50%;
  animation: spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.re-icon-ring svg { width: 32px; height: 32px; color: var(--primary); }
.re-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.re-desc { font-size: 13.5px; color: var(--text-muted); margin-bottom: 18px; }
.re-login-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(14,165,233,.35);
  transition: all .15s;
}
.re-login-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(14,165,233,.5); }

/* 已登录态 */
.referral-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.rs-card {
  display:flex; align-items:center; gap:11px;
  min-width:0; text-align:left;
  padding:13px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:13px;
  box-shadow:0 4px 12px rgba(15,23,42,.04);
  transition:.2s;
}
.rs-card:hover { transform:translateY(-2px); border-color:#c7d2fe; box-shadow:0 8px 18px rgba(79,70,229,.08); }
.rs-icon { width:36px; height:36px; flex:0 0 auto; display:grid; place-items:center; border-radius:10px; color:#0284c7; background:#e0f2fe; }.rs-icon svg { width:18px; height:18px; }.rs-icon-chat { color:#7c3aed; background:#f3e8ff; }.rs-icon-reward { color:#0f766e; background:#ccfbf1; }
.rs-card .rs-value {
  font-size:20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  letter-spacing: -.5px;
}
.rs-card .rs-value small { font-size: 12px; font-weight: 600; -webkit-text-fill-color: var(--text-muted); }
.rs-card .rs-label { margin-bottom:3px; color:#94a3b8; font-size:9px; letter-spacing:.04em; }

/* 邀请链接卡片 */
.link-card {
  border:1px solid #dbe3ee;
  border-radius:14px;
  padding:15px;
  background: #fff;
  margin-bottom: 16px;
}
.link-card-highlight {
  background:linear-gradient(135deg,#f8fbff,#f5f3ff);
  border:1px solid #c7d2fe;
  box-shadow:0 6px 18px rgba(79,70,229,.08);
}
.link-card .lc-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.link-card .lc-label small { color:#a5b4fc; font:700 8px Consolas,monospace; letter-spacing:.12em; }.link-card .lc-label-icon { display:inline-grid; place-items:center; width:22px; height:22px; margin-right:5px; border-radius:7px; color:#fff; background:linear-gradient(135deg,#0ea5e9,#6366f1); font-size:12px; }
.link-card .lc-code {
  color: var(--primary) !important;
  background: #fff !important;
  border: 1px solid #7dd3fc;
  padding: 3px 10px !important;
  border-radius: 6px !important;
  font-size: 11.5px !important;
  font-family: Consolas, monospace;
}
.link-card .link-meta {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.link-card .link-meta-sep { margin: 0 4px; color: #cbd5e1; }
.link-row { display: flex; gap: 8px; }
.link-input-wrap {
  flex: 1;
  display: flex;
  background: #fff;
  border:1px solid #c7d2fe;
  border-radius: 9px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.link-input-wrap:focus-within { border-color:#818cf8; box-shadow:0 0 0 3px rgba(99,102,241,.12); }
.link-row input {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: none;
  font-size: 12.5px;
  color: var(--text);
  font-family: Consolas, Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  user-select: all;
  outline: none;
}
.link-row input:focus { border-color: var(--primary); background: #fff; }
.copy-btn-primary {
  padding: 0 16px;
  background:linear-gradient(135deg,#0ea5e9,#6366f1);
  color: #fff;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  transition: all .15s;
  flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
}
.copy-btn-primary:hover { transform:translateY(-2px); box-shadow:0 6px 15px rgba(99,102,241,.3); }
.copy-btn-primary.copied { background: linear-gradient(135deg, #10b981, #059669); }
.share-btn.copied { background: linear-gradient(135deg, #10b981, #059669) !important; color: #fff !important; }
.share-btn.copied svg { stroke: #fff; }

/* 规则区 */
.rules-card {
  background:linear-gradient(135deg,#f8fafc,#f0f9ff);
  border:1px solid #dbeafe;
  border-radius:14px;
  padding:14px 15px;
  margin-bottom: 14px;
}
.rules-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color:#1e293b;
  margin-bottom: 8px;
}
.rules-title>span { width:28px; height:28px; display:grid; place-items:center; border-radius:9px; color:#fff; background:linear-gradient(135deg,#06b6d4,#6366f1); font:800 13px Georgia,serif; }.rules-title strong,.rules-title small { display:block; }.rules-title small { margin-top:1px; color:#94a3b8; font-size:9px; font-weight:400; }
.rules-list { list-style: none; padding: 0; margin: 0; }
.rules-list li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  color:#475569;
  line-height: 1.7;
  margin-bottom: 3px;
}
.rules-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color:#0ea5e9;
  font-weight: 800;
}
.rules-list li b { color:#4f46e5; font-weight:800; }
.rules-list li:last-child { margin-bottom: 0; }

/* 分享按钮 */
.share-row { display: flex; gap: 8px; }
.share-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px;
  border:1px solid #dbe3ee;
  border-radius:11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background:#fff;
  box-shadow:0 3px 9px rgba(15,23,42,.035);
  transition: all .15s;
}
.share-btn:hover { transform:translateY(-2px); border-color:#a5b4fc; color:#4f46e5; background:#f5f3ff; box-shadow:0 7px 15px rgba(79,70,229,.1); }
.share-btn svg { width: 16px; height: 16px; }

@media (max-width: 600px) {
  .referral-banner { align-items:flex-start; margin:-16px -16px 15px; padding:18px 16px; }
  .rb-title { font-size:17px; }
  .rb-sub { max-width:230px; font-size:10.5px; }
  .rb-rate { min-width:76px; padding:9px 10px; }
  .rb-rate strong { font-size:25px; }
  .referral-stats { grid-template-columns:1fr; gap:8px; }
  .rs-card { padding:11px 12px; }
  .link-row { flex-direction:column; }
  .copy-btn-primary { min-height:40px; justify-content:center; }
  .link-card .lc-label small { display:none; }
  .share-row { flex-direction:column; }
}

@media (max-width: 390px) {
  .referral-banner { gap:10px; }
  .rb-rate { min-width:68px; }
  .rb-rate strong { font-size:22px; }
  .rb-sub { max-width:190px; }
}

/* ====== 进入首页公告 ====== */
.announce-mask {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  animation: annFadeIn .25s ease-out;
}
.announce-mask.show { display: flex; }
@keyframes annFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes annScaleIn { from { opacity: 0; transform: scale(.92) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.announce-box {
  position: relative;
  width: min(560px, 100%);
  max-height: 88vh;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.3), 0 8px 16px rgba(0,0,0,.12);
  animation: annScaleIn .35s cubic-bezier(.22,.61,.36,1);
  display: flex;
  flex-direction: column;
}

.announce-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all .15s;
}
.announce-close:hover { background: rgba(255,255,255,.35); transform: rotate(90deg); }
.announce-close svg { width: 18px; height: 18px; }

.announce-head {
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #6366f1 100%);
  padding: 28px 60px 26px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}
.announce-head::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(255,255,255,.18) 0%, transparent 50%);
  pointer-events: none;
}
.announce-head::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 10% 90%, rgba(255,255,255,.12) 0%, transparent 40%);
  pointer-events: none;
}
.announce-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
  backdrop-filter: blur(6px);
  position: relative; z-index: 1;
}
.announce-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  line-height: 1.3;
  position: relative; z-index: 1;
  word-break: break-word;
  overflow-wrap: break-word;
}
.announce-subtitle {
  font-size: 13px;
  opacity: .9;
  margin: 0;
  line-height: 1.5;
  position: relative; z-index: 1;
}

.announce-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.announce-section {
  display: flex;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: all .15s;
}
.announce-section:hover { border-color: #cbd5e1; }
.announce-section:last-child { margin-bottom: 0; }

.announce-section-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.announce-icon-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.announce-icon-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.announce-icon-green { background: linear-gradient(135deg, #10b981, #059669); }
.announce-icon-red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.announce-icon-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.announce-section-icon svg { width: 20px; height: 20px; }

.announce-section-content { flex: 1; min-width: 0; }
.announce-section-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.announce-section-desc {
  font-size: 12.5px;
  line-height: 1.65;
  color: #475569;
}
.announce-section-desc strong { color: var(--text); font-weight: 700; }
.announce-section-desc b { color: var(--primary); font-weight: 700; }

.announce-section-warn {
  background: linear-gradient(135deg, #fef2f2, #fff7ed);
  border-color: #fecaca;
}
.announce-section-warn .announce-section-title { color: #b91c1c; }

.announce-section-highlight {
  background: linear-gradient(135deg, #f5f3ff, #eff6ff);
  border-color: #c7d2fe;
}
.announce-section-highlight .announce-section-title { color: #6d28d9; }

.announce-highlights {
  list-style: none;
  margin: 6px 0 2px;
  padding: 0;
}
.announce-highlights li {
  padding: 3px 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: #334155;
}

.announce-rules {
  list-style: none;
  margin: 8px 0;
  padding: 0;
}
.announce-rules li {
  padding: 3px 0;
  font-size: 12px;
  line-height: 1.6;
  color: #475569;
}

.announce-qq {
  font-family: Consolas, Menlo, monospace;
  font-size: 14px;
  color: #b91c1c !important;
  background: #fff1f2;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid #fecdd3;
  margin-right: 6px;
}
.announce-copy-btn {
  display: inline-block;
  padding: 3px 9px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.announce-copy-btn:hover { background: var(--primary); color: #fff; }
.announce-copy-btn.copied { background: #10b981; color: #fff; border-color: #10b981; }

.announce-footer {
  padding: 14px 22px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
}
.announce-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
}
.announce-checkbox input { width: 14px; height: 14px; cursor: pointer; accent-color: var(--primary); }
.announce-ok-btn {
  padding: 9px 22px;
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(14,165,233,.35);
  transition: all .15s;
}
.announce-ok-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(14,165,233,.5); }
.announce-ok-btn:active { transform: translateY(0); }

@media (max-width: 540px) {
  .announce-mask { align-items: center; padding: 12px; }
  .announce-box { max-height: calc(100dvh - 24px); border-radius: 15px; }
  .announce-head { padding: 18px 52px 17px 18px; }
  .announce-badge { margin-bottom: 7px; padding: 3px 8px; font-size: 10px; }
  .announce-title { font-size: 18px; line-height: 1.28; margin-bottom: 4px; }
  .announce-subtitle { font-size: 11px; line-height: 1.45; }
  .announce-close { top: 11px; right: 11px; width: 30px; height: 30px; }
  .announce-body { padding: 12px 14px; }
  .announce-footer { padding: 12px 16px; flex-wrap: wrap; }
}

/* ====== FishCode VS Code 插件上线弹窗 ====== */
.fish-mask { z-index: 10000; }
.fish-head {
  background: linear-gradient(135deg, #22c55e 0%, #10b981 50%, #0ea5e9 100%);
}
.fish-hero {
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  border-color: #a7f3d0;
}
.fish-hero .announce-section-title { color: #047857; }
.fish-use-section { background: #fffdf5; border-color: #fde68a; }
.fish-use-section .announce-section-title { color: #9a6700; }
.fish-use-steps { display: flex; flex-wrap: wrap; gap: 6px 12px; color: #6b5b2a; font-size: 11.5px; line-height: 1.55; }
.fish-use-steps span { display: inline-flex; align-items: center; gap: 5px; }
.fish-use-steps b { display: inline-grid; place-items: center; width: 17px; height: 17px; color: #fff; border-radius: 50%; background: #d99a00; font-size: 10px; }
.fish-link-section { align-items: flex-start; }
.fish-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.fish-link {
  font-family: Consolas, Menlo, monospace;
  font-size: 11.5px;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary);
  padding: 5px 9px;
  border-radius: 6px;
  word-break: break-all;
  text-decoration: none;
  transition: all .15s;
}
.fish-link:hover { background: var(--primary); color: #fff; }
.fish-install-tip {
  margin-top: 9px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}
.fish-install-tip b { color: #334155; }
.fish-footer { justify-content: space-between; }
.fish-skip-btn {
  padding: 9px 22px;
  background: #fff;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.fish-skip-btn:hover { background: #f1f5f9; color: #334155; }
.fish-skip-btn:active { transform: translateY(0); }

/* Mobile points purchase layout: preserve the desktop three-column pricing cards above. */
@media (max-width: 540px) {
  .modal.modal-wide { max-width: 100%; max-height: 92dvh; }
  .modal.modal-points { max-height:96dvh; }
  .modal.modal-wide .modal-body { padding: 16px; }
  .points-purchase { margin:-16px; padding:0 16px 16px; }
  .points-recharge-alert + .points-purchase { margin-top:0; }
  .points-head { margin:0 -16px 14px; padding:16px; gap:10px; }
  .points-head-kicker { margin-bottom:4px; font-size:8px; }
  .points-head-title { font-size:17px; }
  .points-head-sub { max-width:210px; font-size:9.5px; line-height:1.4; }
  .points-balance { min-width:112px; gap:7px; padding:8px; }
  .pb-icon { width:28px; height:28px; border-radius:8px; font-size:11px; }
  .points-balance .pb-label { font-size:6.5px; }
  .points-balance .pb-value { font-size:14px; }
  .points-section-title small { display:none; }
  .points-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .points-card { min-width: 0; padding: 15px 9px 13px; border-radius: 13px; }
  .pc-icon { width: 34px; height: 34px; margin-bottom: 8px; border-radius: 10px; }
  .pc-icon svg { width: 18px; height: 18px; }
  .pc-points { margin-bottom: 5px; font-size: 16px; }
  .pc-base { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; min-height: 32px; margin-bottom: 11px; font-size: 11px; white-space: normal; line-height: 1.35; }
  .pc-base .pc-bonus { margin-left: 0; padding: 2px 5px; font-size: 9px; white-space: nowrap; }
  .pc-price { flex-direction:column; align-items:center; gap:3px; }.pc-price span { font-size:21px; }
  .pc-tag { top: 7px; right: 7px; padding: 3px 7px; border-radius: 7px; font-size: 9px; letter-spacing: .2px; }
  .pay-method-title { margin-top: 14px; }
  .pay-methods { gap: 8px; }
  .pay-method { gap: 7px; padding: 9px 8px; border-radius: 11px; }
  .pay-method-icon { width: 32px; height: 32px; border-radius: 9px; }
  .pay-method-icon svg { width: 24px; height: 24px; }
  .pay-method-copy strong { font-size: 12px; }
  .pay-method-copy small { display: none; }
  .pay-method-copy em { display: block; width: max-content; margin: 3px 0 0; }
  .pay-method-check { width: 16px; height: 16px; }
  .pay-btn { position: sticky; bottom: 0; z-index: 2; margin-top: 14px; padding: 13px 10px; font-size: 15px; }
  .points-secure-tip { font-size:8.5px; }
}

/* toast */
.toast {
  position: fixed;
  top: 24px; left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: #1f2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 300;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: flex; }
  .suggest-cards { grid-template-columns: 1fr; }
  .msg { padding: 10px 16px; }
  .welcome h1 { font-size: 22px; }
  .welcome-logo { width: 56px; height: 56px; border-radius: 16px; }
  .welcome-logo img { width: 100%; height: 100%; }
  .model-select { min-width: 0; padding: 6px 8px 6px 6px; gap: 7px; }
  /* 手机端只显示模型名（隐藏价格行节省空间），让用户能看清当前选了什么模型 */
  .ms-info { display: flex; flex-direction: row; align-items: baseline; gap: 5px; }
  .ms-price { display: none; }
  .ms-name { max-width: 110px; font-size: 13px; }
  .ms-icon { width: 26px; height: 26px; border-radius: 8px; }
  .ms-icon svg { width: 15px; height: 15px; }
  .model-picker.open .ms-info { display: flex; }
  .model-dropdown { min-width: 280px; }
}

/* ===== SEO 工具样式 ===== */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.seo-footer {
  padding: 18px 24px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}
.seo-footer a { color: var(--primary); text-decoration: none; margin: 0 6px; }
.seo-footer a:hover { text-decoration: underline; }
.seo-footer .seo-tags { margin-top: 6px; font-size: 12px; color: var(--text-muted); }
