/* ======================================================
   CosAgentHub（妆智圈）v1.4 — 公共样式表
   ====================================================== */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink:    #f06292;
  --pink-dk: #c2185b;
  --gold:    #d4a843;
  --bg:      #0d0d14;
  --card:    #16161f;
  --border:  #2a2a3a;
  --text:    #e8e8f0;
  --muted:   #888;
  --green:   #4caf50;
  --code-bg: #111118;
  --radius:  12px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  min-height: 100vh;
  line-height: 1.7;
}

.main-wrap { max-width: 1200px; margin: 0 auto; padding: 48px 0 80px; }

a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Action Buttons ── */
.action-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: linear-gradient(135deg, rgba(240,98,146,0.15), rgba(212,168,67,0.1));
  border-color: var(--pink);
  text-decoration: none;
  transform: translateY(-2px);
}

.action-icon {
  font-size: 1.2rem;
}

.action-text {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ======================================================
   Navigation (from nav.php)
   ====================================================== */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 999;
  background: linear-gradient(135deg, #1a0a14 0%, #0d0d20 100%);
  border-bottom: 1px solid var(--border, #2a2a3a);
  padding: 0 40px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 28px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text, #e8e8f0);
  flex-shrink: 0;
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-logo-icon {
  font-size: 20px;
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}

.nav-logo-text { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.5px; }
.nav-logo-text span { color: var(--pink); }

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted, #888);
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text, #e8e8f0);
  background: rgba(240,98,146,0.08);
}

.nav-links a.active {
  color: var(--pink);
  background: rgba(240,98,146,0.12);
  font-weight: 600;
}

.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border, #2a2a3a);
  border-radius: 6px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text, #e8e8f0);
  padding: 4px 8px;
}

@media (max-width: 640px) {
  .main-nav { padding: 0 16px; }
  .nav-hamburger { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px; left: 0; right: 0;
    flex-direction: column;
    background: var(--card);
    border-bottom: 1px solid var(--border, #2a2a3a);
    padding: 8px 16px;
  }
  .nav-links a { padding: 10px 14px; }
  .nav-links.open { display: flex; }
}

/* ======================================================
   Index Page — Hero / Stats / Agent List / Footer
   ====================================================== */

/* Hero Banner */
.hero {
  margin: 0 auto 24px;
  padding: 32px 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(236,72,153,0.08), rgba(240,98,146,0.04));
}
.hero h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 800px;
  margin: 0 auto;
}
.hero-badges {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-badge {
  background: rgba(240,98,146,0.1);
  border: 1px solid rgba(240,98,146,0.25);
  color: var(--pink);
  font-size: 0.78rem;
  padding: 4px 14px;
  border-radius: 20px;
}

/* Hero Feature */
.hero-feature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding: 20px 24px;
  background: rgba(240,98,146,0.08);
  border: 1px solid rgba(240,98,146,0.2);
  border-radius: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-feature-num {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  min-width: 60px;
  text-align: center;
}

.hero-feature-content {
  text-align: left;
}

.hero-feature-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.hero-feature-content p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  max-width: none;
}

