*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  color: #333;
  background: #fafafa;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  border-bottom: 1px solid #e8e8e8;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 60px;
  flex-wrap: wrap;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.logo span {
  color: #5b8def;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

nav a {
  color: #666;
  font-size: 15px;
  transition: color 0.2s;
  white-space: nowrap;
}

nav a:hover {
  color: #333;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 270px;
  min-width: 230px;
}

.search-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  color: #333;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
  padding: 7px 12px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form input:focus {
  border-color: #b8caff;
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.12);
}

.search-form button {
  border: none;
  background: #5b8def;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  min-width: 48px;
  padding: 7px 12px;
  transition: background 0.2s;
  white-space: nowrap;
}

.search-form button:hover {
  background: #4678dd;
}

#page-list {
  padding: 40px 0 80px;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}

.page-desc {
  color: #888;
  font-size: 15px;
  margin-bottom: 36px;
}

.article-list {
  display: grid;
  gap: 18px;
}

.article-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  cursor: pointer;
  transition: box-shadow 0.25s, border-color 0.25s;
}

.article-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.card-link {
  display: block;
  padding: 28px 30px;
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: #aaa;
  font-size: 13px;
  margin-bottom: 10px;
}

.tag {
  background: #f0f4ff;
  border-radius: 20px;
  color: #5b8def;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
}

.article-card h2 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.article-card:hover h2 {
  color: #5b8def;
}

.summary {
  color: #777;
  font-size: 14.5px;
  line-height: 1.65;
}

.article-card .summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#page-detail {
  padding: 48px 0 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #888;
  font-size: 14px;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.back-link:hover {
  color: #333;
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 14px;
}

.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: #aaa;
  font-size: 14px;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid #eee;
}

.detail-body {
  color: #444;
  font-size: 16px;
  line-height: 1.85;
}

.detail-body a {
  color: inherit;          /* 颜色依然继承正文的深灰色，不破坏整体色彩 */
  text-decoration: none;
  border-bottom: 2px solid #e2e8f0; /* 用一条淡淡的浅灰色底边框代替下划线 */
  padding-bottom: 1px;
  transition: all 0.2s;
}

.detail-body a:hover {
  color: #000000;          /* 鼠标移上去文字变全黑 */
  border-bottom-color: #3b82f6; /* 底边框瞬间亮起变为科技蓝，像一抹微光 */
  background-color: rgba(59, 130, 246, 0.05); /* 摸上去时带有极其轻微的蓝色背景泛光 */
}

/* 针对文章详情页内的分割线进行优雅控距 */
.detail-body hr {
  border: none;
  border-top: 1px solid #e2e8f0; /* 保持你现在的浅灰色线条样式 */
  margin-top: 2rem;              /* 【核心】强行让分割线距离上方文字有 2 个字高的距离 */
  margin-bottom: 2rem;           /* 强行让分割线距离下方标题有 2 个字高的距离 */
}

.detail-body p {
  /*margin-bottom: 20px;*/
}

.detail-body h1,
.detail-body h2,
.detail-body h3 {
  color: #333;
  font-weight: 600;
  line-height: 1.35;
  margin: 36px 0 14px;
}

.detail-body h1 {
  font-size: 24px;
}

.detail-body h2,
.detail-body h3 {
  font-size: 20px;
}

.detail-body ul,
.detail-body ol {
  margin: 0 0 22px 22px;
}

.detail-body li {
  margin-bottom: 6px;
}

.detail-body code {
  background: #f4f5f7;
  border-radius: 4px;
  font-family: "Fira Code", Menlo, Consolas, monospace;
  font-size: 14px;
  padding: 2px 7px;
}

.detail-body pre {
  background: #282c34;
  border-radius: 8px;
  color: #abb2bf;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 22px;
  overflow-x: auto;
  padding: 20px 24px;
}

.detail-body pre code {
  background: none;
  color: inherit;
  font-size: inherit;
  padding: 0;
}

.detail-body blockquote {
  background: #f8faff;
  border-left: 4px solid #5b8def;
  border-radius: 0 6px 6px 0;
  color: #555;
  margin: 0 0 22px;
  padding: 12px 20px;
}

.empty-state {
  color: #888;
  font-size: 15px;
}

.load-more {
  color: #aaa;
  font-size: 13px;
  padding: 24px 0 0;
  text-align: center;
}

footer {
  border-top: 1px solid #e8e8e8;
  color: #bbb;
  font-size: 13px;
  padding: 28px 0;
  text-align: center;
}

@media (max-width: 720px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 14px;
    padding-top: 14px;
  }

  nav {
    gap: 18px;
    margin-left: 0;
  }

  .search-form {
    flex: none;
    min-width: 0;
    width: 100%;
  }

  .search-form input,
  .search-form button {
    min-height: 38px;
  }

  .page-title {
    font-size: 22px;
  }

  .card-link {
    padding: 20px 18px;
  }

  .article-card h2 {
    font-size: 17px;
  }

  .detail-title {
    font-size: 23px;
  }

  .detail-body {
    font-size: 15.5px;
  }

  .detail-body pre {
    margin-left: -4px;
    margin-right: -4px;
    padding: 16px;
  }

  #page-list,
  #page-detail {
    padding-bottom: 64px;
  }
}
