/* ==================== 文章详情页样式（独立页面，配色与首页统一） ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background-color: #f8fbff;
  color: #3f495a;
  -webkit-font-smoothing: antialiased;
}

.article-wrap {
  max-width: 768px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

@media (min-width: 768px) {
  .article-wrap {
    padding: 56px 24px 80px;
  }
}

/* 面包屑 */
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #838fa4;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.crumb a {
  color: #838fa4;
  text-decoration: none;
  transition: color 0.2s ease;
}

.crumb a:hover {
  color: #3575ef;
}

.crumb .cur {
  color: #17254f;
}

/* 头部 */
.article-header {
  margin-bottom: 32px;
}

.article-tag {
  display: inline-block;
  background: #f0f5ff;
  color: #3575ef;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.article-title {
  font-size: 24px;
  font-weight: 500;
  color: #17254f;
  letter-spacing: 2px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.article-subtitle {
  font-size: 14px;
  color: #838fa4;
  letter-spacing: 1px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #a3aab2;
  letter-spacing: 1px;
}

.article-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d6e4ff;
}

@media (min-width: 768px) {
  .article-title {
    font-size: 34px;
    letter-spacing: 3px;
  }
  .article-subtitle {
    font-size: 16px;
  }
}

/* 正文卡片 */
.article-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(123, 165, 235, 0.15);
  padding: 24px;
}

@media (min-width: 768px) {
  .article-card {
    padding: 40px;
  }
}

/* 引言 */
.article-intro {
  border-left: 4px solid #3575ef;
  padding-left: 16px;
  margin-bottom: 32px;
}

.article-intro p {
  font-size: 14px;
  color: #3f495a;
  letter-spacing: 1px;
  line-height: 26px;
}

@media (min-width: 768px) {
  .article-intro {
    padding-left: 20px;
  }
  .article-intro p {
    font-size: 16px;
    line-height: 30px;
  }
}

/* 章节 */
.article-section {
  margin-bottom: 32px;
}

.article-section:last-child {
  margin-bottom: 0;
}

.article-section h2 {
  font-size: 18px;
  font-weight: 500;
  color: #17254f;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.article-section p {
  font-size: 14px;
  color: #3f495a;
  letter-spacing: 1px;
  line-height: 26px;
  margin-bottom: 12px;
}

.article-section ul {
  margin-top: 12px;
}

.article-section li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #3f495a;
  letter-spacing: 1px;
  line-height: 26px;
  margin-bottom: 8px;
  list-style: none;
}

.article-section li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3575ef;
  margin-top: 10px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .article-section h2 {
    font-size: 20px;
  }
  .article-section p,
  .article-section li {
    font-size: 16px;
    line-height: 30px;
  }
}

/* 常见问题 */
.article-faq {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #eef3fb;
}

.article-faq h2 {
  font-size: 18px;
  font-weight: 500;
  color: #17254f;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.faq-item {
  margin-bottom: 20px;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-item .q {
  font-size: 14px;
  font-weight: 500;
  color: #17254f;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.faq-item .a {
  font-size: 14px;
  color: #6a7486;
  letter-spacing: 1px;
  line-height: 26px;
}

@media (min-width: 768px) {
  .article-faq h2 {
    font-size: 20px;
  }
  .faq-item .q,
  .faq-item .a {
    font-size: 16px;
  }
}

/* 结尾 */
.article-conclusion {
  margin-top: 32px;
  background: #f6f9ff;
  border-radius: 12px;
  padding: 20px;
}

.article-conclusion p {
  font-size: 14px;
  color: #3f495a;
  letter-spacing: 1px;
  line-height: 26px;
}

@media (min-width: 768px) {
  .article-conclusion {
    padding: 24px;
  }
  .article-conclusion p {
    font-size: 16px;
    line-height: 30px;
  }
}

/* 底部返回 */
.article-back {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #838fa4;
  letter-spacing: 2px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-btn:hover {
  color: #3575ef;
}

.home-link {
  font-size: 14px;
  color: #3575ef;
  text-decoration: none;
  letter-spacing: 2px;
  transition: color 0.2s ease;
}

.home-link:hover {
  color: #2a64da;
}

/* 文章不存在 */
.not-found {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(123, 165, 235, 0.15);
  padding: 64px 24px;
  text-align: center;
}

.not-found p {
  font-size: 18px;
  color: #17254f;
  letter-spacing: 3px;
  margin-bottom: 24px;
}

.not-found a {
  display: inline-block;
  padding: 0 32px;
  height: 42px;
  line-height: 42px;
  background: #3575ef;
  color: #fff;
  font-size: 14px;
  border-radius: 21px;
  letter-spacing: 3px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.not-found a:hover {
  background: #2a64da;
}

/* ==================== 上一篇 / 下一篇 ==================== */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}

.nav-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(123, 165, 235, 0.12);
  padding: 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(123, 165, 235, 0.25);
}

.nav-prev {
  text-align: left;
}

.nav-next {
  text-align: right;
  align-items: flex-end;
}

.nav-label {
  font-size: 12px;
  color: #838fa4;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.nav-title {
  font-size: 14px;
  font-weight: 500;
  color: #17254f;
  letter-spacing: 1px;
  line-height: 22px;
  /* 限制两行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nav-placeholder {
  color: #c0d6ff;
  font-size: 12px;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
}

.nav-placeholder-right {
  justify-content: flex-end;
}

/* ==================== 继续阅读（随机推荐） ==================== */
.article-related {
  margin-top: 40px;
}

.article-related h3 {
  font-size: 16px;
  font-weight: 500;
  color: #17254f;
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.related-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(123, 165, 235, 0.12);
  padding: 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(123, 165, 235, 0.25);
}

.related-cat {
  font-size: 12px;
  color: #3575ef;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.related-title {
  font-size: 14px;
  font-weight: 500;
  color: #17254f;
  letter-spacing: 1px;
  line-height: 22px;
  flex: 1;
  margin-bottom: 12px;
  /* 限制三行 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-date {
  font-size: 12px;
  color: #a3aab2;
  letter-spacing: 1px;
}
