/* Simple Theme Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

header {
  border-bottom: 2px solid #eee;
  margin-bottom: 30px;
  padding-bottom: 20px;
}

header h1 {
  margin: 0;
  font-size: 2em;
}

header h1 a {
  text-decoration: none;
  color: #333;
}

nav a {
  margin-right: 20px;
  text-decoration: none;
  color: #666;
  font-weight: 500;
}

nav a:hover {
  color: #333;
}

article {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

article h2 a {
  text-decoration: none;
  color: #333;
}

article h2 a:hover {
  color: #0066cc;
}

time {
  color: #666;
  font-size: 0.9em;
}

.excerpt {
  margin-top: 10px;
  color: #666;
}

.content {
  margin-top: 20px;
}

.tags {
  margin-top: 20px;
  color: #666;
}

.tags a {
  color: #0066cc;
  text-decoration: none;
  margin-right: 10px;
}

footer {
  text-align: center;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  color: #666;
}

/* 分页组件 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-top: 40px;
  padding: 20px 0;
  list-style: none;
}

.pagination .page-number,
.pagination .extend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 36px;
  padding: 0 14px;
  margin: 0 3px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination .page-number.current {
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  font-weight: 700;
}

.pagination .page-number:hover:not(.current) {
  color: #fff;
  background: #667eea;
  border-color: #667eea;
}

.pagination .extend {
  font-size: 13px;
  padding: 0 18px;
  border-radius: 18px;
  color: #3498db;
  font-weight: 600;
}

.pagination .extend:hover {
  color: #fff;
  background: #3498db;
  border-color: #3498db;
}

.pagination .space {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 36px;
  margin: 0 6px;
  color: #999;
  font-size: 16px;
  letter-spacing: 2px;
}

@media (max-width: 768px) {
  .pagination .page-number,
  .pagination .extend {
    min-width: 32px;
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    margin: 0 2px;
  }
}

/* Hexo Note 自定义样式 */
.hexo-note {
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid;
  padding: 16px;
  position: relative;
  transition: all 0.3s ease;
  font-size: 0.95em;
  line-height: 1.6;
}

.hexo-note:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.hexo-note .note-title {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.hexo-note .note-icon {
  font-size: 1.1em;
  margin-right: 6px;
}

/* 确保note内容正确显示 */
.hexo-note p {
  margin: 0;
}

.hexo-note ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.hexo-note li {
  margin-bottom: 4px;
}

.hexo-note strong {
  font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hexo-note {
    margin: 15px 0;
    padding: 12px;
    font-size: 0.9em;
  }
}

/* Virtual DOM 博客文章专用样式 */
.post-content {
  font-size: 16px;
  line-height: 1.8;
}

/* 美化标题 */
.post-content h2 {
  color: #2c3e50;
  border-left: 4px solid #3498db;
  padding-left: 15px;
  margin: 30px 0 20px 0;
  font-size: 1.5em;
  font-weight: 600;
}

.post-content h3 {
  color: #34495e;
  margin: 25px 0 15px 0;
  font-size: 1.3em;
  font-weight: 600;
}

/* 引用框样式 */
.post-content blockquote {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-left: 5px solid #3498db;
  margin: 20px 0;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
}

.post-content blockquote::before {
  content: "💡";
  font-size: 1.5em;
  position: absolute;
  top: 15px;
  left: 15px;
}

.post-content blockquote p {
  margin: 0 0 0 30px;
  font-weight: 500;
}

/* 代码块美化 */
.post-content pre {
  background: #2d3748;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  overflow-x: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
}

.post-content pre::before {
  content: "💻 Code";
  position: absolute;
  top: 8px;
  right: 15px;
  font-size: 12px;
  color: #a0aec0;
  font-weight: 500;
}

.post-content code {
  background: #f7fafc;
  color: #e53e3e;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
}

.post-content pre code {
  background: transparent;
  color: #e2e8f0;
  padding: 0;
}

/* 表格美化 */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.post-content table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: 600;
}

.post-content table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e2e8f0;
}

.post-content table tr:nth-child(even) {
  background: #f8f9fa;
}

.post-content table tr:hover {
  background: #e8f4fd;
  transition: background 0.3s ease;
}

/* 特殊提示框 */
.post-content .highlight-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 步骤列表美化 */
.post-content ol {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
}

.post-content ol li {
  counter-increment: step-counter;
  margin: 15px 0;
  padding: 15px 20px;
  background: #f8f9fa;
  border-left: 4px solid #3498db;
  border-radius: 0 8px 8px 0;
  position: relative;
}

