/* ===== FlowingData 风格主题 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  background: #f8f9fa; color: #333; line-height: 1.8;
}
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }

.top-nav {
  display: flex; flex-wrap: wrap; gap: 2px; justify-content: center;
  padding: 14px 0 10px; border-bottom: 1px solid #e5e7eb; margin-bottom: 24px;
}
.nav-link {
  padding: 4px 14px; border-radius: 4px; font-size: 0.82em;
  text-decoration: none; color: #666; font-family: -apple-system, sans-serif;
  transition: all 0.15s; letter-spacing: 0.3px;
}
.nav-link:hover { color: #222; background: #f0f0f0; }
.nav-link.active { color: #222; font-weight: 600; }

.site-header { text-align: center; padding: 40px 0 8px; }
.site-header h1 {
  font-size: 1.6em; font-weight: 400; color: #222;
  font-family: -apple-system, "Helvetica Neue", sans-serif;
  letter-spacing: 0.5px;
}
.subtitle { color: #888; margin-top: 6px; font-size: 0.82em; font-family: -apple-system, sans-serif; }
.all-link { color: #666; text-decoration: none; }
.all-link:hover { color: #222; text-decoration: underline; }

.posts-list { display: flex; flex-direction: column; }
.post-card {
  padding: 24px 0; border-bottom: 1px solid #e8e8e8;
  transition: opacity 0.15s;
}
.post-card:last-child { border-bottom: none; }
.post-card:hover { opacity: 0.85; }
.post-link { text-decoration: none; color: inherit; display: block; }
.post-link h2 {
  font-size: 1.15em; font-weight: 500; color: #222;
  line-height: 1.5; margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
}
.post-info {
  display: flex; gap: 12px; align-items: center;
  color: #999; font-size: 0.78em; margin-bottom: 6px;
  font-family: -apple-system, sans-serif;
}
.post-preview {
  color: #666; font-size: 0.85em; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.no-result { color: #bbb; text-align: center; padding: 60px 20px; font-size: 1em; }

.category-tag {
  display: inline-block; font-size: 0.7em; padding: 1px 8px;
  border-radius: 3px; font-weight: 500; font-family: -apple-system, sans-serif;
  margin-left: auto;
}
.cat-证券 { background: #e8f5e9; color: #2e7d32; }
.cat-黑苹果 { background: #fbe9e7; color: #c62828; }
.cat-硬件 { background: #fff8e1; color: #f57f17; }
.cat-AI { background: #e3f2fd; color: #1565c0; }
.cat-其他 { background: #f5f5f5; color: #757575; }

.main-layout { display: flex; gap: 40px; align-items: flex-start; }
.left-col { flex: 1; min-width: 0; }
.right-col { width: 220px; flex-shrink: 0; }

.calendar-widget { background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; padding: 16px; margin-top: 20px; }
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-header button { background: none; border: 1px solid #ddd; color: #666; font-size: 1em; padding: 2px 8px; border-radius: 3px; cursor: pointer; }
.cal-header button:hover { background: #f0f0f0; color: #222; }
.cal-header span { font-size: 0.85em; font-weight: 500; color: #444; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 0.72em; color: #bbb; margin-bottom: 4px; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day { text-align: center; padding: 6px 0; font-size: 0.78em; color: #555; border-radius: 3px; cursor: pointer; position: relative; font-family: -apple-system, sans-serif; }
.cal-day:hover { background: #f0f0f0; }
.cal-day.today { font-weight: 700; color: #222; }
.cal-day.selected { background: #e3f2fd; color: #1565c0; font-weight: 600; }
.cal-day .dot { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 3px; height: 3px; border-radius: 50%; background: #4caf50; }
.cal-legend { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.72em; color: #bbb; font-family: -apple-system, sans-serif; }
.cal-legend .dot { width: 5px; height: 5px; border-radius: 50%; background: #4caf50; display: inline-block; }

.tag-cloud { margin-top: 16px; }
.tag-title { font-size: 0.82em; color: #444; margin-bottom: 8px; font-weight: 500; font-family: -apple-system, sans-serif; }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-item { background: #f0f0f0; color: #666; font-size: 0.72em; padding: 2px 8px; border-radius: 3px; cursor: pointer; transition: all 0.15s; font-family: -apple-system, sans-serif; }
.tag-item:hover { background: #e3f2fd; color: #1565c0; }
.tag-item.tag-active { background: #e3f2fd; color: #1565c0; font-weight: 600; }
.tag-item sup { font-size: 0.7em; margin-left: 1px; color: #bbb; }
.tag-item.tag-active sup { color: #1565c0; }
.mini-tag { display: inline-block; background: #f0f0f0; color: #888; font-size: 0.65em; padding: 1px 5px; border-radius: 3px; margin-left: 3px; }
.post-tags { display: inline-flex; gap: 2px; }

.post-nav { margin-bottom: 20px; }
.post-nav a { color: #999; text-decoration: none; font-size: 0.82em; font-family: -apple-system, sans-serif; }
.post-nav a:hover { color: #222; }

.post-full { background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; padding: 40px; }
.post-full h1 { font-size: 1.6em; font-weight: 500; color: #222; line-height: 1.4; margin-bottom: 8px; font-family: Georgia, "Times New Roman", serif; }
.post-full h2 { font-size: 1.2em; font-weight: 500; color: #333; margin: 28px 0 10px; line-height: 1.4; font-family: Georgia, "Times New Roman", serif; }
.post-full h3 { font-size: 1.05em; font-weight: 500; color: #444; margin: 20px 0 8px; }
.post-full p { margin: 12px 0; line-height: 1.9; color: #444; }
.post-full hr { border: none; border-top: 1px solid #e5e7eb; margin: 24px 0; }
.post-full table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.85em; }
.post-full th, .post-full td { padding: 8px 10px; border: 1px solid #e5e7eb; text-align: left; }
.post-full th { background: #f8f9fa; color: #333; font-weight: 600; }
.post-full tr:nth-child(even) { background: #fafafa; }
.post-full b, .post-full strong { color: #222; }
.post-full code { background: #f5f5f5; padding: 2px 5px; border-radius: 3px; font-size: 0.85em; color: #d63384; font-family: "SF Mono", Monaco, monospace; }
.post-full pre { background: #f8f9fa; padding: 14px; border-radius: 6px; overflow-x: auto; margin: 14px 0; border: 1px solid #e5e7eb; font-size: 0.82em; line-height: 1.6; }
.post-meta { display: flex; gap: 16px; color: #999; font-size: 0.82em; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #e5e7eb; font-family: -apple-system, sans-serif; }

.chat-log { display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 16px 20px; border-radius: 6px; line-height: 1.7; }
.msg.user { background: #f8f9fa; border: 1px solid #e5e7eb; border-left: 3px solid #1565c0; }
.msg.assistant { background: #fff; border: 1px solid #e5e7eb; border-left: 3px solid #2e7d32; }
.msg-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.role-tag { font-size: 0.72em; padding: 1px 8px; border-radius: 3px; font-weight: 500; font-family: -apple-system, sans-serif; }
.user-tag { background: #e3f2fd; color: #1565c0; }
.ai-tag { background: #e8f5e9; color: #2e7d32; }
.time { color: #bbb; font-size: 0.72em; }
.content { font-size: 0.88em; line-height: 1.7; color: #444; }
.content pre { background: #f8f9fa; padding: 10px; border-radius: 4px; overflow-x: auto; margin: 8px 0; border: 1px solid #e5e7eb; font-size: 0.82em; }
.content code { background: #f5f5f5; padding: 1px 4px; border-radius: 3px; font-size: 0.88em; color: #d63384; }

.site-footer { text-align: center; color: #ccc; font-size: 0.78em; padding: 28px 0; margin-top: 40px; border-top: 1px solid #e8e8e8; font-family: -apple-system, sans-serif; }

.search-bar { margin-bottom: 16px; }
#search-input {
  width: 100%; padding: 10px 14px; border: 1px solid #e5e7eb;
  border-radius: 6px; font-size: 0.85em; background: #fff; color: #333;
  font-family: -apple-system, sans-serif; outline: none; transition: border-color 0.15s;
}
#search-input:focus { border-color: #1565c0; }
#search-input::placeholder { color: #bbb; }

.pagination {
  display: flex; justify-content: center; gap: 4px;
  padding: 24px 0 8px; flex-wrap: wrap;
}
.page-link {
  display: inline-block; padding: 4px 12px; font-size: 0.82em;
  color: #666; text-decoration: none; border: 1px solid #e5e7eb;
  border-radius: 4px; font-family: -apple-system, sans-serif;
  transition: all 0.15s;
}
.page-link:hover { background: #f0f0f0; color: #222; }
.page-link.current { background: #1565c0; color: #fff; border-color: #1565c0; }
.page-dots { display: inline-block; padding: 4px 4px; color: #bbb; font-size: 0.82em; }

@media (max-width: 768px) {
  .main-layout { flex-direction: column; }
  .right-col { width: 100%; }
  .site-header h1 { font-size: 1.3em; }
  .post-full { padding: 20px; }
  .post-full h1 { font-size: 1.2em; }
}