/**
 * 博客全局样式重构
 * 核心原则：
 * 1. 模块化命名（BEM规范）
 * 2. 响应式适配
 * 3. 样式重置 + 统一风格
 * 4. 优化交互体验
 */

/* ========== 基础样式重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  background-color: #f5f7fa;
}

a {
  text-decoration: none;
  color: #0066cc;
  transition: color 0.2s ease;
}

a:hover {
  color: #004999;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

/* ========== 布局样式 ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.sidebar {
  width: 300px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: fixed;
  top: 20px;
  right: 20px;
  height: calc(100vh - 40px);
  overflow-y: auto;
}

.main-content {
  width: calc(100% - 340px);
  padding: 20px;
  margin-right: 340px;
}

/* 响应式布局：移动端适配 */
@media (max-width: 992px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
  }

  .main-content {
    width: 100%;
    margin-right: 0;
  }
}

/* ========== 模块样式：Profile（个人资料） ========== */
.profile-notice {
  padding: 10px;
  margin-bottom: 15px;
  font-size: 13px;
  color: #666;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 15px;
  border: 2px solid #eee;
}

/* ========== 模块样式：Catalog（目录） ========== */
.catalog-container {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
}

.catalog-title {
  font-size: 16px;
  margin-bottom: 10px;
  color: #333;
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
}

.catalog-list .catalog-level1 {
  font-weight: 600;
  margin: 8px 0;
}

.catalog-list .catalog-level2 {
  margin-left: 15px;
  font-size: 13px;
}

.catalog-list .catalog-level3 {
  margin-left: 30px;
  font-size: 12px;
  color: #666;
}

.catalog-list a {
  display: block;
  padding: 2px 0;
}

/* ========== 模块样式：Signature（签名） ========== */
.signature-container {
  margin-top: 30px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 13px;
  color: #666;
}

/* ========== 模块样式：Sponsor（赞助） ========== */
.sponsor-container {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
}

.sponsor-title {
  font-size: 16px;
  margin-bottom: 10px;
  color: #333;
}

.sponsor-content {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.sponsor-wechat, .sponsor-alipay {
  width: 120px;
  height: 120px;
  border: 1px solid #eee;
  border-radius: 4px;
}

.sponsor-paypal {
  display: inline-block;
  padding: 8px 15px;
  background: #0070ba;
  color: #fff;
  border-radius: 4px;
}

/* ========== 模块样式：TopImg + TopInfo（顶部图片/信息） ========== */
.top-img-container {
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.top-info-container {
  text-align: center;
  margin-bottom: 30px;
}

.top-info-title {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
}

.top-info-text {
  font-size: 16px;
  color: #666;
  margin-bottom: 15px;
}

.top-info-social a {
  display: inline-block;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-radius: 50%;
  background: #0066cc;
  color: #fff;
  margin: 0 5px;
  text-align: center;
  transition: background 0.2s ease;
}

.top-info-social a:hover {
  background: #004999;
}

/* ========== 模块样式：Anniversary（纪念日） ========== */
#showsectime {
  font-family: "Consolas", monospace;
}

/* ========== 模块样式：Live2D + 鼠标特效 ========== */
/* Live2D 看板娘位置优化 */
#l2d-widget {
  z-index: 9999 !important;
}

/* 鼠标点击特效画布适配 */
canvas[style*="pointer-events: none"] {
  z-index: 9999 !important;
}

/* ========== 模块样式：Music Player（音乐播放器） ========== */
.aplayer-fixed {
  z-index: 9998 !important;
}

/* ========== 模块样式：Progress Bar（顶部加载条） ========== */
#nprogress .bar {
  background: #0066cc !important;
  height: 3px !important;
}

#nprogress .peg {
  box-shadow: 0 0 10px #0066cc, 0 0 5px #0066cc !important;
}

/* ========== 模块样式：Zoom Img（图片放大） ========== */
[data-action="zoom"] {
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.zoom-img-wrap {
  z-index: 9999 !important;
}

/* ========== 模块样式：Snow Effect（雪花特效） ========== */
#Snow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999 !important;
}

/* ========== 辅助样式 ========== */
/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* 隐藏元素（通用） */
.hide {
  display: none !important;
}

/* 清除浮动 */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}
