/* ========================================
   暗Material论坛 - 暗色Material Design风格
   CSS前缀: .dm-
   配色: 主色#BB86FC(紫), 强调#03DAC6(青绿), 背景#121212, 表面#1E1E1E
   ======================================== */

/* ===== 全局变量 ===== */
:root {
  --dm-primary: #BB86FC;
  --dm-primary-dark: #6200EE;
  --dm-accent: #03DAC6;
  --dm-accent-dark: #018786;
  --dm-bg: #121212;
  --dm-surface: #1E1E1E;
  --dm-surface-2: #2D2D2D;
  --dm-surface-3: #383838;
  --dm-text: #E1E1E1;
  --dm-text-secondary: #A0A0A0;
  --dm-text-disabled: #5A5A5A;
  --dm-error: #CF6679;
  --dm-pink: #FF4081;
  --dm-orange: #FFAB40;
  --dm-radius: 12px;
  --dm-radius-sm: 8px;
  --dm-radius-lg: 16px;
  --dm-shadow-1: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.24);
  --dm-shadow-2: 0 3px 6px rgba(0,0,0,0.4), 0 3px 6px rgba(0,0,0,0.23);
  --dm-shadow-6: 0 10px 20px rgba(0,0,0,0.5), 0 6px 6px rgba(0,0,0,0.23);
  --dm-glow-purple: 0 0 12px rgba(187,134,252,0.5);
  --dm-glow-teal: 0 0 12px rgba(3,218,198,0.5);
  --dm-transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ===== Reset ===== */
* { margin:0; padding:0; box-sizing:border-box; }
html { font-size: 16px; }
.dm-body {
  font-family: 'Roboto','Noto Sans SC',sans-serif;
  background: var(--dm-bg);
  color: var(--dm-text);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 56px;
}
a { color: var(--dm-primary); text-decoration: none; transition: color var(--dm-transition); }
a:hover { color: var(--dm-accent); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== Elevation层级 (Material暗色主题规范) ===== */
.dm-elevation-1 { box-shadow: var(--dm-shadow-1); }
.dm-elevation-2 { box-shadow: var(--dm-shadow-2); }
.dm-elevation-6 { box-shadow: var(--dm-shadow-6); }

/* ===== 辉光效果 ===== */
.dm-glow-purple { color: var(--dm-primary); text-shadow: var(--dm-glow-purple); }
.dm-glow-teal { color: var(--dm-accent); text-shadow: var(--dm-glow-teal); }

/* ===== 顶部应用栏 ===== */
.dm-topbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--dm-surface);
  box-shadow: var(--dm-shadow-2);
}
.dm-topbar-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; height: 64px;
}
.dm-topbar-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.dm-topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.dm-logo img { height: 36px; }

/* 导航 */
.dm-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.dm-nav::-webkit-scrollbar { display: none; }
.dm-nav-item {
  padding: 8px 14px; border-radius: 20px;
  font-size: 0.875rem; font-weight: 500; white-space: nowrap;
  color: var(--dm-text-secondary);
  position: relative; overflow: hidden;
  transition: all var(--dm-transition);
}
.dm-nav-item:hover { background: rgba(187,134,252,0.08); color: var(--dm-primary); }
.dm-nav-item.dm-active {
  background: rgba(187,134,252,0.15);
  color: var(--dm-primary);
}

/* 图标按钮 */
.dm-icon-btn {
  background: transparent; border: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--dm-text);
  position: relative; overflow: hidden;
  transition: background var(--dm-transition);
}
.dm-icon-btn:hover { background: rgba(255,255,255,0.08); }
.dm-icon-btn:active { background: rgba(255,255,255,0.12); }
.dm-badge {
  position: absolute; top: 6px; right: 6px;
  background: var(--dm-error); color: #fff;
  font-size: 0.625rem; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px; display: flex;
  align-items: center; justify-content: center; padding: 0 4px;
}

