/* ==========================================
   文章详情页面样式 - article-detail.css
   ========================================== */

/* ==========================================
   Banner区域样式
   ========================================== */
.article-detail-banner {
  margin-top: 76px;
  padding: 4rem 0 3rem;
  background-color: #fafafa;
  position: relative;
  overflow: hidden;
}

.article-detail-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.article-detail-header {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.article-detail-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.article-detail-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.article-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #6b7280;
}

.article-detail-meta-item i {
  color: #6366f1;
}

.article-detail-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: #6366f1;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 20px;
}

/* ==========================================
   文章内容区域
   ========================================== */
.article-detail-content {
  padding: 4rem 0;
  background-color: #fff;
}

.article-container {
  max-width: 900px;
  margin: 0 auto;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #374151;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  color: #1a1a1a;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-body h2 {
  font-size: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.article-body h3 {
  font-size: 1.5rem;
  color: #6366f1;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article-body li {
  margin-bottom: 0.75rem;
  line-height: 1.8;
}

.article-body strong {
  color: #1a1a1a;
  font-weight: 700;
}

.article-body code {
  background: #f3f4f6;
  color: #6366f1;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Consolas', 'Monaco', monospace;
}

.article-body pre {
  background: #1a1a1a;
  color: #f3f4f6;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-body blockquote {
  border-left: 4px solid #6366f1;
  background: #fafafa;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
  margin-bottom: 0;
  color: #6b7280;
  font-style: italic;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-body a {
  color: #6366f1;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.article-body a:hover {
  border-bottom-color: #6366f1;
}

.article-body hr {
  border: none;
  height: 2px;
  background: linear-gradient(to right, transparent, #e5e7eb, transparent);
  margin: 3rem 0;
}

/* 文件下载卡片 */
.download-card {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.download-card-icon {
  width: 64px;
  height: 64px;
  background: #6366f1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
  flex-shrink: 0;
}

.download-card-content {
  flex: 1;
}

.download-card-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.download-card-content p {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 0;
}

.download-card-btn {
  padding: 0.75rem 1.5rem;
  background: #1a1a1a;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}

.download-card-btn:hover {
  background: #6366f1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 代码块特殊样式 */
.code-block-wrapper {
  position: relative;
  margin: 2rem 0;
}

.code-block-header {
  background: #2d2d2d;
  color: #f3f4f6;
  padding: 0.75rem 1.5rem;
  border-radius: 8px 8px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-block-header code {
  background: transparent;
  color: inherit;
}

/* ==========================================
   文章底部区域
   ========================================== */
.article-detail-footer {
  padding: 3rem 0;
  background-color: #fafafa;
  border-top: 1px solid #e5e7eb;
}

.article-tags-section {
  max-width: 900px;
  margin: 0 auto 2rem;
}

.article-tags-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.article-tags-list {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.article-tag-item {
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #6b7280;
  transition: all 0.3s ease;
}

.article-tag-item:hover {
  border-color: #6366f1;
  color: #6366f1;
}

.article-navigation {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.article-nav-item {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.article-nav-item:hover {
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.article-nav-label {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-nav-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
}

/* ==========================================
   响应式设计
   ========================================== */
@media (max-width: 768px) {
  .article-detail-banner {
    padding: 3rem 0 2rem;
  }
  
  .article-detail-content {
    padding: 3rem 0;
  }
  
  .article-detail-meta {
    gap: 1rem;
  }
  
  .download-card {
    flex-direction: column;
    text-align: center;
  }
  
  .article-navigation {
    grid-template-columns: 1fr;
  }
}
