/* ========================================
   AI 内容工具包 · 现代版样式
   配色：蓝紫渐变 + 琥珀点缀
   风格：Linear / Notion / Vercel
   品牌：东吴摄影
   ======================================== */

:root {
  /* 主色系 */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #eef2ff;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-soft: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);

  /* 中性色 */
  --bg: #fafaf9;
  --bg-soft: #f5f5f4;
  --card: #ffffff;
  --border: #e7e5e4;
  --border-light: #f5f5f4;
  --text: #0c0a09;
  --text-secondary: #44403c;
  --text-muted: #78716c;

  /* 语义色 */
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 4px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 20px -3px rgba(0,0,0,0.08), 0 4px 8px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 30px -5px rgba(0,0,0,0.1), 0 8px 12px -6px rgba(0,0,0,0.04);
  --shadow-primary: 0 8px 20px -4px rgba(99, 102, 241, 0.4);
  --shadow-primary-lg: 0 12px 28px -4px rgba(99, 102, 241, 0.5);

  /* 圆角 */
  --r-sm: 6px;
  --r: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 背景纹理（点阵） */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, #e7e5e4 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

/* ============================================
   NAVBAR（磨砂玻璃）
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--gradient);
  color: white;
  border-radius: 8px;
  font-size: 18px;
  box-shadow: var(--shadow-primary);
}

.nav-tag {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-back:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.container-narrow { max-width: 880px; }

/* ============================================
   HERO（主页头部）
   ============================================ */
.hero {
  text-align: center;
  padding: 80px 24px 64px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text);
}

.hero-title .gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.stat {
  text-align: center;
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ============================================
   PAGE HEADER（工具页头部）
   ============================================ */
.page-header {
  margin-bottom: 32px;
  animation: slideIn 0.4s ease-out;
}

.page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--gradient);
  color: white;
  border-radius: 16px;
  font-size: 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-primary);
}

h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
  color: var(--text);
}

.page-header .subtitle {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0;
  line-height: 1.6;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  animation: slideIn 0.4s ease-out;
}

/* ============================================
   TOOL CARDS（主页）
   ============================================ */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.tool-card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 32px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  isolation: isolate;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.tool-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.tool-card:hover::after {
  transform: scaleX(1);
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
  font-size: 24px;
  margin-bottom: 16px;
  transition: all 0.3s;
}

.tool-card:hover .tool-icon {
  background: var(--gradient);
  color: white;
  transform: scale(1.05);
}

.tool-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.tool-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.tool-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tool-arrow {
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-size: 18px;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s;
}

.tool-card:hover .tool-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--primary);
}

/* ============================================
   WORKSPACE（双栏布局）
   ============================================ */
.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.workspace-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow);
  animation: slideIn 0.4s ease-out;
}

.workspace-panel h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.workspace-panel h3 .panel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
}

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 16px; }
.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.form-row > * { flex: 0 0 auto; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

input[type="text"], input[type="password"], input[type="email"], textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  transition: all 0.2s;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

textarea {
  min-height: 320px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
}

select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%2378716c' d='M3 4.5L6 7.5L9 4.5'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary-lg);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: var(--text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }

.btn-small { padding: 6px 12px; font-size: 12px; }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--r);
}

/* ============================================
   OUTPUT
   ============================================ */
.output {
  background: #fafaf9;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  min-height: 320px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  max-height: 600px;
  overflow-y: auto;
}

.output:empty::before {
  content: "生成结果会显示在这里…";
  color: var(--text-muted);
  font-style: italic;
}

.output-html {
  background: var(--card);
  white-space: normal;
}

.output-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  justify-content: flex-end;
}

.tip {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: var(--primary-light);
  border-radius: var(--r);
  font-size: 13px;
  color: var(--text-secondary);
  margin: 12px 0;
  border-left: 3px solid var(--primary);
}

.tip-icon { flex-shrink: 0; }

