/* PaperMod Theme - 简洁边框 + 白色背景 + 蓝色强调 */

:root {
  --bg: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --bg-code: #f5f5f5;
  --text: #343434;
  --text-secondary: #6b6b6b;
  --text-light: #999999;
  --border: #e8e8e8;
  --accent: #0066cc;
  --accent-hover: #004499;
  --accent-light: rgba(0, 102, 204, 0.08);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --radius: 6px;
}

[data-theme="dark"] {
  --bg: #1a1b26;
  --bg-secondary: #16161e;
  --bg-card: #1f2335;
  --bg-code: #24283b;
  --text: #a9b1d6;
  --text-secondary: #737aa2;
  --text-light: #565f89;
  --border: #292e42;
  --accent: #7aa2f7;
  --accent-hover: #89b4fa;
  --accent-light: rgba(122, 162, 247, 0.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

/* Header - PaperMod: 无背景，底部粗线 */
header {
  padding: 2rem 0 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 3px solid var(--text);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.site-title { font-size: 1.5rem; font-weight: 700; color: var(--text); }
nav { display: flex; gap: 2rem; }
nav a { color: var(--text-secondary); font-size: 0.95rem; }
nav a:hover { color: var(--accent); }

.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 4px;
  padding: 0.3rem 0.5rem; cursor: pointer; font-size: 0.9rem;
}
.theme-toggle:hover { border-color: var(--accent); }

/* Search - PaperMod: 无阴影 */
.search-form { display: flex; gap: 0; margin-bottom: 2rem; }
.search-input {
  flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--border);
  border-right: none; background: var(--bg); font-size: 0.95rem;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.search-btn {
  padding: 0.75rem 1.5rem; background: var(--accent); color: #fff;
  border: 1px solid var(--accent); font-size: 0.9rem;
}

/* Post cards - PaperMod: 左边框样式 */
.post-card {
  padding: 1.25rem 0 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--border);
  transition: border-color 0.2s;
}
.post-card:hover { border-left-color: var(--accent); }
.post-card-title { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.4rem; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--accent); }
.post-card-summary { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 0.5rem; }
.post-card-meta { font-size: 0.85rem; color: var(--text-light); display: flex; gap: 1rem; }
.post-card-cover { width: 100%; height: 220px; object-fit: cover; margin-bottom: 1rem; border-radius: var(--radius); }

.tag {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 3px;
  background: var(--accent-light); color: var(--accent); font-size: 0.8rem;
}

/* Pagination - PaperMod */
.pagination { display: flex; justify-content: center; gap: 0.3rem; margin: 2.5rem 0; }
.pagination a, .pagination span { padding: 0.5rem 1rem; font-size: 0.9rem; }
.pagination a { border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: #fff; border: 1px solid var(--accent); }

/* Article - PaperMod */
.article-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 3px solid var(--accent); }
.article-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.article-meta { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; }
.article-cover { width: 100%; border-radius: var(--radius); margin-bottom: 2rem; }
.article-tags { display: flex; gap: 0.5rem; }

.toc { margin-bottom: 2rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); }
.toc-title { font-weight: 600; margin-bottom: 0.75rem; font-size: 0.9rem; color: var(--accent); }
.toc ul { list-style: none; }
.toc li { margin: 0.25rem 0; }
.toc a { color: var(--text-secondary); font-size: 0.9rem; }
.toc a:hover { color: var(--accent); }
.toc li[data-level="3"] { padding-left: 1rem; }

.article-content {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.article-content h2 { font-size: 1.5rem; margin: 2rem 0 1rem; font-weight: 600; }
.article-content h3 { font-size: 1.2rem; margin: 1.5rem 0 0.75rem; }
.article-content p { margin-bottom: 1.25rem; }
.article-content blockquote {
  border-left: 3px solid var(--accent); padding: 0.75rem 1rem;
  margin: 1.5rem 0; color: var(--text-secondary); background: var(--bg-secondary);
}
.article-content pre { background: var(--bg-code); padding: 1rem; overflow-x: auto; margin: 1rem 0; border-radius: var(--radius); }
.article-content code { font-family: "SF Mono", monospace; font-size: 0.9em; }
.article-content :not(pre) > code { background: var(--bg-code); padding: 0.1rem 0.3rem; border-radius: 2px; }
.article-content img { max-width: 100%; margin: 1.5rem 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 0.6rem; }
.article-content th { background: var(--bg-secondary); font-weight: 600; }

.tags-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-item { padding: 0.4rem 0.8rem; border: 1px solid var(--border); border-radius: 3px; font-size: 0.9rem; }
.tag-item:hover { border-color: var(--accent); color: var(--accent); }
.tag-count { opacity: 0.6; }

.about-content { padding: 2rem 0; border-top: 1px solid var(--border); }
.about-content p { margin-bottom: 1rem; }

footer { padding: 2rem 0; margin-top: 3rem; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-copyright { color: var(--text-secondary); font-size: 0.85rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.85rem; }

.empty-state { text-align: center; padding: 4rem 0; color: var(--text-secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.admin-form { border: 1px solid var(--border); padding: 2rem; border-radius: var(--radius); }
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9rem; }
.form-input, .form-textarea {
  width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--border);
  background: var(--bg); font-size: 0.95rem;
}
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--accent); }
.form-textarea { min-height: 300px; font-family: monospace; font-size: 0.85rem; resize: vertical; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }
.form-checkbox { display: flex; align-items: center; gap: 0.5rem; }
.form-checkbox input { width: auto; }
.btn { display: inline-block; padding: 0.65rem 1.3rem; border: none; cursor: pointer; font-size: 0.9rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: #dc3545; color: #fff; }
.btn-secondary { background: var(--bg-secondary); color: var(--text); border: 1px solid var(--border); }
.admin-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

.admin-list { list-style: none; }
.admin-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem; border: 1px solid var(--border); margin-bottom: 0.5rem;
  border-radius: var(--radius);
}
.admin-item:hover { border-color: var(--accent); }
.admin-item-info { flex: 1; }
.admin-item-title { font-weight: 600; }
.admin-item-meta { font-size: 0.8rem; color: var(--text-secondary); }
.admin-item-actions { display: flex; gap: 0.5rem; }

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .article-title { font-size: 1.6rem; }
  .form-row { flex-direction: column; }
  .admin-item { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .footer-inner { flex-direction: column; gap: 1rem; }
}