/* 搜索框 */
.dm-search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--dm-surface-2);
  border-radius: 20px; padding: 8px 16px;
  min-width: 200px;
  transition: box-shadow var(--dm-transition);
}
.dm-search-box:focus-within { box-shadow: 0 0 0 2px rgba(187,134,252,0.4); }
.dm-search-icon { color: var(--dm-text-secondary); flex-shrink: 0; }
.dm-search-input {
  background: transparent; border: none; outline: none;
  color: var(--dm-text); font-size: 0.875rem; flex: 1;
  font-family: inherit;
}
.dm-search-input::placeholder { color: var(--dm-text-disabled); }

/* 用户区 */
.dm-user-area { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.dm-avatar { width: 32px; height: 32px; border-radius: 50%; }
.dm-username { font-size: 0.875rem; font-weight: 500; }

/* ===== Banner区 ===== */
.dm-banner-wrap { position: relative; overflow: hidden; }
.dm-banner-img { width: 100%; height: 280px; object-fit: cover; }
.dm-banner-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(18,18,18,0.7) 100%);
}
.dm-banner-title { font-size: 2rem; font-weight: 700; color: var(--dm-text); }
.dm-banner-sub { font-size: 1rem; color: var(--dm-primary); }

/* 按钮 */
.dm-btn-filled {
  background: var(--dm-primary); color: #000;
  border: none; padding: 10px 24px; border-radius: 20px;
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  font-family: inherit;
  box-shadow: 0 0 0 0 rgba(187,134,252,0.4);
  transition: all var(--dm-transition);
  display: inline-flex; align-items: center; gap: 6px;
}
.dm-btn-filled:hover {
  box-shadow: 0 0 16px rgba(187,134,252,0.6);
  background: #D0A0FF;
}
.dm-btn-filled:active { transform: scale(0.97); }
.dm-btn-outlined {
  background: transparent; color: var(--dm-accent);
  border: 1px solid var(--dm-accent); padding: 9px 23px; border-radius: 20px;
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all var(--dm-transition);
}
.dm-btn-outlined:hover { background: rgba(3,218,198,0.1); box-shadow: 0 0 12px rgba(3,218,198,0.3); }
.dm-btn-block { width: 100%; justify-content: center; }
.dm-btn-sm { font-size: 0.75rem; padding: 6px 16px; }

/* ===== 主题提示条 ===== */
.dm-theme-hint {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 24px; font-size: 0.8125rem;
  background: rgba(187,134,252,0.08);
  color: var(--dm-primary);
  border-bottom: 1px solid rgba(187,134,252,0.15);
}

/* ===== 主容器 ===== */
.dm-main { padding: 24px; }
.dm-container {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 320px; gap: 24px;
}
.dm-content { min-width: 0; }

/* ===== 卡片 ===== */
.dm-card {
  background: var(--dm-surface);
  border-radius: var(--dm-radius);
  padding: 20px; margin-bottom: 16px;
  position: relative; overflow: hidden;
  transition: box-shadow var(--dm-transition), transform var(--dm-transition);
}

/* ===== 板块卡片 ===== */
.dm-section-card:hover { box-shadow: var(--dm-shadow-6); transform: translateY(-2px); }
.dm-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dm-section-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dm-icon-purple { background: rgba(187,134,252,0.15); color: var(--dm-primary); box-shadow: 0 0 8px rgba(187,134,252,0.2); }
.dm-icon-teal { background: rgba(3,218,198,0.15); color: var(--dm-accent); box-shadow: 0 0 8px rgba(3,218,198,0.2); }
.dm-icon-pink { background: rgba(255,64,129,0.15); color: var(--dm-pink); }
.dm-icon-orange { background: rgba(255,171,64,0.15); color: var(--dm-orange); }
.dm-section-info { flex: 1; }
.dm-section-title { font-size: 1.125rem; font-weight: 600; }
.dm-section-title a { color: var(--dm-text); }
.dm-section-title a:hover { color: var(--dm-primary); }
.dm-section-stats { font-size: 0.8125rem; color: var(--dm-text-secondary); }
.dm-section-more { color: var(--dm-text-secondary); display: flex; }
.dm-section-more:hover { color: var(--dm-primary); }

