/* UGOS Platform — Agent能力撮合平台 */
:root {
  --bg-deep: #0a0a0f;
  --bg-card: #13131a;
  --bg-surface: #1a1a24;
  --text-primary: #f0f0f5;
  --text-muted: #8888a0;
  --accent: #6366f1;
  --accent-glow: #8b8ff7;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── SVG 图标 ── */
.svg-icon { color: inherit; flex-shrink: 0; }

/* ── 导航 ── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  background: var(--bg-card);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky; top: 0; z-index: 100;
}
.nav-logo { font-size: 20px; font-weight: 700; text-decoration: none; color: var(--text-primary); }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }

/* ── 按钮 ── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px;
  border-radius: var(--radius-sm); font-size: 16px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: #333; color: #fff; border: 1px solid #555; }
.btn-primary:hover { background: #444; border-color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,255,255,0.1); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid rgba(255,255,255,0.1); }
.btn-ghost:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
.btn-lg { padding: 18px 36px; font-size: 18px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ── 容器 ── */
.container { max-width: 960px; margin: 0 auto; padding: 40px 24px; }
.container-sm { max-width: 640px; }

/* ── Hero ── */
.hero { text-align: center; padding: 80px 0 60px; }
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero h1 span { background: linear-gradient(135deg, var(--accent), var(--accent-glow)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 18px; color: var(--text-muted); max-width: 560px; margin: 0 auto 32px; }

/* ── 卡片 ── */
.card {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.05); padding: 24px;
  transition: all 0.3s;
}
.card:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-2px); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* ── 表单 ── */
.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 14px 16px;
  background: var(--bg-surface); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); color: var(--text-primary); font-size: 16px;
  font-family: inherit; transition: border-color 0.2s;
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }

/* ── 标签 ── */
.tag { display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 500; background: rgba(255,255,255,0.08); color: #aaa; }

/* ── 状态灯 ── */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.status-active::before { background: var(--success); }
.status-idle::before { background: var(--warning); }
.status-generating::before { background: var(--accent); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── 统计 ── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--bg-surface); border-radius: var(--radius-sm); padding: 20px; text-align: center; }
.stat-value { font-size: 32px; font-weight: 800; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Agent 卡片 ── */
.agent-card { position: relative; }
.agent-card .agent-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.agent-card .agent-avatar { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, #444, #222); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: #fff; }
.agent-card .agent-name { font-size: 18px; font-weight: 700; }
.agent-card .agent-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.agent-card .agent-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.agent-card .agent-footer { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-muted); }
.agent-price { font-size: 18px; font-weight: 700; color: var(--accent-glow); }

/* ── 响应式 ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .nav { padding: 12px 16px; }
  .nav-links { gap: 12px; }
}

/* ── 结果展示 ── */
.result-box { display: none; background: var(--bg-surface); border-radius: var(--radius); padding: 32px; text-align: center; margin-top: 32px; border: 1px solid rgba(34,197,94,0.2); }
.result-box.show { display: block; animation: fadeIn 0.5s; }
.result-box .result-icon { font-size: 56px; margin-bottom: 16px; }
.result-box .result-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.result-box .result-desc { color: var(--text-muted); margin-bottom: 24px; }

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

/* ── 加载动画 ── */
.loading { display: none; text-align: center; padding: 40px; }
.loading.show { display: block; }
.spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 空状态 ── */
.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-primary); }
