/* =============================================================
   commontheme · 通用下载站主题
   白卡片 + 红色 Logo + 蓝色高亮
   ============================================================= */

:root {
  --bg: #f4f5f9;
  --card: #ffffff;
  --ink: #222222;
  --ink2: #555555;
  --ink3: #999999;
  --line: #eeeeee;
  --line2: #e2e5ec;
  --red: #e74c3c;
  --blue: #3498db;
  --blue-d: #2980b9;
  --blue-t: #f0f8ff;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .05);
  --shadow-md: 0 6px 20px -10px rgba(20, 40, 80, .18);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background-color: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font-family: inherit; }

::selection { background: var(--blue); color: #fff; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c9d0dc; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ================= 顶部导航栏 ================= */
.site-header {
  background-color: var(--card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
}
.header-content {
  max-width: 1400px;
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 20px;
}
.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--red);
  flex: none;
  line-height: 1.1;
}
.logo a { display: block; }
.logo img { height: 44px; width: auto; }
.logo span {
  font-size: 12px;
  display: block;
  color: #666;
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: .3px;
}
.nav-links {
  display: flex;
  gap: 25px;
  font-size: 15px;
  color: var(--ink);
  min-width: 0;
}
.nav-links a {
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--blue); border-bottom-color: var(--blue); }
.user-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #666;
  flex: none;
}
.user-actions a { transition: color .15s; }
.user-actions a:hover { color: var(--blue); }
.user-actions .sep { color: #ddd; }
.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line2);
  border-radius: var(--radius-xs);
  background: var(--card);
  color: var(--ink2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}

/* ================= 主体布局 ================= */
.main-container {
  max-width: 1400px;
  margin: 20px auto;
  display: flex;
  gap: 8px;
  padding: 0 20px;
  align-items: flex-start;
}
.content-left {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

/* ================= 首页文章列表 ================= */
.article-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.article-item:first-child { padding-top: 4px; }
.article-item:last-child { border-bottom: none; padding-bottom: 4px; }
.article-thumb {
  width: 200px;
  height: 130px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(135deg, #eef2f8, #dfe7f2);
}
.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.article-item:hover .article-thumb img { transform: scale(1.04); }
.thumb-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
  color: #6f86a8;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #e9eef7, #d8e2f0);
}
.thumb-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  line-height: 1.5;
  z-index: 1;
  max-width: calc(100% - 16px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.article-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.article-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.45;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s;
}
.article-title:hover { color: var(--blue); }
.article-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.7;
}
.article-meta {
  font-size: 13px;
  color: var(--ink3);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.article-meta .icon { color: var(--blue); margin-right: 4px; }

/* ================= 侧边栏 ================= */
.sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.search-box {
  background: var(--card);
  padding: 15px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  height: 50px;
  align-items: center;
}
.search-box input {
  flex: 1;
  border: 1px solid #ddd;
  border-right: none;
  padding: 0 10px;
  height: 100%;
  border-radius: var(--radius-xs) 0 0 var(--radius-xs);
  outline: none;
  font-size: 14px;
  color: var(--ink);
  background: var(--card);
  transition: border-color .15s;
  min-width: 0;
}
.search-box input:focus { border-color: var(--blue); }
.search-box input::placeholder { color: #aaa; }
.search-box button {
  height: 100%;
  width: 50px;
  background: var(--blue);
  border: none;
  color: #fff;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  cursor: pointer;
  font-size: 15px;
  transition: background .15s;
}
.search-box button:hover { background: var(--blue-d); }

.sidebar-list {
  background: var(--card);
  border-radius: var(--radius);
  padding: 6px 15px;
  box-shadow: var(--shadow);
}
.sidebar-list-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-list-title::before {
  content: '';
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: var(--blue);
  flex: none;
}
.sidebar-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #eef2f8, #dfe7f2);
}
.sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-thumb .thumb-ph { font-size: 16px; }
.sidebar-text { flex: 1; min-width: 0; }
.sidebar-title {
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  cursor: pointer;
  transition: color .15s;
}
.sidebar-title:hover { color: var(--blue); }
.sidebar-date { font-size: 12px; color: var(--ink3); }

/* ================= 分页 ================= */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 24px 0 4px;
  font-size: 13px;
}
.pager .pg {
  min-width: 34px;
  height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  border-radius: var(--radius-xs);
  background: var(--card);
  color: var(--ink2);
  transition: all .15s;
}
.pager .pg:hover { border-color: var(--blue); color: var(--blue); }
.pager .pg.on {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}
.pager .pg.gap { border-color: transparent; background: none; color: var(--ink3); }
.pager .pg-total { color: var(--ink3); font-size: 12px; margin-left: 6px; }