/* 板块帖子列表 */
.dm-post-list { display: flex; flex-direction: column; gap: 2px; }
.dm-post-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  transition: background var(--dm-transition);
}
.dm-post-item:hover { background: rgba(255,255,255,0.05); }
.dm-post-title { flex: 1; font-size: 0.875rem; color: var(--dm-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-post-title:hover { color: var(--dm-primary); }
.dm-post-meta { font-size: 0.75rem; color: var(--dm-text-secondary); white-space: nowrap; }

/* 标签 */
.dm-post-tag {
  font-size: 0.625rem; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; white-space: nowrap;
}
.dm-tag-new { background: var(--dm-accent); color: #000; }
.dm-tag-hot { background: var(--dm-error); color: #fff; }
.dm-tag-essence { background: var(--dm-orange); color: #000; }

/* Pill标签 */
.dm-pill {
  display: inline-block; font-size: 0.6875rem; font-weight: 500;
  padding: 2px 10px; border-radius: 12px;
  background: rgba(187,134,252,0.12); color: var(--dm-primary);
  margin-right: 4px;
}

/* ===== 侧边栏 ===== */
.dm-sidebar { display: flex; flex-direction: column; gap: 16px; }
.dm-side-card { padding: 16px; }
.dm-side-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.9375rem; font-weight: 600; margin-bottom: 12px;
  color: var(--dm-text);
}
.dm-side-title svg { color: var(--dm-accent); }

/* 统计网格 */
.dm-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dm-stat-item {
  text-align: center; padding: 12px 8px;
  background: var(--dm-surface-2); border-radius: 8px;
}
.dm-stat-num { display: block; font-size: 1.25rem; font-weight: 700; }
.dm-stat-label { font-size: 0.75rem; color: var(--dm-text-secondary); }

/* 热门列表 */
.dm-hot-list { display: flex; flex-direction: column; gap: 8px; }
.dm-hot-item { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; }
.dm-hot-item a { color: var(--dm-text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-hot-item a:hover { color: var(--dm-primary); }
.dm-hot-rank {
  width: 20px; height: 20px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6875rem; font-weight: 700; flex-shrink: 0;
  background: var(--dm-surface-2); color: var(--dm-text-secondary);
}
.dm-rank-1 { background: var(--dm-error); color: #fff; }
.dm-rank-2 { background: var(--dm-orange); color: #000; }
.dm-rank-3 { background: var(--dm-accent); color: #000; }

/* 签到 */
.dm-checkin-text { font-size: 0.875rem; margin-bottom: 12px; color: var(--dm-text-secondary); }
.dm-checkin-text strong { font-size: 1.5rem; }

/* 活跃用户 */
.dm-active-users li {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  font-size: 0.8125rem;
}
.dm-active-users img { width: 28px; height: 28px; border-radius: 50%; }
.dm-active-users span:nth-child(2) { flex: 1; }
.dm-user-count { color: var(--dm-text-secondary); font-size: 0.75rem; }

/* ===== FAB悬浮按钮 ===== */
.dm-fab {
  position: fixed; bottom: 72px; right: 24px; z-index: 900;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--dm-accent); color: #000;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--dm-shadow-6);
  transition: all var(--dm-transition);
}
.dm-fab:hover { background: #00F5D0; box-shadow: 0 0 24px rgba(3,218,198,0.6); transform: scale(1.05); }
.dm-fab:active { transform: scale(0.95); }

/* ===== 底部导航栏 ===== */
.dm-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  display: flex; background: var(--dm-surface);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.3);
  height: 56px;
}
.dm-bnav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--dm-text-secondary); font-size: 0.6875rem;
  transition: color var(--dm-transition);
}
.dm-bnav-item svg { transition: all var(--dm-transition); }
.dm-bnav-item:hover { color: var(--dm-primary); }
.dm-bnav-item.dm-bnav-active { color: var(--dm-accent); }
.dm-bnav-item.dm-bnav-active svg { filter: drop-shadow(0 0 4px rgba(3,218,198,0.6)); }

/* ===== 面包屑 ===== */
.dm-breadcrumb {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.8125rem; color: var(--dm-text-secondary);
  margin-bottom: 16px;
}
.dm-breadcrumb svg { opacity: 0.5; }

/* ===== 板块信息 ===== */
.dm-board-info { padding: 24px; }
.dm-board-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.dm-board-icon {
  width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dm-board-text { flex: 1; }
.dm-board-name { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.dm-board-desc { font-size: 0.875rem; color: var(--dm-text-secondary); }
.dm-new-post-btn { flex-shrink: 0; }
.dm-board-stats {
  display: flex; gap: 24px; padding-top: 16px;
  border-top: 1px solid var(--dm-surface-2);
  font-size: 0.875rem; color: var(--dm-text-secondary);
}
.dm-board-stat span { font-weight: 700; }

/* 筛选栏 */
.dm-filter-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 20px; }
.dm-filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.dm-filter-tab {
  background: transparent; border: none; cursor: pointer;
  padding: 6px 16px; border-radius: 16px;
  font-size: 0.8125rem; font-weight: 500; color: var(--dm-text-secondary);
  font-family: inherit; transition: all var(--dm-transition);
}
.dm-filter-tab:hover { background: rgba(255,255,255,0.05); }
.dm-filter-tab.dm-filter-active { background: rgba(187,134,252,0.15); color: var(--dm-primary); }
.dm-filter-sort { display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--dm-text-secondary); }
.dm-select {
  background: var(--dm-surface-2); border: 1px solid var(--dm-surface-3);
  color: var(--dm-text); padding: 6px 12px; border-radius: 8px;
  font-size: 0.8125rem; font-family: inherit; outline: none;
}

/* ===== 帖子表格列表 ===== */
.dm-post-table { padding: 0; overflow: hidden; }
.dm-post-row {
  display: grid; grid-template-columns: 1fr 140px 60px 80px 120px;
  align-items: center; gap: 12px; padding: 14px 20px;
  border-bottom: 1px solid var(--dm-surface-2);
  transition: background var(--dm-transition);
}
.dm-post-row:hover { background: rgba(255,255,255,0.03); }
.dm-post-row-head { border-bottom: 2px solid var(--dm-surface-2); font-size: 0.75rem; color: var(--dm-text-secondary); font-weight: 600; text-transform: uppercase; }
.dm-post-row:last-child { border-bottom: none; }
.dm-post-col-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dm-post-avatars img { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.dm-post-main-text { min-width: 0; }
.dm-post-link { font-size: 0.875rem; font-weight: 500; color: var(--dm-text); display: flex; align-items: center; gap: 6px; }
.dm-post-link:hover { color: var(--dm-primary); }
.dm-post-sub-tags { margin-top: 4px; }
.dm-post-col-author { display: flex; align-items: center; gap: 6px; }
.dm-mini-avatar { width: 24px; height: 24px; border-radius: 50%; }
.dm-author-name { font-size: 0.8125rem; color: var(--dm-text-secondary); }
.dm-post-col-reply { text-align: center; font-weight: 600; }
.dm-post-col-view { text-align: center; font-size: 0.8125rem; color: var(--dm-text-secondary); }
.dm-post-col-time { text-align: right; }
.dm-time-text { display: block; font-size: 0.8125rem; }
.dm-time-author { display: block; font-size: 0.6875rem; color: var(--dm-text-disabled); }

/* ===== 分页 ===== */
.dm-pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 24px 0; }
.dm-page-btn {
  min-width: 36px; height: 36px; border-radius: 8px;
  background: var(--dm-surface); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 500; color: var(--dm-text);
  font-family: inherit; transition: all var(--dm-transition);
  padding: 0 8px;
}
.dm-page-btn:hover { background: rgba(187,134,252,0.1); }
.dm-page-btn.dm-page-active { background: var(--dm-primary); color: #000; }
.dm-page-btn.dm-page-disabled { opacity: 0.3; cursor: not-allowed; }
.dm-page-ellipsis { color: var(--dm-text-secondary); padding: 0 8px; }

/* ===== 帖子详情 ===== */
.dm-detail-content { }
.dm-thread-head { padding: 24px; }
.dm-thread-tags { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.dm-thread-title { font-size: 1.5rem; font-weight: 700; line-height: 1.4; margin-bottom: 12px; }
.dm-thread-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--dm-text-secondary); }
.dm-thread-meta span { display: flex; align-items: center; gap: 4px; }
.dm-thread-meta svg { opacity: 0.6; }

/* 楼主帖 */
.dm-post-detail { padding: 24px; }
.dm-post-detail-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.dm-post-user { display: flex; gap: 12px; }
.dm-post-avatar { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; }
.dm-post-user-info { display: flex; flex-direction: column; gap: 4px; }
.dm-post-username { font-size: 1rem; font-weight: 600; }
.dm-post-role { font-size: 0.625rem; padding: 2px 8px; border-radius: 4px; align-self: flex-start; }
.dm-role-vip { background: rgba(255,171,64,0.15); color: var(--dm-orange); }
.dm-role-normal { background: rgba(3,218,198,0.15); color: var(--dm-accent); }
.dm-post-user-stats { display: flex; gap: 12px; font-size: 0.75rem; color: var(--dm-text-secondary); }
.dm-floor-num { font-size: 0.8125rem; color: var(--dm-text-disabled); }
.dm-post-body { font-size: 0.9375rem; line-height: 1.8; padding: 16px 0; }
.dm-post-body p { margin-bottom: 12px; }
.dm-post-body ul { margin: 12px 0 12px 20px; }
.dm-post-body li { list-style: disc; margin-bottom: 6px; }
.dm-post-image { width: 100%; max-width: 500px; border-radius: var(--dm-radius); margin: 16px 0; }

/* 操作按钮 */
.dm-post-actions { display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid var(--dm-surface-2); }
.dm-action-btn {
  background: var(--dm-surface-2); border: none; cursor: pointer;
  padding: 8px 16px; border-radius: 20px;
  font-size: 0.8125rem; font-weight: 500; color: var(--dm-text);
  font-family: inherit; display: flex; align-items: center; gap: 6px;
  transition: all var(--dm-transition);
}
.dm-action-btn:hover { background: rgba(187,134,252,0.15); color: var(--dm-primary); }
.dm-action-sm { padding: 4px 10px; font-size: 0.75rem; background: transparent; }

/* 回复区 */
.dm-replies-section { margin-top: 24px; }
.dm-replies-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 16px; padding-left: 4px; }
.dm-reply-card { padding: 20px; }
.dm-reply-avatar { width: 40px; height: 40px; }
.dm-reply-body { font-size: 0.9375rem; }
.dm-reply-image { max-width: 300px; }
.dm-reply-meta { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--dm-surface-2); font-size: 0.75rem; color: var(--dm-text-secondary); }

/* 回复框 */
.dm-reply-box { padding: 24px; }
.dm-reply-box-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.dm-reply-box-title svg { color: var(--dm-accent); }
.dm-reply-input-area { display: flex; gap: 12px; margin-bottom: 12px; }
.dm-reply-input-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.dm-reply-textarea {
  flex: 1; min-height: 100px; resize: vertical;
  background: var(--dm-surface-2); border: 1px solid var(--dm-surface-3);
  border-radius: var(--dm-radius); padding: 12px 16px;
  color: var(--dm-text); font-size: 0.9375rem; font-family: inherit; outline: none;
  transition: border-color var(--dm-transition);
}
.dm-reply-textarea:focus { border-color: var(--dm-primary); box-shadow: 0 0 0 2px rgba(187,134,252,0.2); }
.dm-reply-toolbar { display: flex; align-items: center; justify-content: space-between; }
.dm-reply-tools { display: flex; gap: 4px; }
.dm-tool-btn {
  background: var(--dm-surface-2); border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--dm-text-secondary); font-family: inherit;
  transition: all var(--dm-transition);
}
.dm-tool-btn:hover { background: rgba(187,134,252,0.15); color: var(--dm-primary); }

/* ===== 搜索页 ===== */
.dm-search-hero { padding: 40px; text-align: center; }
.dm-search-hero-title { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 1.75rem; font-weight: 700; margin-bottom: 24px; }
.dm-search-hero-title svg { color: var(--dm-accent); }
.dm-search-big-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--dm-surface-2); border-radius: 24px;
  padding: 8px 8px 8px 20px; max-width: 700px; margin: 0 auto;
  box-shadow: 0 0 0 1px var(--dm-surface-3);
  transition: box-shadow var(--dm-transition);
}
.dm-search-big-box:focus-within { box-shadow: 0 0 0 2px var(--dm-primary); }
.dm-search-big-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 1rem; color: var(--dm-text); font-family: inherit; padding: 8px 0;
}
.dm-search-result-count { font-size: 0.875rem; color: var(--dm-text-secondary); margin-top: 16px; }