/* ============================================
   TITLE LIST
   ============================================ */
.title-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.title-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--card);
}
.title-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateX(2px);
}

.title-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 32px;
  padding: 0 10px;
  background: var(--gradient);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.title-score.high { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.title-score.mid { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.title-score.low { background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%); }

.title-body { flex: 1; min-width: 0; }
.title-text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 4px;
}
.title-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.title-meta .style-tag {
  display: inline-block;
  padding: 1px 8px;
  background: var(--bg-soft);
  border-radius: 999px;
  margin-right: 6px;
  font-weight: 500;
}

/* ============================================
   HISTORY PANEL
   ============================================ */
.history-panel {
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: slideIn 0.4s ease-out;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.history-header:hover { background: var(--primary-light); }

.history-title {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--primary);
  color: white;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.history-actions { display: flex; align-items: center; gap: 8px; }

.history-toggle {
  display: inline-block;
  transition: transform 0.2s;
  color: var(--text-muted);
  font-size: 12px;
}
.history-toggle.open { transform: rotate(180deg); }

.history-list {
  max-height: 400px;
  overflow-y: auto;
}

.history-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.history-item:last-child { border-bottom: none; }
.history-item:hover { background: var(--bg-soft); }

.history-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.history-time {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: var(--bg-soft);
  border-radius: 4px;
}
.history-tool {
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.history-input {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

/* ============================================
   MARKDOWN BODY
   ============================================ */
.markdown-body {
  background: var(--card);
  padding: 28px 32px;
  border-radius: var(--r);
  border: 1.5px solid var(--border);
  line-height: 1.8;
  color: var(--text);
  font-size: 15px;
  max-height: 600px;
  overflow-y: auto;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.markdown-body h2 {
  font-size: 20px;
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
  color: var(--primary);
}
.markdown-body h3 { font-size: 16px; margin: 16px 0 8px; }
.markdown-body p { margin: 8px 0; color: var(--text-secondary); }
.markdown-body ul, .markdown-body ol { margin: 8px 0; padding-left: 24px; color: var(--text-secondary); }
.markdown-body li { margin: 4px 0; }
.markdown-body code {
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 13px;
}
.markdown-body pre {
  background: #1e1e1e;
  color: #f8f8f2;
  padding: 16px;
  border-radius: var(--r);
  overflow-x: auto;
  margin: 12px 0;
}
.markdown-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}
.markdown-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  margin: 12px 0;
  padding: 10px 18px;
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--text-secondary);
}
.markdown-body strong { color: var(--text); font-weight: 700; }
.markdown-body hr { border: 0; border-top: 1.5px dashed var(--border); margin: 20px 0; }

/* ============================================
   TOAST & ERRORS
   ============================================ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  box-shadow: var(--shadow-xl);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.error-msg {
  background: var(--danger-light);
  color: #991b1b;
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: 14px;
  margin-top: 12px;
  display: none;
  border-left: 3px solid var(--danger);
}
.error-msg.show { display: block; }

/* ============================================
   LOADING
   ============================================ */
.loading {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, var(--bg-soft) 0%, var(--border-light) 50%, var(--bg-soft) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ============================================
   ROADMAP（主页）
   ============================================ */
.roadmap {
  margin-top: 64px;
  padding: 40px 0;
}

.roadmap h2 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
  color: var(--text);
}

.roadmap-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.roadmap-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  position: relative;
}

.roadmap-item .rm-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.rm-tag.done { background: var(--success-light); color: #065f46; }
.rm-tag.next { background: var(--primary-light); color: var(--primary); }
.rm-tag.later { background: var(--bg-soft); color: var(--text-muted); }

.roadmap-item h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}
.roadmap-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  margin-top: 80px;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  background: var(--card);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-secondary);
}

