/* 全局变量 */
:root {
  --primary-color: #667eea;
  --primary-hover: #5a6fd8;
  --secondary-color: #64748b;
  --success-color: #22c55e;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --transition: all 0.2s ease;

  /* 组件库样式变量 */
  --custom-radius: 16px;
  --art-gray-100: #f8fafc;
  --art-gray-200: #e2e8f0;
  --art-gray-300: #cbd5e1;
  --art-gray-500: #64748b;
  --art-gray-600: #475569;
  --art-gray-700: #334155;
  --art-gray-800: #1e293b;
  --art-gray-900: #0f172a;
  --art-gray-200-rgb: 226, 232, 240;
  --art-gray-300-rgb: 203, 213, 225;
  --art-main-bg-color: #ffffff;
  --art-border-color: #e2e8f0;
  --art-border-dashed-color: #cbd5e1;
  --art-text-gray-800: #1e293b;
}

/* iconfont字体 */
@font-face {
  font-family: 'iconfont-sys';
  src: url('../fonts/iconfont.woff2') format('woff2'),
       url('../fonts/iconfont.woff') format('woff'),
       url('../fonts/iconfont.ttf') format('truetype');
  font-display: swap;
}

.iconfont-sys {
  font-family: 'iconfont-sys' !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 消息通知图标 */
.iconsys-xiaoxi:before {
  content: '\e6c2';
}

/* 空状态图标 */
.iconsys-zanwushuju7:before {
  content: '\e8d7';
}

/* 点赞图标 */
.iconsys-dianzan:before {
  content: '\xe747;';
}

/* 收藏图标 */
.iconsys-shoucang:before {
  content: '\xe714;';
}

/* 右箭头图标 */
.iconsys-youjiantou:before {
  content: '\xe659';
}

/* 对勾图标 */
.iconsys-duigou:before {
  content: '\xe621';
}

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  min-height: 42px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--bg-secondary);
  border-color: var(--text-secondary);
}

.full-width {
  width: 100%;
}

/* 页面头部 */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  transition: var(--transition);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo img:not(.logo-image) {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
}

.logo .logo-image {
  height: 44px !important;
  width: auto !important;
  object-fit: contain;
  transition: var(--transition);
  border-radius: 0 !important;
  align-self: center !important;
  vertical-align: middle !important;
}

.logo-image:hover {
  transform: scale(1.05);
}

.logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.search-box {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 45px 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 14px;
  transition: var(--transition);
  background: var(--bg-secondary);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.search-box button:hover {
  background: var(--bg-tertiary);
  color: var(--primary-color);
}

/* header搜索框样式 */
.header-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.header-search-input {
  width: 100%;
  padding: 12px 45px 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 14px;
  transition: var(--transition);
  background: var(--bg-secondary);
}

.header-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.header-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.header-search-btn:hover {
  background: var(--bg-tertiary);
  color: var(--primary-color);
}

.search-icon {
  width: 18px;
  height: 18px;
}

/* 搜索建议框样式 */
#searchSuggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin-top: 8px;
  z-index: 50;
  display: none;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
}

.suggestion-item:hover {
  background: var(--bg-secondary);
}

.suggestion-icon {
  color: var(--text-muted);
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.user-menu:hover {
  background: var(--bg-secondary);
}

.user-menu img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}

.user-menu span {
  font-weight: 500;
  color: var(--text-primary);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  display: none;
  z-index: 50;
  margin-top: 8px;
}

/* 下拉菜单显示状态由JavaScript控制，不再使用CSS hover */

.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.dropdown-menu a:hover {
  background: var(--bg-secondary);
}

.dropdown-menu a:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.dropdown-menu a:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
  color: var(--error-color);
}

/* logo link 样式 */
.logo-link {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  padding-bottom: 4px;
}

/* 用户头像容器（首字母或图片） */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  background: var(--primary-color);
  flex-shrink: 0;
  overflow: hidden;
}

/* 下拉菜单显示控制 */
.dropdown-menu.open,
.dropdown-menu[style*="display: block"] {
  display: block;
}