/* 搜索结果卡片 */
.dm-result-card { padding: 20px; }
.dm-result-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dm-result-time { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--dm-text-disabled); margin-left: auto; }
.dm-result-title { display: block; font-size: 1.0625rem; font-weight: 600; color: var(--dm-text); margin-bottom: 8px; transition: color var(--dm-transition); }
.dm-result-title:hover { color: var(--dm-primary); }
.dm-result-summary { font-size: 0.875rem; color: var(--dm-text-secondary); line-height: 1.6; margin-bottom: 8px; }
.dm-highlight { background: rgba(187,134,252,0.25); color: var(--dm-primary); padding: 0 2px; border-radius: 2px; }
.dm-result-meta { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--dm-text-disabled); }
.dm-meta-sep { opacity: 0.5; }

/* 热门搜索标签 */
.dm-hot-search-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-hot-search-tag {
  font-size: 0.8125rem; padding: 6px 14px; border-radius: 16px;
  background: var(--dm-surface-2); color: var(--dm-text);
  transition: all var(--dm-transition);
}
.dm-hot-search-tag:hover { background: rgba(187,134,252,0.15); color: var(--dm-primary); }
.dm-hot-1 { background: rgba(207,102,121,0.2); color: var(--dm-error); }
.dm-hot-2 { background: rgba(255,171,64,0.15); color: var(--dm-orange); }
.dm-hot-3 { background: rgba(3,218,198,0.15); color: var(--dm-accent); }

