/* 观点分享 - 主样式 */

:root {
  --bg: #fafaf9;
  --card-bg: #ffffff;
  --text: #1c1917;
  --text-secondary: #78716c;
  --text-muted: #a8a29e;
  --border: #e7e5e4;
  --accent: #0369a1;
  --accent-hover: #0284c7;
  --tag-bg: #f0f9ff;
  --tag-text: #0369a1;
  --radius: 8px;
  --max-width: 720px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header 新设计 ===== */
.site-header {
  padding: 40px 0 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
  background: var(--card-bg);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-logo {
  width: 60px;
  height: 60px;
  border-radius: 0;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text { }

.site-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.site-tagline {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.header-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  transition: color 0.2s, border-color 0.2s;
}
.header-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.header-desc {
  padding: 16px 0 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  border-top: 1px solid var(--border);
}
.header-desc strong {
  color: var(--text);
  font-weight: 600;
}

/* 标签筛选导航 */
.header-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 16px;
}

.tag-btn {
  display: inline-block;
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.tag-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tag-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== Article List ===== */
.article-list { }

.article-card {
  display: block;
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.article-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.article-card .card-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.article-card .card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.5;
}

.article-card .card-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .card-tags {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 100px;
}

/* ===== Article Content ===== */
.article-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
}

.article-content h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.4;
  letter-spacing: -0.5px;
}

.article-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.article-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
}

.article-content p {
  margin-bottom: 16px;
  font-size: 15px;
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 16px;
  margin: 20px 0;
  color: var(--text-secondary);
  background: var(--tag-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-content blockquote p {
  margin-bottom: 0;
}

.article-content ul, .article-content ol {
  margin: 12px 0 20px 20px;
}

.article-content li {
  margin-bottom: 6px;
  font-size: 15px;
}

.article-content code {
  background: #f5f5f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: "SF Mono", "Fira Code", monospace;
}

.article-content pre {
  background: #1c1917;
  color: #e7e5e4;
  padding: 16px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 16px 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 13px;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.article-content th,
.article-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.article-content th {
  background: #fafaf9;
  font-weight: 600;
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.article-content a {
  color: var(--accent);
  text-decoration: none;
}
.article-content a:hover {
  text-decoration: underline;
}

/* ===== Article Nav ===== */
.article-nav {
  margin-top: 24px;
}

.back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
}
.back-link:hover {
  text-decoration: underline;
}

/* ===== Footer ===== */
.site-footer {
  margin-top: 64px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.site-footer p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Loading ===== */
.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 0;
  font-size: 15px;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .site-header { padding: 28px 0 0; margin-bottom: 24px; }
  .header-top { flex-direction: column; align-items: flex-start; gap: 12px; }
  .header-desc { font-size: 13px; }
  .article-card { padding: 16px 18px; }
  .article-card .card-title { font-size: 16px; }
  .article-content { padding: 24px 18px; }
  .article-content h1 { font-size: 22px; }
  .article-content h2 { font-size: 18px; }
}