/* ================= 空状态 ================= */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink3);
}
.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: .5;
}
.empty-state p { font-size: 15px; margin-bottom: 16px; }
.empty-state .btn { display: inline-block; padding: 8px 20px; border-radius: var(--radius-xs); background: var(--blue); color: #fff; }

/* ================= 列表页头部（分类/搜索） ================= */
.page-head {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 20px;
  margin-bottom: 16px;
}
.page-head h1 { font-size: 20px; font-weight: 600; color: var(--ink); }
.page-head .sub { font-size: 13px; color: var(--ink3); margin-top: 4px; }

/* ================= 详情页 ================= */
.article-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 15px;
  line-height: 1.5;
}
.article-header .article-meta {
  font-size: 14px;
  color: var(--ink3);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.article-header .article-meta .author { color: var(--blue); }

.article-body {
  font-size: 15px;
  color: #444;
  line-height: 1.85;
  overflow: hidden;
  margin-top: 16px;
}
.article-body p { margin-bottom: 20px; }
.article-body img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xs);
  margin: 20px 0;
}
.article-body h2 {
  font-size: 19px;
  margin: 28px 0 14px;
  padding-left: 11px;
  border-left: 4px solid var(--blue);
  line-height: 1.3;
}
.article-body h3 { font-size: 17px; margin: 22px 0 12px; }
.article-body ul, .article-body ol { margin: 12px 0 12px 22px; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin: 6px 0; }
.article-body a { color: var(--blue); }
.article-body a:hover { text-decoration: underline; }
.article-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.article-body th, .article-body td { border: 1px solid #e5e8ee; padding: 9px 12px; text-align: left; }
.article-body th { background: #f7f9fc; }
.article-body pre { background: #1e2633; color: #dfe6f0; padding: 14px; border-radius: var(--radius-xs); overflow-x: auto; font-size: 13px; margin: 16px 0; }
.article-body code { background: #f2f5fa; padding: 1px 5px; border-radius: 3px; font-size: 13px; }
.article-body blockquote {
  border-left: 4px solid #dbe4f0;
  background: #f8fafc;
  padding: 10px 16px;
  color: #555;
  margin: 16px 0;
}
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 24px 0; }

/* 版权声明 */
.copyright-box {
  background-color: #f8f9fa;
  border: 1px solid #eaeaea;
  border-radius: var(--radius-xs);
  padding: 15px 20px;
  font-size: 13px;
  color: #666;
  line-height: 1.8;
  margin: 28px 0 30px;
}
.copyright-box a { color: var(--blue); word-break: break-all; }

/* 点赞 */
.like-section { text-align: center; margin-bottom: 30px; }
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 25px;
  border: 1px solid var(--blue);
  color: var(--blue);
  background: #fff;
  border-radius: 20px;
  font-size: 15px;
  cursor: pointer;
  transition: all .2s;
}
.like-btn:hover { background: var(--blue-t); }
.like-btn.liked { background: var(--blue); color: #fff; }
.like-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* 操作栏 */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.action-left {
  display: flex;
  align-items: center;
  color: var(--blue);
  font-size: 14px;
  gap: 8px;
}
.action-right {
  display: flex;
  gap: 15px;
  color: var(--ink3);
  font-size: 14px;
  flex-wrap: wrap;
}
.action-right span {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color .15s;
}
.action-right span:hover { color: var(--blue); }

/* 上一篇 / 下一篇 */
.prev-next-nav {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
}
.nav-card {
  flex: 1;
  min-width: 0;
  background-color: var(--blue);
  color: #fff;
  padding: 15px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background-color .2s;
  cursor: pointer;
}
.nav-card:hover { background-color: var(--blue-d); }
.nav-card.void { background: #b9c6d8; cursor: default; }
.nav-card-title {
  font-size: 14px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nav-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: .85;
  gap: 8px;
}

/* 相关推荐 */
.related-section {
  border-top: 1px solid var(--line);
  padding-top: 25px;
}
.related-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 4px solid var(--blue);
  line-height: 1;
}
.related-list { display: flex; flex-direction: column; gap: 20px; }
.related-item { display: flex; gap: 20px; }
.related-thumb {
  width: 180px;
  height: 115px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(135deg, #eef2f8, #dfe7f2);
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.related-item:hover .related-thumb img { transform: scale(1.04); }
.related-thumb .thumb-ph { font-size: 26px; }
.related-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.related-item-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s;
}
.related-item-title:hover { color: var(--blue); }
.related-item-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.7;
}
.related-item-meta {
  font-size: 13px;
  color: var(--ink3);
  display: flex;
  align-items: center;
  gap: 15px;
}
.related-item-meta .icon { color: var(--blue); margin-right: 4px; }

/* 详情页下载地址区 */
.download-box {
  margin: 28px 0 12px;
  padding: 18px 20px 16px;
  background: #f7f9fc;
  border: 1px solid #e3eaf4;
  border-radius: var(--radius);
  scroll-margin-top: 82px;
}
#article-end { scroll-margin-top: 82px; }
.download-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  padding-left: 11px;
  border-left: 4px solid var(--blue);
  line-height: 1.2;
  margin-bottom: 15px;
}
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.download-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--blue);
  color: var(--blue);
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.download-link:hover { background: var(--blue); border-color: var(--blue); color: #fff; transform: translateY(-1px); }
.download-link.kind-baidu { border-color: #2f6bff; color: #2f6bff; }
.download-link.kind-baidu:hover { background: #2f6bff; border-color: #2f6bff; color: #fff; }
.download-link.kind-quark { border-color: #6a5cff; color: #6a5cff; }
.download-link.kind-quark:hover { background: #6a5cff; border-color: #6a5cff; color: #fff; }
.download-link.kind-ali { border-color: #ff7a00; color: #e86d00; }
.download-link.kind-ali:hover { background: #ff7a00; border-color: #ff7a00; color: #fff; }
.download-link.kind-123 { border-color: #16a34a; color: #15803d; }
.download-link.kind-123:hover { background: #16a34a; border-color: #16a34a; color: #fff; }
.download-link .dl-ic {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.download-link .dl-arrow { font-style: normal; font-size: 13px; opacity: .7; }
.download-note { font-size: 12px; color: var(--ink3); margin-top: 12px; }

/* 详情页侧栏：下载按钮 */
.download-widget {
  background: var(--card);
  padding: 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 14px 16px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  transition: background .2s, transform .15s;
}
.download-btn:hover { background: var(--blue-d); transform: translateY(-1px); }
.download-btn.disabled { background: #c3ccda; cursor: default; }
.download-btn.disabled:hover { background: #c3ccda; transform: none; }
.download-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.download-tip {
  font-size: 12px;
  color: var(--ink3);
  text-align: center;
  margin-top: 9px;
}
.article-end { height: 1px; }

/* 分类页：紧凑列表 */
.compact-list { display: flex; flex-direction: column; }
.compact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.compact-item:first-child { padding-top: 4px; }
.compact-item:last-child { border-bottom: none; }
.compact-item:hover { background: #fafbfd; }
.compact-thumb {
  width: 120px;
  height: 78px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e9eef7, #d8e2f0);
}
.compact-thumb img { width: 100%; height: 100%; object-fit: cover; }
.compact-thumb .thumb-ph { font-size: 24px; }
.compact-info { flex: 1; min-width: 0; }
.compact-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s;
}
.compact-item:hover .compact-title { color: var(--blue); }
.compact-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink3);
  margin-top: 4px;
}
.compact-arrow {
  flex: none;
  color: #c4cddb;
  font-size: 26px;
  line-height: 1;
  padding: 0 4px;
  transition: color .15s, transform .15s;
}
.compact-item:hover .compact-arrow { color: var(--blue); transform: translateX(2px); }

/* 详情页侧栏 */
.search-widget {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.search-widget h3 {
  font-size: 16px;
  margin-bottom: 15px;
  padding-left: 10px;
  border-left: 4px solid var(--blue);
  line-height: 1.1;
  color: var(--ink);
  font-weight: 600;
}
.search-form { display: flex; height: 38px; }
.search-form input {
  flex: 1;
  border: 1px solid #ddd;
  padding: 0 10px;
  outline: none;
  border-radius: var(--radius-xs) 0 0 var(--radius-xs);
  font-size: 14px;
  min-width: 0;
  color: var(--ink);
}
.search-form input:focus { border-color: var(--blue); }
.search-form button {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 0 20px;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  cursor: pointer;
  font-size: 14px;
  transition: background .15s;
}
.search-form button:hover { background: var(--blue-d); }
.sidebar-grid {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.grid-item { cursor: pointer; min-width: 0; }
.grid-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-xs);
  overflow: hidden;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #eef2f8, #dfe7f2);
}
.grid-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.grid-item:hover .grid-thumb img { transform: scale(1.05); }
.grid-thumb .thumb-ph { font-size: 20px; }
.grid-title {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s;
}
.grid-item:hover .grid-title { color: var(--blue); }

/* ================= 页脚 ================= */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding: 22px 20px;
  color: var(--ink3);
  font-size: 13px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-inner p { margin: 0; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--blue); }

/* ================= 浮动按钮 ================= */
.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 50px;
  width: 40px;
  height: 40px;
  background: #eee;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all .2s;
  border: none;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { color: #333; background: #e0e0e0; }
.floating-actions {
  position: fixed;
  right: 20px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 99;
}
.float-btn {
  width: 45px;
  height: 45px;
  background: #f0f0f0;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
  transition: background .2s;
  border: none;
}
.float-btn:hover { background: #e0e0e0; color: #333; }

/* ================= 404 ================= */
.error-page {
  max-width: 640px;
  margin: 80px auto;
  padding: 0 20px;
  text-align: center;
}
.error-page .code { font-size: 88px; font-weight: 700; color: var(--blue); line-height: 1; letter-spacing: 2px; }
.error-page p { color: var(--ink3); margin: 16px 0 24px; }
.error-page .btn {
  display: inline-block;
  padding: 9px 24px;
  border-radius: var(--radius-xs);
  background: var(--blue);
  color: #fff;
  transition: background .15s;
}
.error-page .btn:hover { background: var(--blue-d); }

/* ================= 响应式 ================= */
@media (max-width: 1100px) {
  .sidebar { width: 300px; }
}
@media (max-width: 1024px) {
  .main-container { flex-direction: column; }
  .sidebar { width: 100%; }
  .sidebar-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .header-content { height: 60px; gap: 12px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 6px 20px 12px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 0; border-bottom: 1px solid #f2f2f2; border-radius: 0; }
  .nav-links a:hover { border-bottom-color: #f2f2f2; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .user-actions { display: none; }
  .logo { font-size: 20px; }
  .logo img { height: 36px; }
}
@media (max-width: 760px) {
  .main-container { padding: 0 12px; margin: 12px auto; gap: 8px; }
  .content-left { padding: 14px; }
  .article-item { flex-direction: column; gap: 12px; padding: 16px 0; }
  .article-thumb { width: 100%; height: 190px; }
  .article-title { font-size: 16px; margin-bottom: 8px; }
  .article-desc { font-size: 13px; }
  .article-header h1 { font-size: 20px; }
  .article-body { font-size: 14.5px; }
  .content-left.detail { padding: 18px 16px; }
  .prev-next-nav { flex-direction: column; gap: 10px; }
  .related-item { gap: 12px; }
  .related-thumb { width: 120px; height: 82px; }
  .related-item-title { font-size: 15px; }
  .sidebar-grid { grid-template-columns: repeat(2, 1fr); }
  .back-to-top { right: 14px; bottom: 20px; }
  .floating-actions { right: 12px; bottom: 76px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .compact-thumb { width: 100px; height: 65px; }
  .compact-title { font-size: 16px; }
  .compact-meta { gap: 10px; font-size: 12.5px; }
}
@media (max-width: 480px) {
  .article-thumb { height: 160px; }
  .article-meta { font-size: 12px; gap: 10px; }
  .sidebar-grid { grid-template-columns: 1fr 1fr; }
  .like-btn { width: 100%; justify-content: center; }
}