/* 搜索历史 */
.dm-history-list { margin-bottom: 12px; }
.dm-history-list li { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 0.8125rem; }
.dm-history-del { background: none; border: none; cursor: pointer; color: var(--dm-text-disabled); font-size: 1.125rem; line-height: 1; }
.dm-history-del:hover { color: var(--dm-error); }

/* 侧边栏信息 */
.dm-side-info-list { display: flex; flex-direction: column; gap: 8px; }
.dm-side-info-row { display: flex; justify-content: space-between; font-size: 0.8125rem; padding: 6px 0; border-bottom: 1px solid var(--dm-surface-2); }
.dm-side-info-row span { color: var(--dm-text-secondary); }
.dm-side-info-row strong, .dm-side-info-row a { color: var(--dm-text); }

/* ===== 页脚 ===== */
.dm-footer { background: var(--dm-surface); margin-top: 40px; }
.dm-footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4,1fr); gap: 24px;
  padding: 40px 24px;
}
.dm-footer-col h4 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 12px; color: var(--dm-text); }
.dm-footer-col a { display: block; font-size: 0.8125rem; color: var(--dm-text-secondary); padding: 4px 0; }
.dm-footer-col a:hover { color: var(--dm-primary); }
.dm-footer-bottom { text-align: center; padding: 16px 24px; border-top: 1px solid var(--dm-surface-2); font-size: 0.75rem; color: var(--dm-text-disabled); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .dm-container { grid-template-columns: 1fr; }
  .dm-sidebar { order: 2; }
  .dm-nav { display: none; }
  .dm-post-row { grid-template-columns: 1fr 100px 60px 100px; }
  .dm-post-col-view { display: none; }
}

