@charset "utf-8";

/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1f2328;
  background: #f6f8fa;
  line-height: 1.7;
  font-size: 15px;
}
a { color: #0969da; text-decoration: none; }
a:hover { color: #0550ae; }
li { list-style: none; }
img { vertical-align: middle; }
svg { vertical-align: middle; }
input, textarea { font-family: inherit; color: #1f2328; outline: none; box-sizing: border-box; }
input { height: 32px; line-height: 32px; padding: 0 10px; border: 1px solid #d1d9e0; border-radius: 6px; background: #fff; }
textarea { width: 100%; padding: 10px; border: 1px solid #d1d9e0; border-radius: 6px; resize: none; }
input::placeholder, textarea::placeholder { color: #8b949e; }

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.btn {
  display: inline-block;
  padding: 0 20px;
  height: 32px;
  line-height: 32px;
  border: none;
  border-radius: 6px;
  background: #0969da;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}
.btn:hover { background: #0550ae; color: #fff; }
.btn-block { width: 100%; height: 40px; line-height: 40px; margin-top: 6px; }
.empty { text-align: center; padding: 48px 0; color: #8b949e; }

/* ============ 头部 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e8ec;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: #1f2328; }
.brand img { height: 22px; }
.brand:hover { color: #1f2328; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: #59636e; font-size: 14px; }
.nav-links a:hover { color: #0969da; }

/* ============ 主体 ============ */
.main { padding: 24px 0 48px; }

/* ============ Hero ============ */
.hero { margin-bottom: 24px; }
.hero-card {
  background: linear-gradient(180deg, #f0f6ff 0%, #fff 100%);
  border: 1px solid #e5e8ec;
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(31, 35, 40, 0.05);
}
.hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(31, 35, 40, 0.12);
  object-fit: cover;
}
.hero-name { margin-top: 14px; font-size: 26px; font-weight: 700; color: #1f2328; }
.hero-mood { margin-top: 6px; color: #57606a; font-size: 15px; }
.hero-intro { margin: 10px auto 0; max-width: 520px; color: #59636e; font-size: 14px; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e8ec;
}
.stat b { display: block; font-size: 20px; color: #1f2328; }
.stat span { font-size: 13px; color: #8b949e; }

/* ============ 内容布局 ============ */
.content { display: flex; align-items: flex-start; gap: 20px; }
.main-col { flex: 1; min-width: 0; }
.sidebar { flex: 0 0 250px; }

/* ============ 卡片 ============ */
.card {
  background: #fff;
  border: 1px solid #e5e8ec;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(31, 35, 40, 0.04);
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #f0f2f4;
}
.card-title::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: #0969da; }

/* ============ 文章列表 ============ */
.article-item { padding: 14px 0; border-bottom: 1px solid #f0f2f4; }
.article-item:last-child { border-bottom: none; }
.article-title { font-size: 16px; font-weight: 600; color: #1f2328; }
.article-title:hover { color: #0969da; }
.article-meta { margin-top: 6px; color: #8b949e; font-size: 12px; display: flex; gap: 16px; flex-wrap: wrap; }
.article-intro {
  margin-top: 8px;
  color: #59636e;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ============ 侧栏 ============ */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { margin: 0; }
.tag-list a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f0f6ff;
  color: #0969da;
  font-size: 13px;
}
.tag-list a:hover { background: #e0ecfa; color: #0550ae; }
.tag-list em { font-style: normal; color: #8b949e; font-size: 12px; }
.search { display: flex; gap: 8px; }
.search input[name=name] { flex: 1; }

/* ============ 文章详情 ============ */
.article-page .main-col { max-width: 100%; }
.article-box { padding: 32px; }
.article-title { font-size: 24px; font-weight: 700; line-height: 1.4; }
.article-info { margin-top: 10px; color: #8b949e; font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid #f0f2f4; }
.article-info a { color: #8b949e; }
.article-content { margin: 24px 0; }
.article-menu { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid #f0f2f4; padding-top: 14px; color: #8b949e; font-size: 14px; }

/* ============ 侧栏博主 ============ */
.side-user { text-align: center; }
.side-avatar { width: 64px; height: 64px; border-radius: 50%; }
.side-name { margin-top: 8px; font-weight: 700; font-size: 15px; }
.side-mood { margin-top: 4px; color: #8b949e; font-size: 13px; }

/* ============ 登录 ============ */
.login { max-width: 360px; margin: 40px auto; text-align: center; padding: 32px; }
.login-title { font-size: 18px; }
.login-tip { color: #8b949e; font-size: 13px; margin: 6px 0 18px; }
.login input[type=password] { width: 100%; margin-bottom: 10px; }
.login-vcode { display: flex; gap: 8px; margin-bottom: 10px; }
.login-vcode input { flex: 1; }
.vcode-img { height: 32px; cursor: pointer; border: 1px solid #d1d9e0; border-radius: 6px; background: #f6f8fa; }

/* ============ 提示页 ============ */
.prompt { max-width: 520px; margin: 40px auto; text-align: center; }
.prompt-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.prompt-body { color: #59636e; }
.prompt-footer { margin-top: 16px; color: #8b949e; font-size: 13px; display: flex; justify-content: center; gap: 20px; }

/* ============ 评论 ============ */
.comment-form { border: 1px solid #d1d9e0; border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.comment-info { display: flex; border-bottom: 1px solid #eef0f2; }
.comment-info-item { flex: 1; display: flex; align-items: center; }
.comment-info-item label { width: 56px; text-align: center; color: #8b949e; font-size: 13px; border-right: 1px solid #eef0f2; }
.comment-info-item input { border: none; width: 100%; }
.comment-form textarea { border: none; height: 96px; }
.comment-submit { display: flex; align-items: center; gap: 8px; }
.comment-submit .btn { margin: 0; }
.vcode-input { width: 90px; }
.comment-replys { color: #8b949e; font-size: 13px; margin-left: 8px; }
.comment-list { margin-top: 8px; }
.comment-list li { padding: 14px 0; border-bottom: 1px solid #f0f2f4; }
.comment-list li:last-child { border-bottom: none; }
.comment-list .comment-list { margin-left: 24px; }
.comment-user { color: #0969da; font-weight: 600; }
.comment-admin > .comment-title .comment-user { color: #d73a49; }
.comment-time { color: #8b949e; font-size: 12px; margin-left: 10px; }
.comment-title a { color: #d73a49; margin-left: 10px; font-size: 13px; }
.comment-content { margin-top: 6px; color: #1f2328; font-size: 14px; }
.comment-content p { margin: 0; }
.comment-reply { margin: 0 5px; cursor: pointer; color: #0969da; font-size: 13px; }
.comment-replys span { margin-left: 8px; color: #0969da; border: 1px solid #0969da; border-radius: 4px; padding: 1px 6px; font-size: 12px; cursor: pointer; }

/* ============ 分页 ============ */
.paging { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.paging a, .paging-ell {
  display: inline-block;
  min-width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  padding: 0 8px;
  border: 1px solid #d1d9e0;
  border-radius: 6px;
  color: #59636e;
  font-size: 13px;
  background: #fff;
}
.paging a:hover { border-color: #0969da; color: #0969da; }
.paging a.paging-active { background: #0969da; border-color: #0969da; color: #fff; }
.paging .paging-disabled { opacity: 0.5; cursor: not-allowed; color: #8b949e; }
.paging .paging-disabled:hover { border-color: #d1d9e0; color: #8b949e; }

/* ============ 页脚 ============ */
.site-footer {
  background: #fff;
  border-top: 1px solid #e5e8ec;
  padding: 20px 0;
  margin-top: 24px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #8b949e;
  font-size: 13px;
}
.footer-copy a { color: #57606a; }
.footer-meta { color: #9aa4ae; font-size: 12px; }

/* ============ 弹窗 ============ */
.alert { position: fixed; top: 0; left: 0; z-index: 99990; width: 100%; height: 100%; display: flex; align-items: center; }
.alert-box { width: 300px; background: #fff; position: relative; margin: auto; box-shadow: 0 8px 30px rgba(31,35,40,0.18); border-radius: 10px; overflow: hidden; }
.alert-bg { position: fixed; inset: 0; background: rgba(31, 35, 40, 0.35); }
.alert-content { font-size: 15px; padding: 24px 20px; text-align: center; color: #1f2328; }
.alert-footer { border-top: 1px solid #f0f2f4; padding: 10px 20px; text-align: right; }
.alert-footer > div { padding: 0 12px; height: 30px; line-height: 30px; cursor: pointer; display: inline-block; border-radius: 6px; font-size: 14px; }
.alert-cancel { color: #57606a; }
.alert-cancel:hover { background: #f0f2f4; }
.alert-confirm { background: #0969da; color: #fff; margin-left: 8px; }
.alert-confirm:hover { background: #0550ae; }

/* ============ 动画 ============ */
.ani-in { animation: .6s in; }
.ani-out { animation: .6s out; }
.ani-up-in { animation: .6s upIn; }
.ani-down-in { animation: .6s downIn; }
@keyframes in { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes out { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes upIn { 0% { opacity: 0; transform: translate3d(0,-10%,0); } 100% { opacity: 1; transform: translate3d(0,0,0); } }
@keyframes downIn { 0% { opacity: 0; transform: translate3d(0,10%,0); } 100% { opacity: 1; transform: translate3d(0,0,0); } }

/* ============ 自适应 ============ */
@media (max-width: 768px) {
  body { background: #fff; }
  .nav { height: 54px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
  .hero-card { padding: 28px 16px; }
  .hero-stats { gap: 32px; }
  .content { flex-direction: column; }
  .sidebar { flex: 0 0 100%; }
  .article-box { padding: 20px; }
  .footer-inner { justify-content: center; text-align: center; }
}