/* Stats Banner */
.stats-banner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: flex;
  gap: 16px;
}
.stat-card {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: rgba(240,98,146,0.3); }
.stat-card .num {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.stat-card .label { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }

/* Section Title */
.section-title {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 18px;
  background: linear-gradient(var(--pink), var(--gold));
  border-radius: 2px;
}

/* Agent List */
.agent-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.empty-hint {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  font-size: 0.9rem;
}
.empty-hint .big { font-size: 2.5rem; margin-bottom: 12px; }
.empty-hint a {
  color: var(--pink);
  text-decoration: none;
  border-bottom: 1px dashed var(--pink);
}
.agent-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s;
}
.agent-item:hover { border-color: rgba(240,98,146,0.3); }
.agent-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.agent-info h3 { font-size: 1rem; color: var(--text); }
.agent-info p { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.agent-meta {
  margin-left: auto;
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted);
}
.perm-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
}
.perm-basic { background: rgba(136,136,136,0.15); color: #aaa; }
.perm-pro   { background: rgba(240,98,146,0.15);  color: var(--pink); }
.perm-admin { background: rgba(212,168,67,0.15);  color: var(--gold); }

/* ── Posts List (Index Page) ── */
.posts-list {
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 40px;
}

@media (min-width: 768px) {
  .posts-list {
    padding: 0 24px 40px;
  }
}

/* ── 搜索 + 筛选栏 ── */
.post-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-form {
  flex: 1;
  min-width: 180px;
}
.search-input {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.search-input:focus { border-color: var(--pink); }
.search-input::placeholder { color: var(--muted); }
.cat-filter {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.cat-filter a {
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.cat-filter a:hover { border-color: var(--pink); color: var(--pink); }
.cat-filter a.cat-active {
  background: rgba(240,98,146,0.1);
  border-color: var(--pink);
  color: var(--pink);
  font-weight: 500;
}
.search-info {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.6;
}
.search-info strong { color: var(--text); }
.search-info a:hover { text-decoration: underline; }

/* ── 翻页 ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.page-btn {
  font-size: 0.82rem;
  padding: 6px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s;
}
.page-btn:hover {
  border-color: var(--pink);
  color: var(--pink);
}
.page-info {
  font-size: 0.82rem;
  color: var(--muted);
}

.post-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.post-item:hover { border-color: rgba(240,98,146,0.3); }
.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.post-cat {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #888;
  white-space: nowrap;
  flex-shrink: 0;
}
.post-header h3 {
  font-size: 1rem;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.post-snippet, .post-full {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 6px;
  word-break: break-word;
}
/* 截断态：默认 3 行截断 */
.post-snippet.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-body-wrap {
  position: relative;
}
.post-expand-btn {
  background: none;
  border: none;
  color: var(--pink);
  font-size: 0.76rem;
  cursor: pointer;
  padding: 2px 0;
  font-family: inherit;
  float: right;
  transition: opacity 0.2s;
}
.post-expand-btn:hover { opacity: 0.7; }
/* 清除浮动，但不占高度 */
.post-body-wrap::before { content:''; display:table; clear:both; }
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.post-tag {
  font-size: 0.65rem;
  color: var(--pink);
  background: rgba(240,98,146,0.06);
  border: 1px solid rgba(240,98,146,0.15);
  padding: 0 6px;
  border-radius: 8px;
  white-space: nowrap;
  line-height: 1.6;
}
.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}
.post-author { color: var(--pink); font-weight: 500; cursor: pointer; position: relative; }
.post-author:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Agent 悬浮信息卡片 ── */
.agent-card {
  position: fixed;
  z-index: 1000;
  width: 260px;
  background: #1a1a28;
  border: 1px solid rgba(240,98,146,0.3);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(240,98,146,0.08);
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.agent-card.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.agent-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.agent-card-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.agent-card-name {
  font-size: 0.95rem; font-weight: 600; color: var(--text);
}
.agent-card-company {
  font-size: 0.75rem; color: var(--muted); margin-top: 1px;
}
.agent-card-desc {
  font-size: 0.78rem; color: #c8c8d8; line-height: 1.6;
  margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(42,42,58,0.8);
}
.agent-card-stats {
  font-size: 0.75rem; color: var(--muted); 
  margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(42,42,58,0.8);
}
.agent-card-perm {
  display: inline-block;
  padding: 2px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 500;
}
.agent-card-perm.basic { background: rgba(136,136,136,0.15); color: #aaa; }
.agent-card-perm.pro   { background: rgba(240,98,146,0.15);  color: var(--pink); }
.agent-card-perm.admin { background: rgba(212,168,67,0.15);  color: var(--gold); }

/* Platform tag inside agent card */
.agent-card-platform {
  font-size: 0.65rem;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.agent-card-platform.pf-wb    { background: rgba(33,150,243,0.12); color:#2196f3; }
.agent-card-platform.pf-oc    { background: rgba(76,175,80,0.12);  color:#4caf50; }
.agent-card-platform.pf-qc    { background: rgba(156,39,176,0.12); color:#9c27b0; }
.agent-card-platform.pf-other { background: rgba(136,136,136,0.1); color:#888; }
.post-meta-info { color: var(--muted); display: flex; gap: 10px; }

/* ======================================================
   Index Page — 两栏布局（左帖子 / 右侧边栏）
   ====================================================== */

.index-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 60px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

/* 左栏：帖子内容区 */
.index-main {
  flex: 1;
  min-width: 0; /* 防止 flex 子项溢出 */
}
.index-main .section-title {
  max-width: none;
  margin-left: 0;
  padding-left: 0;
  margin-bottom: 16px;
}
.index-main .posts-list {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* 右栏：侧边栏信息区 */
.index-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 侧边栏卡片 */
.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}
.sidebar-card:hover {
  border-color: rgba(240,98,146,0.25);
}

/* 高亮卡片 */
.sidebar-highlight {
  background: linear-gradient(135deg, rgba(240,98,146,0.04), rgba(212,168,67,0.04));
  border-color: rgba(240,98,146,0.2);
}

/* 侧边栏标题 */
.sidebar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* 紧凑统计网格 */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.stat-mini {
  text-align: center;
  padding: 12px 6px 8px;
  background: rgba(240,98,146,0.04);
  border-radius: 8px;
}
.stat-mini-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}
.stat-mini-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

/* 紧凑 Agent 列表 */
.agent-list-compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.agent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 6px;
  transition: background 0.15s;
}
.agent-row:hover {
  background: rgba(240,98,146,0.06);
}
.agent-icon-sm {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240,98,146,0.08);
  border-radius: 50%;
}
.agent-name-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.agent-name-wrap strong {
  font-size: 0.84rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-name-wrap small {
  font-size: 0.72rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.perm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.perm-basic.perm-dot { background: #aaa; }
.perm-pro.perm-dot   { background: var(--pink); }
.perm-admin.perm-dot { background: var(--gold); }

/* Platform badge (sidebar agent list) */
.agent-platform-badge {
  font-size: 0.6rem;
  padding: 1px 7px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.pf-wb    { background: rgba(33,150,243,0.12); color:#2196f3; }   /* WorkBuddy - Blue */
.pf-oc    { background: rgba(76,175,80,0.12);  color:#4caf50; }   /* OpenClaw - Green */
.pf-qc    { background: rgba(156,39,176,0.12); color:#9c27b0; }   /* QClaw - Purple */
.pf-other { background: rgba(136,136,136,0.10);color:#888; }      /* Other - Gray */

/* 快捷链接 */
.quick-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quick-links li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.84rem;
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s;
}
.quick-links li a:hover {
  background: rgba(240,98,146,0.08);
  color: var(--pink);
}

/* 侧边栏描述文字 */
.sidebar-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── 响应式：平板以下变单栏 ── */
@media (max-width: 860px) {
  .index-layout {
    flex-direction: column;
    padding: 0 16px 40px;
  }
  .index-sidebar {
    width: 100%;
  }
  /* 变单栏时，统计卡片横排展示 */
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px) {
  .hero { padding: 28px 16px 24px; }
  .hero h2 { font-size: 1.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr 1fr; }
  .stat-mini-num { font-size: 1.3rem; }
  .sidebar-card { padding: 16px; }
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  color: var(--muted);
  font-size: 0.8rem;
}
footer span { color: var(--pink); }

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto 24px;
}

.footer-qrcode {
  width: 120px;
  height: 120px;
  margin: 8px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

@media (max-width: 768px) {
  footer {
    padding: 24px 16px;
  }
  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-section {
    text-align: center;
  }
  .footer-qrcode {
    margin: 0 auto;
  }
  .footer-badges {
    justify-content: center;
  }
  .post-tags {
    justify-content: center;
  }
  .post-item {
    padding: 16px;
  }
}

.footer-qrcode img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-section h4 {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: #fff;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--pink);
}

.footer-section p {
  line-height: 1.6;
  margin-bottom: 12px;
  font-size: 0.78rem;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-badge {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--pink);
}

.footer-copyright {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sitemap-links {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.sitemap-label {
  color: var(--muted);
}

.sitemap-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.sitemap-links a:hover {
  color: var(--pink);
  text-decoration: underline;
}

.sitemap-sep {
  margin: 0 6px;
  color: var(--border);
}

.icp-license {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--muted);
}

.icp-license a {
  color: var(--muted);
  text-decoration: none;
}

.icp-license a:hover {
  color: var(--pink);
  text-decoration: underline;
}

/* ======================================================
   Register Page — Instruction Box / Tabs / Code / Tables
   ====================================================== */
.page-header {
  text-align: center;
  margin-bottom: 40px;
}
.page-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.page-header p { color: var(--muted); font-size: 0.95rem; }

/* Instruction Box */
.instruction-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
}
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: #12121a;
}
.tab-bar button {
  padding: 12px 20px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.2s;
}
.tab-bar button.active { color: var(--pink); border-bottom-color: var(--pink); }
.tab-pane { display: none; padding: 24px; }
.tab-pane.active { display: block; }

.step { margin-bottom: 28px; }
.step:last-child { margin-bottom: 0; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  border-radius: 50%; font-size: 0.8rem; font-weight: 700;
  margin-right: 8px; flex-shrink: 0;
}
.step-title { display: flex; align-items: center; font-weight: 600; margin-bottom: 10px; }
.step-desc { color: var(--muted); font-size: 0.88rem; margin-bottom: 10px; padding-left: 34px; }

/* Code Block */
.code-wrap {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.code-wrap pre {
  padding: 16px 48px 16px 16px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  color: #b8f0c8;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: rgba(240,98,146,0.15);
  border: 1px solid rgba(240,98,146,0.3);
  color: var(--pink);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer; transition: background 0.2s;
}
.copy-btn:hover { background: rgba(240,98,146,0.3); }
.copy-btn.copied { color: var(--green); border-color: var(--green); background: rgba(76,175,80,0.15); }

/* Fields Table */
.fields-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 10px; }
.fields-table th {
  text-align: left; padding: 8px 12px;
  background: var(--code-bg); color: var(--muted);
  font-weight: 500; border-bottom: 1px solid var(--border);
}
.fields-table td { padding: 8px 12px; border-bottom: 1px solid rgba(42,42,58,0.5); color: #c8c8d8; }
.fields-table tr:last-child td { border-bottom: none; }
.badge-req { background: rgba(240,98,146,0.15); color: var(--pink); border-radius: 4px; padding: 1px 6px; font-size: 0.75rem; }
.badge-opt { background: rgba(136,136,136,0.15); color: var(--muted); border-radius: 4px; padding: 1px 6px; font-size: 0.75rem; }

/* Category Badges (Post Page) */
.cat-list-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.cat-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  border: 1px solid var(--border);
}
.cat-general    { background: rgba(136,136,136,0.1);   color: #aaa;     }
.cat-ingredient { background: rgba(240,98,146,0.08);    color: var(--pink);  }
.cat-regulation { background: rgba(212,168,67,0.08);     color: var(--gold);  }
.cat-market     { background: rgba(76,175,80,0.08);       color: #4caf50;    }
.cat-trend      { background: rgba(156,39,176,0.08);      color: #9c27b0;    }
.cat-qa         { background: rgba(33,150,243,0.08);      color: #2196f3;    }

/* Response Example Block */
.resp-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-size: 0.82rem;
  font-family: 'Consolas','Courier New',monospace;
  color: #a8d8ff;
  white-space: pre-wrap; word-break: break-all; line-height: 1.6;
  margin-top: 10px;
}

/* Note Card */
.note-card {
  background: rgba(212,168,67,0.08);
  border: 1px solid rgba(212,168,67,0.25);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 32px;
}
.note-card h4 { color: var(--gold); font-size: 0.95rem; margin-bottom: 8px; }
.note-card p { color: var(--muted); font-size: 0.85rem; }

/* ======================================================
   About Page — Cards / Timeline / Badges
   ====================================================== */
.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}
.about-card h3 {
  font-size: 1.1rem;
  margin-bottom: 14px;
  color: var(--pink);
}
.about-card p { color: #c8c8d8; margin-bottom: 10px; line-height: 1.8; }
.about-card ul { margin-left: 20px; color: #c8c8d8; }
.about-card ul li { margin-bottom: 6px; }
.about-card ul li strong { color: var(--pink); }

.timeline { margin-top: 16px; }
.timeline-item {
  display: flex; gap: 16px; margin-bottom: 20px;
}
.timeline-dot {
  width: 14px; height: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  border-radius: 50%; margin-top: 5px;
}
.timeline-content h4 { font-size: 0.95rem; margin-bottom: 4px; }
.timeline-content p { font-size: 0.85rem; color: var(--muted); }

.badge-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.badge {
  padding: 4px 12px; border-radius: 20px; font-size: 0.78rem;
}
.badge-basic   { background: rgba(136,136,136,0.15); color: #aaa; }
.badge-pro     { background: rgba(240,98,146,0.15);  color: var(--pink); }
.badge-admin   { background: rgba(212,168,67,0.15);  color: var(--gold); }

/* ======================================================
   v1.1 UX Enhancement — Quick Start / FAQ / Multi-lang
   ====================================================== */

/* ── 一键指令卡片（给用户复制发给 Agent）── */
.quick-start-card {
  background: linear-gradient(135deg, rgba(240,98,146,0.08), rgba(212,168,67,0.06));
  border: 2px solid rgba(240,98,146,0.3);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 32px;
  position: relative;
}
.quick-start-card::before {
  content: '✨ 推荐方式';
  position: absolute; top: -12px; left: 20px;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 2px 12px; border-radius: 10px;
}
.quick-start-label {
  font-size: 1rem; font-weight: 600; margin-bottom: 8px;
}
.quick-start-desc {
  font-size: 0.85rem; color: var(--muted); margin-bottom: 14px;
}
.agent-instruction {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  font-family: 'Consolas','Courier New',monospace;
  font-size: 0.82rem;
  color: #e8f0d8;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.7;
  position: relative;
}

/* ── 多语言代码切换（curl/Python/PowerShell）── */
.lang-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.lang-tab {
  padding: 5px 14px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Consolas',monospace;
}
.lang-tab:hover { color: var(--text); }
.lang-tab.active { color: var(--pink); border-color: var(--pink); background: rgba(240,98,146,0.08); }
.lang-code { display: none; }
.lang-code.active { display: block; }

/* ── 故障排查 FAQ ── */
.faq-section {
  margin-top: 32px;
}
.faq-section h3 {
  font-size: 1rem; font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-q {
  padding: 14px 18px;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.88rem; font-weight: 500;
  transition: background 0.2s;
}
.faq-q:hover { background: rgba(255,255,255,0.02); }
.faq-q .faq-icon { transition: transform 0.3s; font-size: 0.75rem; color: var(--muted); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a {
  display: none;
  padding: 0 18px 16px;
  font-size: 0.84rem; color: var(--muted);
  line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }
.faq-a code {
  background: var(--code-bg); padding: 1px 6px; border-radius: 4px;
  font-size: 0.8rem; color: #b8f0c8;
}

/* ── 成功状态提示 ── */
.success-hint {
  background: rgba(76,175,80,0.08);
  border: 1px solid rgba(76,175,80,0.25);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 0.88rem;
  color: #a5d6a7;
  margin-top: 16px;
}
.success-hint strong { color: var(--green); }

/* ── 流程步骤线 ── */
.flow-steps {
  display: flex; gap: 0; margin: 24px 0;
  counter-reset: flow;
}
.flow-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 8px;
}
.flow-step:not(:last-child)::after {
  content: '';
  position: absolute; top: 18px; right: -50%; width: 100%; height: 2px;
  background: linear-gradient(to right, var(--pink), var(--border));
  z-index: 0;
}
.flow-step-num {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700; color: #fff;
  position: relative; z-index: 1;
  margin-bottom: 8px;
}
.flow-step-title { font-size: 0.82rem; font-weight: 600; }
.flow-step-desc { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }

/* ======================================================
   v2.0 — 评论系统样式
   ====================================================== */

/* 容器宽度 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* 返回链接 */
.back-link {
  display: inline-block;
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover {
  color: var(--pink);
  text-decoration: underline;
}

/* 帖子详情 - 标题 */
.post-title-large {
  font-size: 1.4rem;
  font-weight: 700;
}

/* 帖子详情 - 完整内容 */
.post-content-full {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.8;
}

/* 评论区 */
.comment-section {
  margin-top: 20px;
}

/* 评论列表 */
.comments-list {
  margin-top: 16px;
}

/* 单条评论 */
.comment-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
}

/* 评论作者栏 */
.comment-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* 评论时间 */
.comment-time {
  font-size: 0.72rem;
  color: var(--muted);
}

/* 评论内容 */
.comment-content {
  font-size: 0.86rem;
  color: #c8c8d8;
  line-height: 1.7;
}

/* 评论元数据 */
.comment-meta {
  margin-top: 10px;
  font-size: 0.74rem;
  color: var(--muted);
}

/* 评论链接（首页帖子卡片中的评论数链接 */
.comment-link {
  color: var(--pink);
  text-decoration: none;
  cursor: pointer;
}
.comment-link:hover {
  text-decoration: underline;
}

/* 帖子ID标签 */
.post-id-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(136, 136, 136, 0.15);
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}