@media (max-width: 768px) {
  .dm-topbar-inner { padding: 0 12px; gap: 8px; }
  .dm-search-box { min-width: 120px; }
  .dm-username { display: none; }
  .dm-banner-img { height: 200px; }
  .dm-banner-title { font-size: 1.25rem; }
  .dm-banner-sub { font-size: 0.8125rem; }
  .dm-main { padding: 12px; }
  .dm-card { padding: 16px; }
  .dm-board-head { flex-direction: column; align-items: flex-start; }
  .dm-new-post-btn { width: 100%; justify-content: center; }
  .dm-board-stats { flex-wrap: wrap; gap: 12px; }
  .dm-post-row { grid-template-columns: 1fr auto; padding: 12px; }
  .dm-post-col-author, .dm-post-col-reply, .dm-post-col-view { display: none; }
  .dm-post-col-time { display: none; }
  .dm-thread-title { font-size: 1.125rem; }
  .dm-thread-meta { gap: 8px; }
  .dm-footer-inner { grid-template-columns: 1fr 1fr; gap: 16px; }
  .dm-search-hero { padding: 24px; }
  .dm-search-hero-title { font-size: 1.25rem; }
  .dm-post-detail { padding: 16px; }
  .dm-reply-input-area { flex-direction: column; }
  .dm-reply-toolbar { flex-direction: column; gap: 12px; }
}