/* 主要内容区域 */
.main {
  min-height: calc(100vh - 140px);
  padding: 0;
  width: 100%;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* 侧边栏 */
.sidebar {
  position: sticky;
  top: 110px;
}

.sidebar-section {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

.category-item:hover {
  background: var(--bg-secondary);
}

.category-item.active {
  background: transparent;
  color: var(--primary-color);
}

.category-item .count {
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
}

.category-item.active .count {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.tag:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.recommend-articles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recommend-article {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.recommend-article:hover {
  background: var(--bg-tertiary);
  transform: translateX(4px);
}

.recommend-article h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.recommend-article p {
  font-size: 12px;
  color: var(--text-muted);
}

/* 文章列表 */
.article-list {
  min-height: 400px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.list-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.view-modes {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius);
}

.view-mode {
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.view-mode.active {
  background: var(--bg-primary);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.articles-container {
  display: grid;
  gap: 24px;
}

.articles-container.card-view {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.articles-container.list-view {
  grid-template-columns: 1fr;
}

.article-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

/* 紧凑版文章卡片样式 */
.article-card.compact {
  margin-bottom: 16px;
}

.article-card.compact .article-card-inner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.article-card.compact .article-cover.compact {
  width: 120px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-card.compact .article-cover.compact img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card.compact .article-content.compact {
  flex: 1;
  padding: 16px 0;
}

.article-card.compact .article-header {
  margin-bottom: 8px;
}

.article-card.compact .article-category {
  display: inline-block;
  padding: 4px 8px;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 6px;
}

.article-card.compact .article-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.article-card.compact .article-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.article-card.compact .article-title a:hover {
  color: var(--primary-color);
}

.article-card.compact .article-summary {
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card.compact .article-meta.compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 12px;
}

.article-card.compact .meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.article-card.compact .article-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-card.compact .stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
}

.article-card.compact .stat-item i {
  font-size: 10px;
}

.article-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.article-content {
  padding: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.article-author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-author img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.article-category {
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
}

.article-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.article-stats {
  display: flex;
  gap: 16px;
}

.article-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 加载状态 */
.loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.load-more {
  text-align: center;
  margin-top: 40px;
}

/* 模态框 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.close-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:invalid {
  border-color: var(--error-color);
}

.form-actions {
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* 回复表单按钮样式 - 参照submit-comment-btn */
.submit-reply-btn,
.cancel-reply-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.submit-reply-btn:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
}

.cancel-reply-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.cancel-reply-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.submit-reply-btn:active,
.cancel-reply-btn:active {
  transform: translateY(0);
}

.submit-reply-btn:disabled,
.cancel-reply-btn:disabled {
  background: var(--border-color);
  color: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
}

.form-footer {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.form-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* Element UI Message 全局样式 */
.el-message-container {
  position: fixed;
  top: 80px;
  right: 20px;
  left: auto;
  transform: none;
  z-index: 2000;
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  align-items: flex-end;
  pointer-events: none;
  max-height: 80vh;
  overflow: visible;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.el-message {
  background: #fff;
  padding: 8px 16px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  width: auto;
  min-width: auto;
  max-width: 90vw;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: none;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  margin: 2px 0;
  pointer-events: all;
  transform-origin: center top;
}

.el-message.show {
  animation: elMessageFadeIn 0.5s ease, elMessageSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.el-message.success {
  background: linear-gradient(135deg, #67c23a 0%, #5daf34 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(103, 194, 58, 0.3);
}

.el-message.error {
  background: linear-gradient(135deg, #f56c6c 0%, #f78989 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(245, 108, 108, 0.3);
}

.el-message.info {
  background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(64, 158, 255, 0.3);
}

.el-message.warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.el-message-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  backdrop-filter: blur(5px);
}

.el-message-content {
  flex: 1;
  line-height: 1.2;
  letter-spacing: 0.3px;
}

.el-message-close {
  margin-left: 12px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0.7;
  font-size: 16px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
}

.el-message-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.el-message.shifted {
  transform: translateY(100%) scale(0.98);
  opacity: 0.8;
}

.el-message.hiding {
  animation: elMessageSlideOut 0.5s ease forwards;
}

@keyframes elMessageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes elMessageSlideIn {
  0% {
    transform: translateY(-30px) scale(0.8);
    opacity: 0;
  }
  50% {
    transform: translateY(-5px) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes elMessageSlideOut {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
    max-height: 100px;
    margin: 2px 0;
  }
  to {
    transform: translateY(-10px) scale(0.95);
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
  }
}

/* 保留旧式Toast的兼容性 */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  display: none;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  min-width: 300px;
  max-width: 400px;
}

.toast.show {
  display: flex;
  animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success {
  border-left: 4px solid var(--success-color);
}

.toast.error {
  border-left: 4px solid var(--error-color);
}

.toast.warning {
  border-left: 4px solid var(--warning-color);
}

.toast-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.toast-close:hover {
  background: var(--bg-secondary);
}

/* 页脚 */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .header-content {
    height: 60px;
    gap: 16px;
  }

  .logo h1 {
    font-size: 20px;
  }

  .logo .logo-image {
    height: 40px !important;
    width: auto !important;
    border-radius: 0 !important;
    align-self: center !important;
    vertical-align: middle !important;
  }

  .search-box {
    max-width: 200px;
  }

  .user-actions {
    gap: 8px;
  }

  .user-menu span {
    display: none;
  }

  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sidebar {
    position: static;
    order: 2;
  }

  .sidebar-section {
    padding: 16px;
  }

  .main {
    padding: 20px 0;
  }

  .articles-container.card-view {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    margin: 16px;
  }

  .modal-header,
  .modal-body {
    padding: 20px;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .search-box {
    display: none;
  }

  .list-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .article-footer {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* 辅助类 */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* 焦点样式 */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* 选择文本样式 */
::selection {
  background: rgba(37, 99, 235, 0.1);
  color: var(--text-primary);
}

/* 筛选区域样式 */
.filter-section {
  margin-bottom: 32px;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.filter-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.filter-controls {
  display: flex;
  gap: 30px;
  align-items: center;
  margin-bottom: 24px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.filter-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  min-width: 60px;
}

#tagFilters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  max-width: 300px;
  overflow-x: auto;
}

.tag-filter {
  padding: 6px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.tag-filter:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.tag-filter.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-tag {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
  position: relative;
}

/* Element Plus风格菜单样式 */
.category-item {
  position: relative;
  margin-bottom: 4px;
}

/* 通用菜单项样式 */
.category-item > .category-link {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

/* 顶级分类样式 */
.category-item.level-0 > .category-link {
  font-weight: 500;
  margin: 0 8px;
  width: calc(100% - 16px);
}

/* 子分类缩进样式 */
.category-item.level-1 > .category-link {
  padding-left: 44px;
  margin: 0 8px;
  width: calc(100% - 16px);
}

.category-item.level-2 > .category-link {
  padding-left: 68px;
  margin: 0 8px;
  width: calc(100% - 16px);
}

.category-item.level-3 > .category-link {
  padding-left: 92px;
  margin: 0 8px;
  width: calc(100% - 16px);
}

/* 悬停效果 - Element Plus风格 */
.category-item:not(.active) > .category-link:hover {
  background-color: rgba(0, 0, 0, 0.04) !important;
  color: var(--text-primary);
}

/* 激活状态 - Element Plus风格 */
.category-item.active > .category-link {
  background-color: rgba(37, 99, 235, 0.1) !important;
  color: var(--primary-color) !important;
  font-weight: 500;
}

.category-item.active > .category-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* 有子分类的项目样式 */
.category-item.has-children > .category-link::after {
  content: '▶';
  position: absolute;
  right: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

/* 分类文本样式 */
.category-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 移除边框，改为圆角卡片式设计 */
.category-item:last-child > .category-link {
  border-bottom: none;
}

/* 菜单项间距优化 */
.category-item:first-child > .category-link {
  margin-top: 4px;
}

.category-item:last-child > .category-link {
  margin-bottom: 4px;
}

.filter-tag.has-children {
  font-weight: 500;
}

.filter-tag:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.filter-tag.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.filter-tag .count {
  background: rgba(255, 255, 255, 0.2);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  margin-left: 6px;
}

.filter-tag:not(.active) .count {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

/* 移动端筛选区域适配 */
@media (max-width: 768px) {
  .filter-section {
    margin-bottom: 24px;
  }

  .filter-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .filter-controls {
    gap: 12px;
  }

  .filter-group {
    gap: 8px;
  }

  .filter-group label {
    font-size: 13px;
    min-width: 50px;
  }

  .filter-tag {
    padding: 5px 12px;
    font-size: 12px;
  }
}

/* 文章详情页面样式 */
.article-detail {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin-bottom: 40px;
}

.article-header {
  padding: 40px;
}

.article-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 20px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.author-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.author-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.publish-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.article-stats {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.article-categories-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.category-tag {
  padding: 6px 14px;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
}

.tag {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: var(--text-secondary);
}

.article-cover {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.article-content {
  padding: 0 40px 40px;
  line-height: 1.8;
  color: var(--text-primary);
  font-size: 16px;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  margin: 32px 0 16px;
  color: var(--text-primary);
  font-weight: 600;
}

.article-content h1 { font-size: 28px; }
.article-content h2 { font-size: 24px; }
.article-content h3 { font-size: 20px; }
.article-content h4 { font-size: 18px; }

.article-content p {
  margin-bottom: 16px;
  text-align: justify;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 20px 0;
  box-shadow: var(--shadow-md);
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 20px;
  margin: 20px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 40px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  color: var(--error-color);
}

.article-content pre {
  background: #2d3748;
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 20px 0;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
}

.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.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-color);
  padding: 12px;
  text-align: left;
}

.article-content th {
  background: var(--bg-secondary);
  font-weight: 600;
}

.article-content a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.article-content a:hover {
  border-bottom-color: var(--primary-color);
}

.article-footer {
  padding: 30px 40px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.article-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.like-btn.liked {
  background: var(--error-color);
  color: white;
  border-color: var(--error-color);
}

.article-tags-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 评论区样式 */
.comments-section {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 40px 20px;
  border-bottom: 1px solid var(--border-color);
}

.comments-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-stats {
  font-size: 14px;
  color: var(--text-muted);
}

.comment-form {
  padding: 20px 40px 30px;
  border-bottom: 1px solid var(--border-color);
}

.comment-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: var(--transition);
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.char-count {
  font-size: 12px;
  color: var(--text-muted);
}

.comments-list {
  padding: 20px 40px 40px;
}

.comment {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.comment:last-child {
  margin-bottom: 0;
}

.comment-avatar {
  flex-shrink: 0;
}

.comment-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.comment-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.comment-time {
  font-size: 12px;
  color: var(--text-muted);
}

.comment-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 12px;
  word-wrap: break-word;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.comment-action {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.comment-action:hover {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.comment-action.liked {
  color: var(--error-color);
}

.comment-reply {
  margin-left: 56px;
  margin-top: 16px;
  padding-left: 20px;
  border-left: 2px solid var(--border-color);
}

.comment-replies {
  margin-top: 16px;
  padding-left: 20px;
  border-left: 2px solid var(--border-color);
}

.reply-form {
  margin-top: 12px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reply-info {
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.reply-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

.reply-form .comment-input {
  width: 100%;
  min-height: 100px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 16px;
}

.reply-form .comment-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.reply-form .comment-input::placeholder {
  color: var(--text-muted);
}

.reply-content textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  resize: vertical;
  margin-bottom: 12px;
}

.reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.no-comments {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-comments i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.no-comments p {
  font-size: 16px;
}

.load-more {
  text-align: center;
  padding: 20px 40px 40px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  min-height: auto;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
}

.btn-full {
  width: 100%;
}

/* 回到顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  z-index: 100;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* 小模态框 */
.modal-sm {
  max-width: 350px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
}

/* 加载状态 */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-muted);
  gap: 16px;
}

.loading i {
  font-size: 32px;
  animation: spin 1s linear infinite;
}

/* 响应式适配 - 文章详情页 */
@media (max-width: 768px) {
  .article-header {
    padding: 24px 20px;
  }

  .article-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .article-meta {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }

  .article-stats {
    gap: 16px;
  }

  .article-content {
    padding: 0 20px 24px;
    font-size: 15px;
  }

  .article-content h1 { font-size: 24px; }
  .article-content h2 { font-size: 20px; }
  .article-content h3 { font-size: 18px; }
  .article-content h4 { font-size: 16px; }

  .article-footer {
    padding: 20px;
  }

  .article-actions {
    gap: 12px;
  }

  .comments-header,
  .comment-form,
  .comments-list,
  .load-more {
    padding-left: 20px;
    padding-right: 20px;
  }

  .comment {
    gap: 12px;
  }

  .comment-avatar img {
    width: 32px;
    height: 32px;
  }

  .comment-reply {
    margin-left: 44px;
  }

  .comment-replies {
    padding-left: 16px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .article-title {
    font-size: 20px;
  }

  .publish-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .article-stats {
    gap: 12px;
  }

  .stat-item {
    font-size: 12px;
  }

  .article-actions {
    flex-direction: column;
    gap: 8px;
  }

  .comment-actions {
    gap: 12px;
  }

  .comment-action {
    font-size: 11px;
    padding: 3px 6px;
  }

  .reply-actions {
    flex-direction: column;
    gap: 8px;
  }

  .reply-actions .btn {
    width: 100%;
  }

  .reply-form {
    padding: 16px;
  }

  .submit-reply-btn,
  .cancel-reply-btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
  }

  .form-actions {
    flex-direction: column;
    gap: 8px;
  }

  .reply-form .comment-input {
    min-height: 80px;
    padding: 12px;
  }
}

/* 文章列表容器样式 */
#searchResultsList {
  padding: 0;
  margin: 0;
}

/* 文章卡片布局样式 - 直接作为列表项 */
.article-card-layout {
  display: flex;
  flex-direction: row;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  height: 160px; /* 固定高度160px，与article-cover一致 */
  margin-bottom: 20px;
}

.article-card-layout:last-child {
  margin-bottom: 0;
}

/* 选中状态样式 - 应用到列表项 */
.article-card-layout[data-article-id]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

/* 封面图样式 - 左侧方形 */
.article-cover {
  position: relative;
  width: 160px;
  height: 100%; /* 填满父容器高度 */
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-tertiary);
  margin: 0; /* 移除所有边距 */
}

.article-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: var(--transition);
  /* 确保图片铺满整个容器 */
  min-width: 100%;
  min-height: 100%;
}

.article-cover:hover img {
  transform: scale(1.05);
}

.article-cover a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

/* 无封面图片时的占位符 */
.no-cover-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb); /* 淡蓝色渐变背景 */
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: var(--transition);
}

.no-cover-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  opacity: 0.9;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-cover-icon svg {
  width: 100%;
  height: 100%;
}

.no-cover-text {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
}

/* 悬停效果 */
.article-cover:hover .no-cover-placeholder {
  background: linear-gradient(135deg, #bbdefb, #90caf9); /* 悬停时深一点的蓝色 */
}

.article-cover:hover .no-cover-icon {
  transform: scale(1.1);
}

.article-cover:hover .no-cover-text {
  opacity: 1;
}

/* 文章内容部分 - 右侧 */
.article-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0; /* 防止内容溢出 */
  overflow: hidden; /* 防止内容溢出 */
}

/* 文章标题样式 */
.result-title {
  margin: 0;
  line-height: 1.4;
}

.result-title a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  transition: var(--transition);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  border-bottom: none !important; /* 强制去除下划线 */
}

.result-title a:hover {
  color: var(--primary-color);
}

/* 文章摘要样式 */
.result-snippet {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 4px;
}

/* 标签和统计信息容器 */
.result-tags-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-top: auto;
  flex-shrink: 0; /* 防止被压缩 */
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.result-tag {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.result-tag:first-child {
  background: var(--primary-color);
  color: white;
}

.result-tag:hover {
  opacity: 0.8;
}

/* 统计信息样式 */
.result-stats {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  transition: var(--transition);
}

.stat-item:hover {
  color: var(--text-secondary);
}

.stat-item svg {
  width: 14px;
  height: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .article-cover {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    align-self: flex-start;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .article-cover img {
    width: 126px;
    height: 126px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .article-cover:hover img {
    transform: translate(-50%, -50%) scale(1.05);
  }

  .article-content {
    padding: 15px;
  }

  .result-title a {
    font-size: 16px;
  }

  .result-snippet {
    -webkit-line-clamp: 2;
  }

  .result-tags-container {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .result-stats {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .article-card-layout {
    flex-direction: column;
  }

  .article-cover {
    width: 100%;
    height: 180px;
    align-self: stretch;
    margin: 0;
  }

  .article-cover img {
    width: 105%;
    height: 105%;
    margin-left: -2.5%;
    margin-top: -2.5%;
  }

  .result-title a {
    font-size: 15px;
  }

  .article-content {
    padding: 12px;
  }

  .stat-item {
    font-size: 11px;
  }
}

/* 组件库通知按钮样式 */
.btn-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 60px;
}

.btn-box .btn {
  display: block;
  flex-shrink: 0;
  width: 80px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-box .btn i {
  display: block;
  font-size: 19px;
  color: var(--art-gray-600);
  text-align: center;
  line-height: 1;
}

.btn-box .btn.notice-button:hover i {
  animation: shake 0.5s ease-in-out;
  transform-origin: center center;
}

.btn-box:not(.notice-btn):hover .btn {
  color: var(--primary-color);
  background-color: rgba(var(--art-gray-200-rgb), 0.7);
}

/* 确保通知图标可以被点击 */
.btn-box.notice-btn {
  position: relative;
  z-index: 10;
  pointer-events: auto;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-box.notice-btn .btn {
  position: relative;
  z-index: 11;
  pointer-events: auto;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-box .count {
  position: absolute;
  top: 19px;
  right: 17px;
  display: block;
  width: 6px;
  height: 6px;
  background: var(--error-color) !important;
  border-radius: 50%;
  pointer-events: none;
}

/* 组件库通知弹窗样式 */
.notice {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 380px;
  max-height: 500px;
  background: var(--art-main-bg-color);
  border: 1px solid var(--art-border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  z-index: 9999;
}

.notice.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* 头部样式 - 与组件库完全一致 */
.notice .notice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  margin-top: 15px;
}

.notice .notice-header span {
  font-size: 12px;
}

.notice .notice-header .text {
  font-size: 16px;
  font-weight: 500;
  color: var(--art-gray-800);
}

.notice .notice-header .btn {
  padding: 4px 6px;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  background: transparent;
  border: none;
  font-size: 12px;
  color: var(--art-gray-700);
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1.2;
}

.notice .notice-header .btn:hover {
  background-color: var(--art-gray-200);
  color: var(--art-gray-900);
}

/* 标签栏样式 - 与组件库一致 */
.notice .notice-tabs {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  height: 50px;
  padding: 0 20px;
  line-height: 50px;
  border-bottom: 1px solid var(--art-border-color);
}

.notice .tab-item {
  height: 48px;
  margin-right: 20px;
  overflow: hidden;
  font-size: 13px;
  color: var(--art-gray-700);
  cursor: pointer;
  transition: color 0.3s;
  user-select: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.notice .tab-item:last-child {
  margin-right: 0;
}

.notice .tab-item:hover {
  color: var(--art-gray-900);
}

.notice .tab-item.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.notice .tab-text {
  font-size: 13px;
}

.notice .tab-count {
  font-size: 13px;
  line-height: 1;
}

/* 内容区域样式 */
.notice .notice-content {
  height: 320px;
  overflow: hidden;
}

.notice .content-panel {
  display: none;
  height: 100%;
  animation: fadeIn 0.3s ease-in-out;
}

.notice .content-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 滚动条样式 */
.notice .activity-list,
.notice .notification-list {
  height: 100%;
  overflow-y: auto;
  padding: 8px 0;
}

.notice .activity-list::-webkit-scrollbar,
.notice .notification-list::-webkit-scrollbar {
  width: 4px;
}

.notice .activity-list::-webkit-scrollbar-track,
.notice .notification-list::-webkit-scrollbar-track {
  background: transparent;
}

.notice .activity-list::-webkit-scrollbar-thumb,
.notice .notification-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.notice .activity-list::-webkit-scrollbar-thumb:hover,
.notice .notification-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* 动态项目样式 - 统一高度和布局 */
.notice .activity-item {
  display: flex;
  align-items: center;
  padding: 15px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  min-height: 66px;
  box-sizing: border-box;
}

.notice .activity-item:hover {
  background-color: var(--art-gray-100);
}

.notice .activity-item:last-child {
  border-bottom: 0;
}

.notice .activity-item.unread {
  background-color: rgba(102, 126, 234, 0.05);
}

.notice .activity-item.unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--error-color);
  border-radius: 50%;
}

.notice .activity-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-right: 15px;
  flex-shrink: 0;
}

.notice .activity-icon.like {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
}

.notice .activity-icon.comment {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.notice .activity-icon.collect {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.notice .activity-icon i {
  font-size: 18px;
  background: transparent !important;
}

.notice .activity-content {
  width: calc(100% - 51px);
  min-width: 0;
}

.notice .activity-title {
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--art-gray-900);
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notice .activity-article {
  color: var(--text-secondary);
  font-weight: 500;
}

.notice .activity-time {
  font-size: 12px;
  color: var(--art-gray-500);
  margin-top: 5px;
}

/* 通知项目样式 - 统一高度和布局 */
.notice .notification-item {
  display: flex;
  align-items: center;
  padding: 15px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  min-height: 66px;
  box-sizing: border-box;
}

.notice .notification-item:hover {
  background-color: var(--art-gray-100);
}

.notice .notification-item:last-child {
  border-bottom: 0;
}

.notice .notification-item.unread {
  background-color: rgba(102, 126, 234, 0.05);
}

.notice .notification-item.unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--error-color);
  border-radius: 50%;
}

.notice .notification-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-right: 15px;
  flex-shrink: 0;
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
}

.notice .notification-icon i {
  font-size: 18px;
  background: transparent !important;
}

.notice .notification-content {
  width: calc(100% - 51px);
  min-width: 0;
}

.notice .notification-title {
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--art-gray-900);
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notice .notification-time {
  font-size: 12px;
  color: var(--art-gray-500);
  margin-top: 5px;
}

/* 底部样式 - 白底蓝边按钮样式 */
.notice .notice-footer {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: 0 15px;
  padding-bottom: 15px;
}

.notice .view-all {
  width: 100%;
  margin-top: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.notice .view-all i {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.notice .view-all:hover i {
  transform: translateX(2px);
}

/* 覆盖btn-outline样式 - 白底蓝边蓝色字 */
.notice .notice-footer .btn-outline {
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.notice .notice-footer .btn-outline:hover:not(:disabled) {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* 加载和空状态样式 */
.notice .loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
}

.notice .loading-state .loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

.notice .loading-state p {
  font-size: 14px;
  margin: 0;
}

.notice .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
}

.notice .empty-state i {
  font-size: 48px;
  color: var(--border-color);
  margin-bottom: 12px;
}

.notice .empty-state p {
  font-size: 14px;
  margin: 0;
}

/* 通知按钮动画效果 */
@keyframes shake {
  0% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
  75% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(0);
  }
}

/* 未读消息样式 */
.notice .content .scroll .notice-list li.unread,
.notice .content .scroll .user-list li.unread,
.notice .content .scroll .base li.unread {
  background-color: var(--art-gray-100);
  position: relative;
}

.notice .content .scroll .notice-list li.unread::before,
.notice .content .scroll .user-list li.unread::before,
.notice .content .scroll .base li.unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--error-color);
  border-radius: 50%;
}

.notice .content .scroll .notice-list li.unread .icon,
.notice .content .scroll .user-list li.unread .avatar {
  position: relative;
}

.notice .content .scroll .notice-list li.unread .icon::after,
.notice .content .scroll .user-list li.unread .avatar::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--error-color);
  border-radius: 50%;
  border: 2px solid var(--art-main-bg-color);
}

/* 加载动画 */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 移动端适配 */
@media only screen and (max-width: 768px) {
  .notice {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: 0 !important;
    margin: 0;
  }

  .btn-box {
    width: 40px;
    height: 50px;
  }

  .btn-box .btn {
    width: 34px;
    height: 34px;
    line-height: 34px;
  }

  .btn-box .btn i {
    font-size: 17px;
  }

  .notice .notice-content {
    height: 250px;
  }

  .notice .activity-item,
  .notice .notification-item {
    padding: 12px 16px;
  }

  .notice .activity-icon,
  .notice .notification-icon {
    width: 36px;
    height: 36px;
  }

  .notice .activity-icon i,
  .notice .notification-icon i {
    font-size: 16px;
  }
}

/* ========================================
   主容器布局样式 - 全局样式
   ======================================== */

/* 主体内容容器 */
.main-container {
  width: 90%;
  margin: 0 auto;
  padding: 0;
  display: flex;
  gap: 25px;
  align-items: flex-start;
  height: 100%;
}

/* 移动端适配 */
@media (max-width: 1200px) {
  .main-container {
    width: 95%; /* 在稍小屏幕上使用更大的宽度比例 */
  }
}

@media (max-width: 1024px) {
  .main-container {
    flex-direction: column;
    gap: 20px;
    width: 95%;
    padding: 20px;
    height: auto;
  }

  .modern-sidebar {
    width: 100%;
    height: auto;
    position: static;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
    gap: 15px;
    width: 98%;
    padding: 15px;
    height: auto;
  }

  .modern-sidebar {
    width: 100%;
    height: auto;
    position: static;
    margin-bottom: 15px;
  }
}

/* ========================================
   侧边栏导航样式 - 全局样式
   ======================================== */

/* 侧边栏主容器 */
.modern-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  position: sticky;
  top: 90px;
  border: 1px solid var(--border-color);
}

/* 侧边栏滚动条样式 */
.modern-sidebar::-webkit-scrollbar {
  width: 6px;
}

.modern-sidebar::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.modern-sidebar::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

.modern-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* 侧边栏导航 */
.sidebar-nav {
  padding: 0;
  overflow: hidden;
}

/* 导航列表 */
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 主菜单 */
.main-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 菜单项基础样式 */
.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  font-weight: 500;
}

.menu-item:hover {
  color: var(--primary-color);
  background-color: rgba(102, 126, 234, 0.05);
}

/* 菜单项图标 */
.menu-item i {
  width: 18px;
  margin-right: 10px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: var(--transition);
}

.menu-item:hover i {
  color: var(--primary-color);
}

/* 菜单项文本 */
.menu-item span {
  flex: 1;
  font-weight: 500;
}

/* 子菜单箭头 */
.menu-arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
  font-size: 12px;
  opacity: 1;
  flex-shrink: 0;
  color: #666;
}

/* 展开状态的箭头 */
.has-submenu.active .menu-arrow {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--primary-color);
}

/* 带子菜单的项目 */
.has-submenu > .menu-item {
  font-weight: 600;
}

.has-submenu > .menu-item:hover {
  background-color: rgba(102, 126, 234, 0.08);
}

/* 子菜单样式 */
.submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #ffffff;
}

.submenu li {
  margin: 0;
}

/* 展开的子菜单 */
.has-submenu.active .submenu {
  max-height: 500px;
}

/* 子菜单项样式 */
.submenu .menu-item {
  color: var(--text-secondary);
  border-bottom: none;
  font-size: 13px;
  font-weight: 400;
  padding-left: 48px;
  padding-top: 10px;
  padding-bottom: 10px  ;
  background-color: transparent;
}

.submenu .menu-item:hover {
  color: var(--primary-color);
  background-color: rgba(102, 126, 234, 0.05);
}

.submenu .menu-item i {
  font-size: 12px;
  width: 16px;
  color: var(--text-muted);
}

.submenu .menu-item:hover i {
  color: var(--primary-color);
}

/* 激活状态的子菜单项 */
.submenu .menu-item.active {
  background-color: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
}

.submenu .menu-item.active i {
  color: var(--primary-color);
}

/* 动态页面链接样式 */
#dynamicPageLinks {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border-color);
}

#dynamicPageLinks li {
  margin: 0;
}

#dynamicPageLinks .menu-item {
  border-bottom: 1px solid var(--border-color);
}

#dynamicPageLinks .menu-item:last-child {
  border-bottom: none;
}

/* 分类列表样式 */
#sidebarCategoryList {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sidebarCategoryList li {
  margin: 0;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .modern-sidebar {
    width: 240px;
  }

  .menu-item {
    padding: 10px 14px;
    font-size: 13px;
  }

  .submenu .menu-item {
    padding-left: 40px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .modern-sidebar {
    width: 100%;
    position: static;
    border-radius: var(--radius);
    margin-bottom: 20px;
  }

  .menu-item {
    padding: 12px 16px;
    font-size: 14px;
  }

  .submenu .menu-item {
    padding-left: 48px;
    font-size: 13px;
  }
}