/* ========================================
   AI 趋势日报 · 统一设计模板
   每日 7:00 更新 · 开源 AI 工具风向标
   ======================================== */

:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-hover: #fff3e6;
  --border: #fed7aa;
  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-tertiary: #a8a29e;
  --accent: #ea580c;
  --accent-hover: #c2410c;
  --accent-light: #fff3e6;
  --accent-gradient: linear-gradient(135deg, #ea580c, #f97316);
  --code-bg: #1c1917;
  --code-text: #f5f5f4;
  --max-width: 820px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 10px -2px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text-primary); line-height: 1.6; font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* --- Navigation --- */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,247,237,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); padding: 0 24px;
}
nav .nav-inner {
  max-width: var(--max-width); margin: 0 auto; display: flex;
  align-items: center; height: 60px; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
nav .nav-inner::-webkit-scrollbar { display: none; }
.nav-brand { font-size: 15px; font-weight: 700; color: var(--accent); white-space: nowrap; margin-right: 12px; flex-shrink: 0; }
.nav-brand span { color: var(--text-primary); }
.nav-brand sup { font-size: 9px; color: var(--text-tertiary); font-weight: 500; margin-left: 2px; }
.nav-links { display: flex; gap: 4px; overflow-x: auto; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--text-secondary); text-decoration: none; padding: 6px 10px; border-radius: 6px; white-space: nowrap; transition: all 0.15s; flex-shrink: 0; }
.nav-links a:hover { background: var(--accent-light); color: var(--accent); }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* --- Header --- */
.article-header { padding: 40px 0 28px; }
.article-header .top-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.article-header .date-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-light); padding: 5px 14px; border-radius: 20px;
  letter-spacing: 0.3px;
}
.article-header .date-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.article-header .update-info { font-size: 12px; color: var(--text-tertiary); }
.article-header h1 { font-size: 28px; font-weight: 700; line-height: 1.3; letter-spacing: -0.4px; margin-bottom: 8px; }
.article-header .subtitle { font-size: 15px; color: var(--text-secondary); font-weight: 400; line-height: 1.5; }

/* --- Source filter tags --- */
.source-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.source-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 4px 12px;
  border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-secondary); background: var(--surface);
}

/* --- Project cards --- */
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow); transition: all 0.2s;
  display: flex; gap: 16px; align-items: flex-start;
}
.project-card:hover { box-shadow: var(--shadow-md); border-color: #fbd38d; }
.project-card .icon {
  flex-shrink: 0; width: 44px; height: 44px;
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.project-card .icon.github { background: #0f172a; color: #fff; }
.project-card .icon.huggingface { background: #f472b6; color: #fff; }
.project-card .icon.other { background: #e2e8f0; color: #475569; }
.project-card .body { flex: 1; min-width: 0; }
.project-card .top-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.project-card .source-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; letter-spacing: 0.3px;
}
.project-card .source-badge.github { background: #e2e8f0; color: #1e293b; }
.project-card .source-badge.huggingface { background: #fce7f3; color: #9d174d; }
.project-card .source-badge.trending { background: #fef3c7; color: #92400e; }
.project-card .project-name {
  font-size: 17px; font-weight: 600; color: var(--text-primary);
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.project-card .project-name:hover { color: var(--accent); }
.project-card .project-name .ext-link { font-size: 13px; color: var(--text-tertiary); }
.project-card .desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 4px 0 8px; }
.project-card .meta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-tertiary); }
.project-card .meta-row .stars { font-weight: 600; color: var(--text-secondary); }
.project-card .meta-row .stars::before { content: "⭐ "; }
.project-card .pm-take {
  display: inline-block; font-size: 12px;
  background: var(--accent-light); color: var(--accent);
  padding: 3px 10px; border-radius: 6px; margin-top: 8px;
  font-weight: 500;
}
.project-card .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.project-card .tags .tag {
  font-size: 11px; padding: 2px 8px; border-radius: 4px;
  background: #fafafa; color: var(--text-tertiary); border: 1px solid var(--border);
}

/* --- Section separator --- */
.section-title {
  font-size: 18px; font-weight: 600; color: var(--text-primary);
  margin: 28px 0 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-light);
  display: flex; align-items: center; gap: 8px;
}
.section-title .count { font-size: 13px; font-weight: 400; color: var(--text-tertiary); background: var(--surface); padding: 1px 10px; border-radius: 999px; }

/* --- History list (archived issues) --- */
.history-list { list-style: none; padding: 0; }
.history-list li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; align-items: baseline; gap: 12px; font-size: 14px; }
.history-list li:last-child { border-bottom: none; }
.history-list .date { color: var(--text-tertiary); font-size: 13px; white-space: nowrap; }
.history-list .title { color: var(--text-primary); font-weight: 500; flex: 1; }
.history-list .read-link { color: var(--accent); font-size: 13px; text-decoration: none; margin-left: auto; flex-shrink: 0; }
.history-list .read-link:hover { text-decoration: underline; }

/* --- Footer --- */
footer {
  margin-top: 40px; padding: 28px 0;
  border-top: 1px solid var(--border);
  text-align: center; color: var(--text-tertiary); font-size: 13px;
}
footer .update-time { font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; }

/* --- Responsive --- */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .article-header h1 { font-size: 22px; }
  .project-card { padding: 16px; flex-direction: column; gap: 12px; }
  .project-card .icon { width: 36px; height: 36px; font-size: 16px; }
  nav .nav-inner { gap: 2px; }
  .article-header { padding: 28px 0 20px; }
  .nav-links a { font-size: 12px; padding: 4px 8px; }
}