.footer-brand .brand-mark {
  display: inline-block;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.footer-links {
  display: flex;
  gap: 20px;
  align-items: center;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--primary); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .container, .nav-content { padding: 16px; }
  .container { padding-top: 32px; padding-bottom: 32px; }
  .hero { padding: 48px 16px 32px; }
  h1 { font-size: 24px; }
  .workspace { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .form-row > * { width: 100%; }
  .tool-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .footer-content { flex-direction: column; text-align: center; }
  .nav-tag { display: none; }
}

/* ============================================
   v0.3 新工具样式
   ============================================ */

/* 新工具卡片：顶部一道彩色光带 + 微微外发光 */
.tool-card.new {
  position: relative;
  border: 1px solid var(--border);
}
.tool-card.new::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, #667eea 0%, #f59e0b 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
  pointer-events: none;
}
.tool-card.new:hover::before {
  opacity: 1;
}
.tool-card.new:hover {
  box-shadow: 0 12px 36px -8px rgba(245, 158, 11, 0.25);
}

/* 新工具的"🆕 v0.3 新增"标签 */
.tool-tag.new-tag {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
}

/* ============================================
   小红书页面专用
   ============================================ */
.xhs-list { display: flex; flex-direction: column; gap: 16px; }
.xhs-item {
  padding: 18px;
  background: linear-gradient(135deg, #fff5f7 0%, #fefce8 100%);
  border: 1px solid #fde2e6;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.xhs-item:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 16px -4px rgba(244, 114, 182, 0.15);
}
.xhs-style {
  display: inline-block;
  padding: 3px 10px;
  background: white;
  color: #be185d;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(190, 24, 93, 0.1);
}
.xhs-title {
  font-size: 16px;
  font-weight: 700;
  color: #831843;
  line-height: 1.5;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  transition: color 0.2s;
}
.xhs-title:hover { color: #be185d; }
.xhs-title:hover .copy-hint { opacity: 1; }
.copy-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s;
  background: white;
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.xhs-body {
  font-size: 14px;
  color: #4c0519;
  line-height: 1.75;
  white-space: pre-wrap;
  cursor: pointer;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  transition: background 0.2s;
}
.xhs-body:hover { background: rgba(255, 255, 255, 0.9); }

/* ============================================
   去 AI 味 / 翻译页面：diff section
   ============================================ */
.diff-container { display: flex; flex-direction: column; gap: 12px; }
.diff-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  transition: all 0.2s;
}
.diff-section[open] {
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.diff-section summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.diff-section summary::-webkit-details-marker { display: none; }
.diff-section summary::before {
  content: "▶";
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
  display: inline-block;
}
.diff-section[open] summary::before {
  transform: rotate(90deg);
}
.diff-after, .diff-note {
  padding: 16px 20px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  border-top: 1px solid var(--border);
  background: white;
}
.diff-after { font-size: 15px; }
.diff-note {
  font-size: 13px;
  color: var(--text-muted);
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  border-top-color: #fde68a;
}

/* ============================================
   v0.4 用户系统样式
   ============================================ */

/* 登录/注册页 */
.auth-container { max-width: 480px; margin: 0 auto; }
.auth-card { padding: 32px 28px; }
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-icon { font-size: 48px; margin-bottom: 12px; }
.auth-header h1 { font-size: 24px; font-weight: 700; margin: 0 0 8px; }
.auth-header .subtitle { color: var(--text-muted); font-size: 14px; }
.auth-footer { text-align: center; margin-top: 20px; color: var(--text-muted); font-size: 14px; }
.auth-footer a { color: var(--primary); font-weight: 600; }
.auth-tips { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.auth-tip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
}
.auth-tip b { color: var(--text); }
.btn-block { width: 100%; padding: 14px; font-size: 15px; }

/* 导航栏用户区 */
.nav-user { display: flex; align-items: center; gap: 12px; }
.nav-user a {
  font-size: 13px; color: var(--text-muted); font-weight: 500;
  padding: 6px 12px; border-radius: 6px;
  transition: all 0.2s;
}
.nav-user a:hover { background: var(--primary-light); color: var(--primary); }
.nav-user .nav-username {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: var(--primary-light); color: var(--primary);
  border-radius: 999px; font-size: 12px; font-weight: 600;
}

/* 用户中心 */
.user-avatar {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white; font-size: 24px; font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.role-badge {
  display: inline-block;
  padding: 2px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.vip-badge {
  display: inline-block;
  padding: 2px 10px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

/* 用量统计 */
.usage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.usage-stat {
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  text-align: center;
}
.usage-stat-num {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.usage-stat-label { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.usage-tool-list {
  grid-column: 1 / -1;
  margin-top: 8px;
}
.usage-tool-row {
  display: flex; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.usage-tool-row:last-child { border-bottom: none; }
.usage-tool-name { color: var(--text); font-weight: 500; }
.usage-tool-num { color: var(--text-muted); }
.usage-loading { color: var(--text-muted); padding: 20px; text-align: center; }

@media (max-width: 768px) {
  .usage-grid { grid-template-columns: 1fr; }
}

/* 工具页右上角"已用 X/5" */
.tool-quota {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px; color: var(--text-muted);
  margin-left: 12px;
}
.tool-quota.warn { color: #b45309; background: #fef3c7; border-color: #fde68a; }
.tool-quota.over { color: #b91c1c; background: #fee2e2; border-color: #fecaca; }

/* ============================================
   大模型排行榜
   ============================================ */
.leaderboard-section {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 56px;
  margin-bottom: 16px;
  position: relative;
}

.leaderboard-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b 0%, #ef4444 33%, #6366f1 66%, #10b981 100%);
}

.lb-header {
  text-align: center;
  margin-bottom: 28px;
}

.lb-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.lb-title-icon {
  font-size: 32px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.lb-badge {
  display: inline-block;
  padding: 3px 10px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.lb-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* Tabs */
.lb-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.lb-tab {
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.lb-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.lb-tab.active {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-primary);
}

/* 新数据源 tab 样式 */
.lb-tab-new {
  border-color: #f59e0b;
  color: #b45309;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}
.lb-tab-new:hover {
  border-color: #d97706;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}
.lb-tab-new.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

/* Table */
.lb-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 880px;
  margin: 0 auto;
}

.lb-table-header {
  display: grid;
  grid-template-columns: 48px 1fr 200px 70px;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-items: center;
}

.lb-table-body {
  min-height: 200px;
}

.lb-row {
  display: grid;
  grid-template-columns: 48px 1fr 200px 70px;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  transition: all 0.15s;
  font-size: 14px;
}

.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--bg-soft); }

.lb-rank {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-muted);
  text-align: center;
}

.lb-row:nth-child(1) .lb-rank { color: #f59e0b; font-size: 16px; }
.lb-row:nth-child(2) .lb-rank { color: #94a3b8; font-size: 16px; }
.lb-row:nth-child(3) .lb-rank { color: #d97706; font-size: 16px; }

.lb-model {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lb-model-name {
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-vendor {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.lb-elo {
  position: relative;
  display: flex;
  align-items: center;
  height: 28px;
}

.lb-elo-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 6px;
  opacity: 0.12;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.lb-elo-num {
  position: relative;
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-mono);
  color: var(--text);
  padding-left: 8px;
  z-index: 1;
}

.lb-elo-ci {
  font-weight: 400;
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 2px;
}

.lb-votes {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.lb-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
  gap: 12px;
}

.lb-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.lb-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
}

.lb-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 880px;
  margin: 16px auto 0;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

.lb-source a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.lb-source a:hover { text-decoration: underline; }

.lb-view-all {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 16px; background: var(--gradient); color: white;
  border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none;
  transition: all 0.2s; box-shadow: var(--shadow-primary);
}
.lb-view-all:hover { transform: translateY(-1px); box-shadow: var(--shadow-primary-lg); }

.lb-sources {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 32px; max-width: 880px; margin-left: auto; margin-right: auto;
}
.lb-source-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 18px; background: var(--bg-soft); border-radius: var(--r-sm);
  border: 1px solid var(--border-light);
}
.lb-source-label { font-size: 13px; font-weight: 700; }
.lb-source-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
@media (max-width: 768px) { .lb-sources { grid-template-columns: 1fr; } }

/* ============================================
   厂商排行榜
   ============================================ */
.company-section {
  padding: 48px 0 56px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.company-section .container {
  padding: 0 24px;
}

.company-header {
  text-align: center;
  margin-bottom: 28px;
}

.company-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.company-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.company-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.company-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.company-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.company-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.company-rank {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.company-rank.gold { color: #f59e0b; }
.company-rank.silver { color: #94a3b8; }
.company-rank.bronze { color: #d97706; }

.company-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.company-score {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.company-score-num {
  font-weight: 700;
  font-size: 20px;
  font-family: var(--font-mono);
}

.company-score-num.gold { color: #f59e0b; }
.company-score-num.silver { color: #94a3b8; }
.company-score-num.bronze { color: #d97706; }

.company-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.company-metric {
  text-align: center;
  padding: 8px 4px;
  background: var(--bg-soft);
  border-radius: var(--r-sm);
}

.company-metric-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
}

.company-metric-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.company-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.company-cat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.company-cat.strong {
  background: #dcfce7;
  color: #15803d;
}

.company-cat.good {
  background: #dbeafe;
  color: #1d4ed8;
}

.company-cat.ok {
  background: var(--bg-soft);
  color: var(--text-muted);
}

.company-cat.none {
  background: #fef2f2;
  color: #dc2626;
}

@media (max-width: 768px) {
  .company-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   模型价格表
   ============================================ */
.pricing-section {
  padding: 48px 0 56px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.pricing-section .container {
  padding: 0 24px;
}

.pricing-header {
  text-align: center;
  margin-bottom: 28px;
}

.pricing-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pricing-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.pricing-table-wrap {
  max-width: 960px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.pricing-table-header {
  display: grid;
  grid-template-columns: 3fr 1.4fr 1.4fr 1.2fr;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-items: center;
}

.pricing-table-body {
  min-height: 200px;
  max-height: 600px;
  overflow-y: auto;
}

.pricing-row {
  display: grid;
  grid-template-columns: 3fr 1.4fr 1.4fr 1.2fr;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  transition: all 0.15s;
  font-size: 14px;
}

.pricing-row:last-child { border-bottom: none; }
.pricing-row:hover { background: var(--bg-soft); }

.pricing-model {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pricing-model-name {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-provider {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--primary-light);
  color: var(--primary);
}

.pricing-price {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.pricing-price.free {
  color: #15803d;
}

.pricing-price.cheap {
  color: #059669;
}

.pricing-price.mid {
  color: #b45309;
}

.pricing-price.expensive {
  color: #dc2626;
}

.pricing-context {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

.pricing-search {
  display: flex;
  gap: 8px;
  max-width: 960px;
  margin: 0 auto 20px;
  align-items: center;
}

.pricing-search input {
  flex: 1;
}

.pricing-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pricing-tab {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.pricing-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.pricing-tab.active {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-primary);
}

.pricing-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-note a {
  color: var(--primary);
  text-decoration: none;
}

@media (max-width: 768px) {
  .pricing-table-header,
  .pricing-row {
    grid-template-columns: 2fr 1fr 1fr 0.8fr;
    gap: 4px;
    padding: 10px 12px;
  }
  .pricing-model-name { font-size: 12px; }
  .pricing-price { font-size: 11px; }
}

@media (max-width: 768px) {
  .lb-table-header,
  .lb-row {
    grid-template-columns: 36px 1fr 100px 50px;
    gap: 4px;
    padding: 10px 12px;
  }
  .lb-elo-num { font-size: 13px; }
  .lb-model-name { font-size: 12px; max-width: 100px; }
  .lb-vendor { font-size: 10px; padding: 1px 6px; }
  .lb-title { font-size: 22px; }
  .lb-tab { padding: 6px 14px; font-size: 12px; }
}

/* ============================================
   v0.4 阶段 2 充值页样式
   ============================================ */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 600px) {
  .plan-grid { grid-template-columns: 1fr; }
}
.plan-card {
  position: relative;
  padding: 20px 16px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.plan-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(102, 126, 234, 0.2);
}
.plan-amount {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.plan-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.plan-action {
  margin-top: 12px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

/* 支付等待 */
.pay-status {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
}
.pay-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 订单状态徽章 */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.badge-ok { background: #dcfce7; color: #15803d; }
.badge-warn { background: #fef3c7; color: #b45309; }
.badge-err { background: #fee2e2; color: #b91c1c; }
.badge-mute { background: #f5f5f4; color: #78716c; }

/* 订单行 */
.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.order-row:last-child { border-bottom: none; }

/* ============================================
   🚀 全面移动端适配 v0.5
   ============================================ */

/* 移动端导航 */
@media (max-width: 768px) {
  .nav-content {
    padding: 10px 16px;
  }
  .logo {
    font-size: 15px;
    gap: 6px;
  }
  .logo-mark {
    width: 28px;
    height: 28px;
    font-size: 16px;
    border-radius: 6px;
  }
  .nav-tag {
    display: none;
  }
  .nav-back {
    font-size: 12px;
    padding: 4px 8px;
  }
  .nav-right {
    gap: 4px;
  }
  .nav-user {
    gap: 4px;
  }
  .nav-user a {
    font-size: 11px;
    padding: 4px 8px;
  }
  .nav-user .nav-username {
    font-size: 11px;
    padding: 3px 8px;
  }

  /* 容器 */
  .container {
    padding: 20px 16px;
  }
  .container-narrow {
    max-width: 100%;
  }

  /* Hero */
  .hero {
    padding: 40px 16px 32px;
  }
  .hero-title {
    font-size: 28px;
  }
  .hero-subtitle {
    font-size: 15px;
  }
  .hero-stats {
    gap: 16px;
  }
  .stat-num {
    font-size: 22px;
  }
  .stat-label {
    font-size: 11px;
  }

  /* 工具卡片 */
  .tool-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .tool-card {
    padding: 24px;
  }
  .tool-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  .tool-title {
    font-size: 16px;
  }
  .tool-desc {
    font-size: 13px;
  }
  .tool-arrow {
    opacity: 1;
    transform: translateX(0);
    bottom: 20px;
    right: 20px;
  }

  /* 页面头部 */
  h1 {
    font-size: 24px;
  }
  .page-header .subtitle {
    font-size: 14px;
  }
  .page-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  /* 双栏 → 单栏 */
  .workspace {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .workspace-panel {
    padding: 16px;
  }

  /* 表单 */
  input[type="text"], input[type="password"], input[type="email"], textarea, select {
    padding: 12px 14px;
    font-size: 16px; /* 防止 iOS 缩放 */
  }
  textarea {
    min-height: 240px;
  }
  .form-row {
    flex-direction: column;
  }
  .form-row > * {
    width: 100%;
  }

  /* 按钮 */
  .btn {
    padding: 12px 18px;
    font-size: 14px;
    min-height: 44px; /* 触控友好 */
  }
  .btn-small {
    padding: 8px 14px;
    font-size: 12px;
    min-height: 36px;
  }
  .btn-block {
    width: 100%;
  }

  /* 输出区 */
  .output {
    min-height: 200px;
  }
  .markdown-body {
    padding: 16px 18px;
    font-size: 14px;
  }

  /* 卡片 */
  .card {
    padding: 20px;
    margin-bottom: 16px;
  }

  /* ===== 排行榜 TAB ===== */
  .lb-tabs {
    gap: 4px;
  }
  .lb-tab {
    padding: 6px 12px;
    font-size: 12px;
  }
  .lb-title {
    font-size: 20px;
    flex-wrap: wrap;
  }
  .lb-title-icon {
    font-size: 24px;
  }
  .lb-subtitle {
    font-size: 12px;
  }

  /* 排行榜表格 → 卡片式布局 */
  .lb-table-header {
    display: none; /* 隐藏表头，改用卡片 */
  }
  .lb-table-wrap {
    border: none;
    box-shadow: none;
    background: transparent;
  }
  .lb-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    gap: 4px 12px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
  }
  .lb-row .lb-rank {
    grid-column: 1;
    grid-row: 1;
    font-size: 20px;
  }
  .lb-row .lb-model {
    grid-column: 2;
    grid-row: 1;
  }
  .lb-row .lb-elo {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 24px;
  }
  .lb-row .lb-votes {
    grid-column: 1 / -1;
    grid-row: 3;
    text-align: left;
    font-size: 11px;
  }
  .lb-model-name {
    font-size: 13px;
    max-width: 180px;
  }
  .lb-elo-num {
    font-size: 14px;
  }
  .lb-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .lb-view-all {
    width: 100%;
    justify-content: center;
  }

  /* ===== 完整排行榜页 ===== */
  .lb-full-page {
    padding: 16px 0 32px;
  }
  .lb-full-header h1 {
    font-size: 22px;
  }
  .lb-full-tabs {
    gap: 4px;
    padding: 0 8px;
  }
  .lb-full-tab {
    padding: 8px 14px;
    font-size: 12px;
  }
  .lb-full-search {
    padding: 0 8px;
  }
  .lb-full-search input {
    max-width: 100%;
    font-size: 16px;
  }
  .lb-full-thead {
    display: none;
  }
  .lb-full-table {
    border: none;
    box-shadow: none;
    background: transparent;
  }
  .lb-full-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 4px 10px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
  }
  .lb-full-row .lb-full-rank {
    grid-column: 1;
    grid-row: 1;
  }
  .lb-full-row .lb-full-model {
    grid-column: 2;
    grid-row: 1;
  }
  .lb-full-row .lb-full-license {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .lb-full-row .lb-full-elo {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  .lb-full-row .lb-full-votes {
    grid-column: 1 / -1;
    grid-row: 4;
    text-align: left;
  }
  .lb-full-model-name {
    font-size: 12px;
    max-width: 160px;
  }
  .lb-full-meta {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 16px;
  }

  /* ===== 厂商排名 ===== */
  .company-section {
    padding: 32px 0 40px;
  }
  .company-title {
    font-size: 20px;
    flex-wrap: wrap;
  }
  .company-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .company-card {
    padding: 20px;
  }
  .company-rank {
    font-size: 24px;
  }
  .company-name {
    font-size: 16px;
  }
  .company-metrics {
    gap: 6px;
  }
  .company-metric-num {
    font-size: 16px;
  }

  /* ===== 价格表 ===== */
  .pricing-section {
    padding: 32px 0 40px;
  }
  .pricing-title {
    font-size: 20px;
  }
  .pricing-tabs {
    gap: 4px;
    padding: 0 8px;
  }
  .pricing-tab {
    padding: 5px 10px;
    font-size: 11px;
  }
  .pricing-search {
    flex-direction: column;
    padding: 0 8px;
  }
  .pricing-search input {
    font-size: 16px;
  }
  .pricing-table-header {
    display: none;
  }
  .pricing-table-wrap {
    border: none;
    box-shadow: none;
    background: transparent;
  }
  .pricing-row {
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
  }
  .pricing-row .pricing-model {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .pricing-row .pricing-price:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .pricing-row .pricing-price:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
  }
  .pricing-row .pricing-context {
    grid-column: 3;
    grid-row: 2;
  }
  .pricing-price {
    font-size: 12px;
  }

  /* ===== 数据源卡片 ===== */
  .lb-sources {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 8px;
  }

  /* ===== 用户中心 ===== */
  .usage-grid {
    grid-template-columns: 1fr 1fr;
  }
  .usage-stat {
    padding: 12px;
  }
  .usage-stat-num {
    font-size: 20px;
  }

  /* ===== 登录/注册 ===== */
  .auth-container {
    max-width: 100%;
  }
  .auth-card {
    padding: 24px 20px;
  }
  .auth-header h1 {
    font-size: 20px;
  }

  /* ===== 充值页 ===== */
  .plan-card {
    padding: 16px 12px;
  }
  .plan-amount {
    font-size: 26px;
  }

  /* ===== 小红书 ===== */
  .xhs-item {
    padding: 14px;
  }
  .xhs-title {
    font-size: 14px;
  }
  .xhs-body {
    font-size: 13px;
  }

  /* ===== 去AI味/翻译 diff ===== */
  .diff-after, .diff-note {
    padding: 12px 14px;
    font-size: 13px;
  }

  /* ===== 历史面板 ===== */
  .history-header {
    padding: 12px 16px;
  }
  .history-item {
    padding: 12px 16px;
  }
  .history-input {
    font-size: 12px;
  }

  /* ===== 页脚 ===== */
  .footer {
    margin-top: 48px;
    padding: 24px 16px;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  /* ===== 模型详情页 ===== */
  .model-detail-card {
    padding: 20px;
  }
  .model-detail-grid {
    grid-template-columns: 1fr;
  }

  /* ===== Toast ===== */
  .toast {
    left: 16px;
    right: 16px;
    transform: translateY(20px);
    text-align: center;
    font-size: 13px;
  }
  .toast.show {
    transform: translateY(0);
  }

  /* ===== 标题列表 ===== */
  .title-item {
    padding: 12px 14px;
  }
  .title-text {
    font-size: 14px;
  }
  .title-score {
    min-width: 40px;
    height: 28px;
    font-size: 12px;
  }

  /* ===== roadmap ===== */
  .roadmap {
    margin-top: 40px;
    padding: 24px 0;
  }
  .roadmap-list {
    grid-template-columns: 1fr;
  }

  /* ===== 隐藏桌面端特有元素 ===== */
  .nav-tag {
    display: none;
  }

  /* 禁用 hover 动画（触屏无 hover） */
  .tool-card:hover {
    transform: none;
  }
  .tool-card:hover::after {
    transform: scaleX(0);
  }
}

/* 小屏手机 (≤480px) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 24px;
  }
  .hero-subtitle {
    font-size: 14px;
  }
  h1 {
    font-size: 20px;
  }

  /* 排行榜 tabs 更紧凑 */
  .lb-tabs {
    gap: 3px;
  }
  .lb-tab {
    padding: 5px 10px;
    font-size: 11px;
  }
  .lb-full-tab {
    padding: 6px 10px;
    font-size: 11px;
  }

  /* 卡片式排行榜行 */
  .lb-row {
    padding: 10px 12px;
    gap: 2px 8px;
  }
  .lb-model-name {
    font-size: 12px;
    max-width: 140px;
  }

  /* 价格表 */
  .pricing-row {
    padding: 10px 12px;
  }
  .pricing-price {
    font-size: 11px;
  }

  /* 厂商卡片 */
  .company-card {
    padding: 16px;
  }
  .company-metrics {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
  }
  .company-metric {
    padding: 6px 2px;
  }
  .company-metric-num {
    font-size: 14px;
  }
  .company-metric-label {
    font-size: 10px;
  }

  /* 用户中心 */
  .usage-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    padding: 20px;
  }
}