/* ===== CMS分页 ===== */
.jv-pagination {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 32px 0; justify-content: center;
}
.jv-page-info {
  font-size: 0.75rem; color: var(--dm-text-disabled);
  margin-right: 12px; letter-spacing: 0.3px;
}
.jv-pagination a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  font-size: 0.8125rem; font-weight: 500;
  cursor: pointer; background: none;
  border: 1px solid transparent;
  color: var(--dm-text-secondary);
  transition: all var(--dm-transition);
  text-decoration: none; font-variant-numeric: tabular-nums;
}
.jv-pagination a:hover {
  color: var(--dm-text); border-color: var(--dm-surface-2);
}
.jv-pagination a.active {
  color: var(--dm-primary); border-color: var(--dm-primary); font-weight: 700;
}
.jv-pagination a.disabled {
  color: var(--dm-text-disabled); border-color: transparent;
  cursor: not-allowed; pointer-events: none; opacity: 0.5;
}
.jv-page-dots {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  color: var(--dm-text-disabled); font-size: 0.8125rem;
}

/* ===== CMS评论区 ===== */
.comment-section { margin-top: 48px; }
.comment-form-area { margin-bottom: 24px; }
.comment-login-notice {
  background: var(--dm-surface); border: 1px solid var(--dm-surface-2);
  padding: 24px; text-align: center;
}
.comment-list { display: flex; flex-direction: column; }
.comment-item {
  display: flex; gap: 14px; padding: 20px 0;
  border-bottom: 1px solid var(--dm-surface-2);
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  flex-shrink: 0; width: 36px; height: 36px;
  border-radius: 50%; background: var(--dm-surface-3); color: var(--dm-text);
  font-size: 0.875rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.comment-main { flex: 1; min-width: 0; }
.comment-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px; flex-wrap: wrap;
}
.comment-author { font-size: 0.8125rem; font-weight: 700; color: var(--dm-text); }
.comment-reply-to { font-size: 0.6875rem; color: var(--dm-text-disabled); }
.comment-reply-to::before { content: '\2192'; margin-right: 3px; }
.comment-time {
  font-size: 0.6875rem; color: var(--dm-text-disabled);
  margin-left: auto;
}
.comment-content {
  font-size: 0.8125rem; color: var(--dm-text);
  line-height: 1.7; word-break: break-word;
}
.comment-actions { margin-top: 8px; }
.comment-reply-btn {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px;
  border: none; background: transparent;
  color: var(--dm-text-disabled); font-size: 0.6875rem;
  cursor: pointer; transition: all var(--dm-transition);
}
.comment-reply-btn:hover { color: var(--dm-text); }
.comment-reply-form {
  margin-top: 10px; display: flex; flex-direction: column; gap: 8px;
}
.comment-reply-input {
  width: 100%; border: 1px solid var(--dm-surface-2);
  padding: 10px 14px; font-size: 0.75rem; line-height: 1.5;
  resize: vertical; min-height: 60px; font-family: inherit;
  background: var(--dm-surface); color: var(--dm-text);
  transition: border-color var(--dm-transition);
}
.comment-reply-input:focus { border-color: var(--dm-primary); }
.comment-reply-submit {
  align-self: flex-end;
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 14px;
  border: 1px solid var(--dm-primary);
  background: var(--dm-primary); color: #000;
  font-size: 0.6875rem; font-weight: 600;
  cursor: pointer; transition: all var(--dm-transition);
}
.comment-reply-submit:hover { background: transparent; color: var(--dm-primary); }
.comment-reply-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.comment-replies {
  margin-left: 50px; padding-left: 16px;
  border-left: 2px solid var(--dm-surface-2);
  display: flex; flex-direction: column;
}
.comment-reply-item {
  display: flex; gap: 10px; padding: 12px 0;
  border-bottom: 1px solid var(--dm-surface-2);
}
.comment-reply-item:last-child { border-bottom: none; }
.comment-reply-item .comment-avatar { width: 28px; height: 28px; font-size: 0.75rem; }
.comment-reply-item .comment-author { font-size: 0.75rem; }
.comment-reply-item .comment-content { font-size: 0.75rem; }
.comment-empty {
  text-align: center; padding: 32px 16px;
  color: var(--dm-text-disabled); font-size: 0.8125rem;
}
.comment-empty p { margin: 0; }
.comment-load-more { display: flex; justify-content: center; padding: 16px 0; }
.comment-load-more-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 24px;
  border: 1px solid var(--dm-surface-2);
  background: var(--dm-surface); color: var(--dm-text-secondary);
  font-size: 0.75rem; font-weight: 500;
  cursor: pointer; transition: all var(--dm-transition);
}
.comment-load-more-btn:hover { border-color: var(--dm-primary); color: var(--dm-primary); }
.comment-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.comment-char-count { font-size: 0.6875rem; color: var(--dm-text-disabled); }

