/* ===== 基础 ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f6f7f9;
  color: #333 !important;
  line-height: 1.8;
}

/* ===== 顶部导航 ===== */
#header {
  background: linear-gradient(135deg, #4f8cff 0%, #8a6cf0 100%) !important;
  border-bottom: none !important;
}
#header a, #header .current a {
  color: #fff !important;
  text-shadow: none !important;
  transition: opacity .2s;
}
#header a:hover { opacity: .75; }

/* ===== 博客标题 ===== */
#blogTitle h1 a { color: #2b3a55 !important; }
#blogTitle h1 a:hover { color: #4f8cff !important; }
#blogTitle h2 { color: #8a8f99 !important; font-size: 14px; }

/* ===== 主体 ===== */
#main {
  max-width: 1100px;
  margin: 24px auto !important;
  padding: 0 16px;
}
#mainContent {
  background: #fff;
  border-radius: 14px;
  padding: 28px 32px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}

/* ===== 侧边栏 ===== */
#sideBar { background: transparent !important; }
#sideBar .catListTitle,
#sideBar .newsItem,
#sideBar .catListRemark {
  background: #fff !important;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  padding: 16px 18px;
  margin-bottom: 16px;
  border: none !important;
}
#sideBar .catListTitle {
  font-weight: 600;
  color: #2b3a55 !important;
  border-left: 4px solid #4f8cff !important;
}

/* ===== 文章标题 ===== */
.postTitle, .entrylistPosttitle { font-size: 1.7em !important; font-weight: 700; }
.postTitle a, .entrylistPosttitle a {
  color: #2b3a55 !important;
  transition: color .2s;
}
.postTitle a:hover, .entrylistPosttitle a:hover { color: #4f8cff !important; }
.entrylistItem { padding: 18px 0; }

/* ===== 链接 ===== */
#mainContent a { color: #4f8cff; }
#mainContent a:hover { color: #8a6cf0 !important; }

/* ===== 代码块 ===== */
pre {
  background: #1e1e2e !important;
  color: #e0e0f0 !important;
  border-radius: 10px !important;
  padding: 16px !important;
  border: none !important;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
code {
  background: #eef1f6;
  color: #d6336c;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
}
pre code { background: transparent !important; color: inherit !important; padding: 0; }

/* ===== 引用块 ===== */
blockquote {
  border-left: 4px solid #4f8cff !important;
  background: #f0f5ff;
  padding: 10px 16px !important;
  color: #555;
  border-radius: 0 8px 8px 0;
}

/* ===== 表格 ===== */
table { border-collapse: collapse; width: 100%; margin: 16px 0; }
th, td { border: 1px solid #e3e7ee !important; padding: 8px 12px; }
th { background: #f0f5ff; }

/* ===== 图片 ===== */
#mainContent img { border-radius: 8px; max-width: 100%; }

/* ===== 页脚 ===== */
#footer { color: #9aa0ac !important; padding: 20px 0 40px !important; }
#my-footer { text-align: center; padding: 0 0 10px; color: #9aa0ac; font-size: 13px; }

/* ===== 阅读进度条 ===== */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, #4f8cff, #8a6cf0);
  z-index: 9999;
}

/* ===== 回到顶部（放在看板娘左边） ===== */
#back-to-top {
  position: fixed; right: 230px; bottom: 40px;
  width: 44px; height: 44px; line-height: 44px;
  text-align: center; border-radius: 50%;
  background: #fff; color: #4f8cff !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
  font-size: 20px; text-decoration: none !important;
  opacity: 0; visibility: hidden; transition: all .3s;
  z-index: 9998;
}
#back-to-top:hover { background: #4f8cff; color: #fff !important; transform: translateY(-3px); }
#back-to-top.show { opacity: 1; visibility: visible; }

/* ===== 看板娘 ===== */
#ds-waifu {
  position: fixed; right: 16px; bottom: 0; z-index: 9998;
  width: 200px; text-align: center;
  transition: transform .3s; transform-origin: bottom center;
}
#ds-waifu-img {
  width: 200px; height: auto; display: block; cursor: pointer;
  filter: drop-shadow(0 6px 16px rgba(30,80,160,.25));
  animation: dsFloat 3.5s ease-in-out infinite;
}
@keyframes dsFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
#ds-waifu:hover { transform: scale(1.05); }
#ds-waifu-tip {
  opacity: 0; visibility: hidden; transition: all .3s;
  background: #fff; color: #2b3a55; font-size: 13px; line-height: 1.5;
  padding: 8px 12px; border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  margin-bottom: 8px; position: relative;
}
#ds-waifu-tip.show { opacity: 1; visibility: visible; }
#ds-waifu-tip:after {
  content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #fff; border-bottom: 0;
}
@media (max-width: 768px) {
  #ds-waifu { width: 120px; right: 6px; }
  #ds-waifu-img { width: 120px; }
  #back-to-top { display: none; }
}