/* 文章模块专属样式 */
.article-search-bar {
  display: flex; gap: 8px; margin-bottom: 12px; align-items: center;
}
.article-search-bar input {
  flex: 1; padding: 10px 14px; border-radius: 8px; border: 1px solid #dde1e6; background: #fff; font-size: 14px;
}
.article-search-bar button {
  white-space: nowrap; padding: 10px 18px; border-radius: 8px; background: #764ba2; color: #fff; border: none; font-size: 14px; cursor: pointer;
}
.article-search-bar button:hover { background: #5b3791; }
.article-category-filter {
  display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap;
}
.article-category-filter span.label {
  line-height: 32px; color: #555; font-size: 14px; margin-right: 4px;
}
.article-category-filter button {
  padding: 6px 12px; border-radius: 6px; border: 1px solid #dde1e6; background: #fff; color: #555; font-size: 13px; cursor: pointer;
}
.article-category-filter button.active { background: #764ba2; border-color: #764ba2; color: #fff; }
.article-category-filter button:hover:not(.active) { background: #f2f3f7; color: #5b3791; }
/* 搜索关键词高亮 */
.search-match { background: #fff8c6; color: #a06600; padding: 1px 3px; border-radius: 2px; }

/* 侧栏「文章」下的分类子菜单 */
.nav-sub { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 2px 0 4px 12px; margin-top: 2px; }
.nav-sub a {
  display: inline-block; padding: 3px 8px; border-radius: 6px; color: #555; text-decoration: none; font-size: 13px;
}
.nav-sub a:hover { background: #f2f3f7; color: #5b3791; }
.nav-sub a.active { background: #efe8fb; color: #764ba2; font-weight: 600; }

/* 分类徽标 */
.cat-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; color: #fff; background: #764ba2; margin-left: 6px; vertical-align: 2px;
}

/* 独立写文章窗口 */
.editor-card textarea, .editor-card input[type="text"] {
  width: 100%; border: 1px solid #dde1e6; border-radius: 8px; padding: 12px 14px; font-size: 14px; background: #fff; color: #333;
}
.editor-card textarea { min-height: 260px; line-height: 1.6; resize: vertical; }
.editor-card textarea:focus, .editor-card input[type="text"]:focus { outline: none; border-color: #764ba2; }
.editor-card select {
  padding: 9px 12px; border-radius: 8px; border: 1px solid #dde1e6; background: #fff; color: #333; font-size: 14px;
}
.article-preview img, .article-body img { max-width: 100%; border-radius: 8px; margin: 6px 0; }
.article-body .img-embed { display: block; text-align: center; }

.navbar { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(150,150,180,.15); flex-wrap: wrap; }
.navbar .site { font-weight: 700; font-size: 18px; margin-right: auto; }
.navbar a { color: #764ba2; text-decoration: none; font-size: 14px; }
.navbar a:hover { text-decoration: underline; }
.navbar a.active { font-weight: 700; }
.article-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

/* 文章列表卡片 */
.article-card { cursor: pointer; }
.article-card h3 { margin: 0 0 6px; font-size: 18px; color: #333; }
.article-card h3 a { color: inherit; text-decoration: none; }
.article-card h3 a:hover { color: #764ba2; }
.article-meta { font-size: 13px; color: #999; display: flex; gap: 14px; align-items: center; }

/* 文章正文 */
.article-body { white-space: pre-wrap; line-height: 1.8; font-size: 15.5px; margin: 18px 0; color: #2b2f38; }

/* 正文/标题卡片化：避免与渐变背景混合 */
body.layout2 #articleBox {
  background: #ffffff;
  border: 1px solid #eceef2;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(20, 24, 34, .10);
  padding: 30px 34px;
}
body.layout2 #articleBox #articleTitle { color: #1a1d25; }
body.layout2 .article-meta { color: #6b7280; }
body.layout2 .article-meta .del-btn { color: #c4433b; border-color: #efd5d3; background: #fff; }

/* 评论区标题 */
.comment-title { margin: 26px 0 12px; font-size: 17px; font-weight: 700; color: #333; }

@media (max-width:560px){
  .navbar { gap: 12px; }
}
/* 文章操作条（点赞 / 收藏） */
.article-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.article-acts .act-btn { background: #f2f0fa; border: 1px solid #e3e0ee; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 13px; color: #3a3f4c; transition: background .15s, color .15s; }
.article-acts .act-btn:hover { background: #efe8fb; color: #764ba2; }

/* 评论排序 */
.comment-title { display: flex; align-items: center; justify-content: space-between; }
.comment-title .comment-sort { margin-left: auto; width: auto; }

/* 通知分类标签 */
.notif-tabs { display: none; gap: 8px; margin: 10px 0 4px; flex-wrap: wrap; }
.notif-tabs button { border: 1px solid #e3e0ee; background: #f4f3fa; color: #555; padding: 5px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; }
.notif-tabs button.active { background: #764ba2; color: #fff; border-color: #764ba2; }
.notif-tabs button:hover { background: #efe8fb; }
/* 文章详情页作者可点击跳转主页 */
.article-author { font-weight: 600; color: #764ba2; text-decoration: none; cursor: pointer; }
.article-author:hover { text-decoration: underline; }