/* ===== CMS下载页 ===== */
.dm-download-info {
  display: flex; align-items: center; gap: 20px;
  padding: 24px; background: var(--dm-surface);
  border: 1px solid var(--dm-surface-2); margin-bottom: 24px;
}
.dm-download-file {
  width: 56px; height: 56px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--dm-surface-2);
}
.dm-download-meta { flex: 1; }
.dm-download-name { font-size: 1rem; font-weight: 700; color: var(--dm-text); margin-bottom: 4px; }
.dm-download-desc { font-size: 0.75rem; color: var(--dm-text-secondary); }
.dm-download-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 24px; border: 1px solid var(--dm-primary);
  background: var(--dm-primary); color: #000;
  font-size: 0.8125rem; font-weight: 600;
  cursor: pointer; transition: all var(--dm-transition);
  text-decoration: none;
}
.dm-download-btn:hover { background: transparent; color: var(--dm-primary); }

/* ===== CMS标签页 ===== */
.dm-tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 0; }
.dm-tag-item {
  font-size: 0.8125rem; padding: 6px 16px;
  border: 1px solid var(--dm-surface-2);
  color: var(--dm-text-secondary);
  transition: all var(--dm-transition); text-decoration: none;
}
.dm-tag-item:hover { border-color: var(--dm-primary); color: var(--dm-primary); }

/* ===== CMS用户页 ===== */
.dm-user-page { max-width: 480px; margin: 48px auto; padding: 0 20px; }
.dm-user-form { display: flex; flex-direction: column; gap: 16px; }
.dm-user-form label { font-size: 0.8125rem; color: var(--dm-text-secondary); margin-bottom: 4px; display: block; }
.dm-user-form input {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--dm-surface-2);
  background: var(--dm-surface); color: var(--dm-text);
  font-size: 0.875rem; font-family: inherit;
  transition: border-color var(--dm-transition);
}
.dm-user-form input:focus { border-color: var(--dm-primary); }
.dm-user-form button {
  padding: 12px 24px; border: 1px solid var(--dm-primary);
  background: var(--dm-primary); color: #000;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer; transition: all var(--dm-transition);
}
.dm-user-form button:hover { background: transparent; color: var(--dm-primary); }
.dm-user-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 0.75rem; }
.dm-user-links a { color: var(--dm-text-secondary); }
.dm-user-links a:hover { color: var(--dm-primary); }
