/* ==========================================================================
   SparkCloud 花火云 - 深度文章与教程专栏样式 (article.css)
   特性：沉浸式暗色排版、极佳阅读字号行距、内部矩阵跳转组件、浮动注册转换条
   ========================================================================== */

/* 文章页面整体布局 */
.article-page {
  padding: 40px 0 90px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

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

.breadcrumb-nav a:hover {
  color: var(--spark-primary);
}

.breadcrumb-separator {
  color: var(--text-dim);
  font-size: 11px;
}

.breadcrumb-current {
  color: var(--spark-cyan);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 主容器分栏：左侧主体文章，右侧固定/粘性转化边栏 */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* 文章主体内容盒 */
.article-main-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 45px 40px;
  backdrop-filter: blur(14px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.45);
}

.article-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 26px;
  margin-bottom: 34px;
}

.article-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 85, 0, 0.15);
  border: 1px solid rgba(255, 85, 0, 0.35);
  color: #ff9e66;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

.article-title-main {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.3;
  color: var(--text-pure);
  margin-bottom: 18px;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
}

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

/* 正文 Typography 规范 */
.article-content {
  font-size: 16px;
  line-height: 1.85;
  color: #d1d5db;
}

.article-content h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-pure);
  margin: 38px 0 18px;
  padding-left: 14px;
  border-left: 4px solid var(--spark-primary);
  line-height: 1.35;
}

.article-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: #f3f4f6;
  margin: 28px 0 14px;
}

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

.article-content strong {
  color: #ffffff;
  font-weight: 700;
}

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

.article-content li {
  margin-bottom: 10px;
  color: #d1d5db;
}

/* 内部高亮推荐与内部跳转锚点框 */
.inline-promo-box {
  background: linear-gradient(135deg, rgba(255, 85, 0, 0.12) 0%, rgba(0, 240, 255, 0.08) 100%);
  border: 1px solid rgba(255, 85, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin: 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.inline-promo-text h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 6px;
}

.inline-promo-text p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 0;
}

.inline-promo-btn {
  flex-shrink: 0;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--spark-primary), #ff007a);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 15px var(--spark-primary-glow);
  white-space: nowrap;
}

.inline-promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 85, 0, 0.6);
  color: #fff;
}

/* 警示与信息卡片 */
.callout-box {
  background: rgba(15, 23, 42, 0.85);
  border-left: 4px solid var(--spark-cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 14.5px;
  color: var(--text-main);
}

.callout-box.warning {
  border-left-color: var(--spark-gold);
  background: rgba(30, 25, 10, 0.6);
}

/* 表格样式 */
.article-table-wrap {
  overflow-x: auto;
  margin: 26px 0;
}

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

.article-table th {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-pure);
  padding: 12px 16px;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
}

.article-table td {
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.article-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* 代码与配置块 */
.code-block {
  background: #05070e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: "Fira Code", monospace, "Consolas";
  font-size: 13.5px;
  color: #7dd3fc;
  overflow-x: auto;
  margin: 22px 0;
}

/* 文章底部内部链接与标签 */
.article-footer-tags {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tag-label {
  font-size: 13px;
  color: var(--text-dim);
}

.tag-item {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: var(--transition);
}

.tag-item:hover {
  background: rgba(255, 85, 0, 0.15);
  border-color: var(--spark-primary);
  color: #ff9e66;
}

/* 矩阵推荐阅读区块 */
.related-posts-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
}

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

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

.related-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: var(--transition);
}

.related-card:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-3px);
}

.related-card h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 8px;
  line-height: 1.4;
}

.related-card p {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 0;
  line-height: 1.5;
}

/* ==========================================================================
   侧边栏 Sticky 转化小部件 (Sidebar CTA)
   ========================================================================== */
.article-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.widget-promo {
  background: linear-gradient(180deg, rgba(20, 27, 50, 0.9) 0%, rgba(13, 18, 35, 0.9) 100%);
  border: 1px solid rgba(255, 85, 0, 0.35);
  text-align: center;
}

.widget-promo-icon {
  font-size: 38px;
  margin-bottom: 12px;
}

.widget-promo h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-pure);
  margin-bottom: 8px;
}

.widget-promo p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.widget-promo-price {
  font-size: 32px;
  font-weight: 900;
  color: var(--spark-primary);
  margin-bottom: 18px;
  font-family: monospace;
}

.widget-promo-price span {
  font-size: 14px;
  color: var(--text-dim);
}

.widget-btn {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--spark-primary), #ff007a);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 4px 18px var(--spark-primary-glow);
  text-align: center;
  transition: var(--transition);
}

.widget-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 85, 0, 0.6);
  color: #fff;
}

/* 目录 Widget */
.widget-toc h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.toc-list {
  list-style: none;
}

.toc-list li {
  margin-bottom: 10px;
}

.toc-list a {
  font-size: 13.5px;
  color: var(--text-muted);
  display: block;
  padding: 4px 0;
  transition: var(--transition);
}

.toc-list a:hover {
  color: var(--spark-cyan);
  padding-left: 6px;
}

/* 响应式 */
@media (max-width: 990px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .article-main-box {
    padding: 26px 18px;
  }
  .article-title-main {
    font-size: 24px;
  }
  .article-content {
    font-size: 15px;
  }
  .inline-promo-box {
    flex-direction: column;
    text-align: center;
  }
}
