/* ==========================================================================
   白月光 BYG Cloud — 原创文章详情页样式库 (article.css)
   ========================================================================== */

.article-page {
  padding-top: 40px;
  padding-bottom: 90px;
}

.article-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 面包屑导航 */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.breadcrumb-nav a {
  color: var(--text-secondary);
}

.breadcrumb-nav a:hover {
  color: var(--color-ice-blue);
}

.breadcrumb-separator {
  color: var(--text-light);
}

.breadcrumb-current {
  color: var(--color-ice-blue);
  font-weight: 500;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 文章头部区 */
.article-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (max-width: 768px) {
  .article-header {
    padding: 28px 20px;
  }
}

.article-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: var(--color-lavender-subtle);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
  color: var(--color-lavender);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}

.article-h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .article-h1 {
    font-size: 24px;
  }
}

.article-intro-box {
  background: rgba(248, 250, 252, 0.9);
  border-left: 4px solid var(--color-ice-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 文章正文区域 */
.article-content {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.85;
}

@media (max-width: 768px) {
  .article-content {
    padding: 30px 20px;
    font-size: 15px;
  }
}

.article-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 48px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}

.article-content h2::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 22px;
  background: linear-gradient(180deg, var(--color-ice-blue), var(--color-lavender));
  border-radius: 3px;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 32px;
  margin-bottom: 14px;
}

.article-content p {
  margin-bottom: 20px;
  color: #334155;
}

.article-content ul,
.article-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
  color: #334155;
}

.article-content li {
  margin-bottom: 10px;
  line-height: 1.75;
}

/* 强调与呼出框 */
.callout {
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 28px 0;
  border-left: 4px solid;
}

.callout-info {
  background: rgba(2, 132, 199, 0.06);
  border-left-color: var(--color-ice-blue);
  color: #0369a1;
}

.callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: var(--color-moon-gold);
  color: #92400e;
}

.callout-tip {
  background: rgba(16, 185, 129, 0.08);
  border-left-color: var(--color-emerald);
  color: #065f46;
}

.callout-title {
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.callout p {
  margin-bottom: 0;
  color: inherit;
  font-size: 14px;
}

/* 算式与数据表格 */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  -webkit-overflow-scrolling: touch;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  min-width: 580px;
}

.article-table th {
  background: #f8fafc;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
}

.article-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.article-table tr:last-child td {
  border-bottom: none;
}

.article-table tr:hover td {
  background: rgba(248, 250, 252, 0.6);
}

/* 步骤指示卡 */
.step-guide-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 18px;
}

.step-guide-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.step-guide-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-ice-blue);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.step-guide-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 文章专属 FAQ 区块 */
.article-faq-section {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 2px dashed var(--border-subtle);
}

.article-faq-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 24px;
}

.article-faq-card {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.article-faq-q {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.article-faq-q::before {
  content: "Q:";
  color: var(--color-ice-blue);
  font-weight: 800;
}

.article-faq-a {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  padding-left: 24px;
}

/* 结论与编辑署名卡片 */
.article-conclusion {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.article-conclusion h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0;
  margin-bottom: 12px;
}

.article-author-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-md);
  margin-bottom: 40px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  position: relative;
  overflow: hidden;
}

.article-author-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-ice-blue) 0%, var(--color-lavender) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.article-author-card:hover {
  background: #ffffff;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 12px 30px -6px rgba(56, 189, 248, 0.15), 0 8px 16px -4px rgba(129, 140, 248, 0.1);
  transform: translateY(-2px);
}

.article-author-card:hover::before {
  opacity: 1;
}

.author-main-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
  transition: transform 0.3s ease;
}

.article-author-card:hover .author-avatar {
  transform: scale(1.06);
}

.author-info {
  flex: 1;
}

.author-info h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-info p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.6;
}

.author-action {
  flex-shrink: 0;
}

.author-action .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 640px) {
  .article-author-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 20px;
    gap: 16px;
  }
  .author-main-wrapper {
    width: 100%;
  }
  .author-action {
    width: 100%;
  }
  .author-action .btn {
    width: 100%;
    justify-content: center;
  }
}

/* 相关推荐文章卡片 */
.related-articles-section {
  margin-top: 56px;
}

.related-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 640px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}
