/* ============================================
   文章页面样式
   ============================================ */

.article {
  padding: 56px 0 72px;
  background: var(--bg);
}

.article-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.article-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(79, 110, 247, 0.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.article-date {
  color: var(--text-light);
  font-size: 13px;
}

.article-title {
  font-size: clamp(26px, 4.5vw, 40px);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 16px;
}

.article-sub {
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.8;
}

/* 文章正文 */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
}

.article-body h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 44px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
}

.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 10px;
}

.article-body p {
  margin-bottom: 16px;
}

.article-body ul {
  margin: 0 0 16px 22px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body blockquote {
  background: var(--bg-alt);
  border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0;
  padding: 14px 20px;
  margin: 24px 0;
  color: var(--text-light);
}

/* 代码/播报块 */
.article-tip {
  background: #0f172a;
  color: #cbd5e1;
  border-radius: 10px;
  padding: 18px 22px;
  margin: 20px 0;
  overflow-x: auto;
}

.article-tip pre {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13.5px;
  line-height: 1.75;
  white-space: pre;
  margin: 0;
}

/* 特性网格 */
.article-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.feature-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}

.feature-icon {
  font-size: 30px;
  margin-bottom: 10px;
}

.feature-item h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.feature-item p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}

/* 步骤 */
.steps {
  margin: 20px 0;
}

.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.step p {
  margin: 2px 0 0;
}

/* 对比表格 */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 14px;
}

.article-body th,
.article-body td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: center;
}

.article-body th {
  background: var(--bg-alt);
  font-weight: 700;
}

.article-body td:first-child {
  font-weight: 600;
}

/* 文章底部 */
.article-footer {
  max-width: 720px;
  margin: 48px auto 0;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 阅读量 */
.article-views {
  max-width: 720px;
  margin: 28px auto 0;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
}

@media (max-width: 640px) {
  .article {
    padding: 40px 0 56px;
  }

  .article-body table {
    font-size: 12px;
  }

  .article-body th,
  .article-body td {
    padding: 7px 6px;
  }
}