.post-content ol li::before {
  content: counter(step-counter);
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  background: #3498db;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

/* 无序列表美化 */
.post-content ul {
  list-style: none;
  padding-left: 0;
}

.post-content ul li {
  position: relative;
  padding: 8px 0 8px 30px;
  margin: 8px 0;
}

.post-content ul li::before {
  content: "✨";
  position: absolute;
  left: 0;
  top: 8px;
  font-size: 16px;
}

/* 特殊emoji列表 */
.post-content ul li:has-text("✅")::before {
  content: "";
}

.post-content ul li:has-text("❌")::before {
  content: "";
}

.post-content ul li:has-text("💡")::before {
  content: "";
}

/* 段落间距 */
.post-content p {
  margin: 16px 0;
  text-align: justify;
}

/* 强调文本 */
.post-content strong {
  color: #2c3e50;
  font-weight: 600;
}

.post-content em {
  color: #7f8c8d;
  font-style: italic;
}

/* 链接样式 */
.post-content a {
  color: #3498db;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.post-content a:hover {
  color: #2980b9;
  border-bottom-color: #2980b9;
}

/* 分隔线美化 */
.post-content hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3498db, transparent);
  margin: 40px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .post-content {
    font-size: 14px;
  }

  .post-content h2 {
    font-size: 1.3em;
  }

  .post-content h3 {
    font-size: 1.2em;
  }

  .post-content pre {
    padding: 15px;
    font-size: 13px;
  }

  .post-content table {
    font-size: 14px;
  }

  .post-content ol li {
    padding: 12px 15px;
  }
}

/* ===== 头部布局：标题 + 导航 + 搜索栏 ===== */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.header-top h1 {
  margin: 0;
  font-size: 1.8em;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav a {
  margin-right: 16px;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

nav a:hover {
  background: #f0f0f0;
}

/* ===== 搜索栏 ===== */
.search-wrap {
  margin-top: 16px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form:focus-within {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.search-form .fas {
  color: #999;
  font-size: 14px;
}

.search-form input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #333;
}

.search-form input::placeholder {
  color: #aaa;
}

.search-form button {
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.search-form button:hover {
  opacity: 0.9;
}

/* ===== 过滤按钮 ===== */
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 13px;
  color: #888;
}

.filter-btn,
.filter-btn-home {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn-home:hover {
  border-color: #c0c8e0;
  color: #333;
}

.filter-btn--thought {
  border-color: #e8d5b7;
  color: #a67c00;
}

.filter-btn--thought:hover,
.filter-btn--thought.filter-btn--active {
  background: #fff8e7;
  border-color: #d4a800;
  color: #8a6500;
}

.filter-btn--tech {
  border-color: #c3d4e8;
  color: #2a5298;
}

.filter-btn--tech:hover,
.filter-btn--tech.filter-btn--active {
  background: #e8f0fd;
  border-color: #3498db;
  color: #1a4a7a;
}

/* ===== 文章列表（首页 + 搜索页共用） ===== */
.post-list .post-item {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.post-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.post-item-header h2 {
  margin: 0;
  font-size: 1.25em;
  font-weight: 600;
}

.post-item-header h2 a {
  text-decoration: none;
  color: #2c3e50;
  transition: color 0.2s;
}

.post-item-header h2 a:hover {
  color: #667eea;
}

.post-item-header time {
  color: #888;
  font-size: 0.85em;
  white-space: nowrap;
}

/* ===== 类型徽章 ===== */
.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.type-badge--thought {
  background: #fff8e7;
  color: #a67c00;
  border: 1px solid #e8d5b7;
}

.type-badge--tech {
  background: #e8f0fd;
  color: #2a5298;
  border: 1px solid #c3d4e8;
}

/* ===== 标签行 ===== */
.post-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.post-tag:hover {
  background: #e8e8e8;
  color: #333;
}

/* ===== 搜索结果 ===== */
.search-results-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.result-count {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* ===== 无结果 ===== */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.no-results .fas {
  font-size: 48px;
  margin-bottom: 16px;
  color: #ddd;
}

.no-results p {
  margin: 4px 0;
  font-size: 15px;
}

.no-results-hint {
  font-size: 13px;
  color: #bbb;
}

/* ===== 文章页头部 ===== */
.post-header-meta {
  margin-bottom: 12px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  nav a {
    margin-right: 8px;
    padding: 4px 6px;
    font-size: 13px;
  }

  .search-form {
    padding: 6px 10px;
  }

  .search-form button {
    padding: 5px 12px;
  }

  .post-item-header {
    flex-direction: column;
    gap: 4px;
  }

  .post-item-header h2 {
    font-size: 1.1em;
  }

  .filter-row {
    gap: 6px;
  }

  .filter-btn,
  .filter-btn-home {
    padding: 3px 10px;
    font-size: 12px;
  }
}