/* 文章页面全局样式 */
:root {
  --primary: #1e3a8a;
  --primary-light: #3b82f6;
  --primary-dark: #0f1f4d;
  --secondary: #0ea5e9;
  --accent: #8b5cf6;
  --neon-purple: #c084fc;
  --neon-blue: #60a5fa;
  --neon-pink: #ec4899;
  --light: #f3f4f6;
  --dark: #0f172a;
  --gray: #94a3b8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
}

/* 文章头部样式 */
.article-header {
  padding: 180px 0 80px;
  text-align: center;
  background: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9)), 
              url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"%3E%3Crect width="100" height="100" fill="%231e293b"/%3E%3Cpath d="M0,0 L100,100 M100,0 L0,100" stroke="%231e3a8a" stroke-width="1"/%3E%3C/svg%3E');
  margin-bottom: 40px;
}

.article-header h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.3;
  font-family: '黑体', sans-serif;
}

.article-tag {
  display: inline-block;
  padding: 6px 15px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--neon-blue);
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-top: 30px;
  color: var(--gray);
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.article-meta-item i {
  color: var(--neon-blue);
}

/* 文章内容区域 */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 60px;
  font-family: '黑体', sans-serif;
  line-height: 1.8;
  color: var(--light);
}

.article-content p {
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.article-content h2 {
  font-size: 2rem;
  margin: 50px 0 25px;
  color: var(--neon-blue);
  position: relative;
  padding-bottom: 15px;
  font-family: '黑体', sans-serif;
}

.article-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--neon-blue);
  border-radius: 2px;
}

.article-content h3 {
  font-size: 1.5rem;
  margin: 40px 0 20px;
  color: var(--neon-purple);
  font-family: '黑体', sans-serif;
}

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

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

.article-content blockquote {
  border-left: 4px solid var(--neon-blue);
  padding: 20px;
  margin: 30px 0;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.article-content pre {
  background: rgba(15, 23, 42, 0.8);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 30px 0;
  border: 1px solid rgba(96, 165, 250, 0.2);
  font-family: 'Courier New', monospace;
}

.article-content code {
  font-family: 'Courier New', monospace;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.article-image {
  margin: 40px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
}

.image-caption {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--gray);
  font-style: italic;
}

/* 作者信息 */
.article-author {
  display: flex;
  align-items: center;
  gap: 30px;
  background: rgba(30, 41, 59, 0.5);
  padding: 30px;
  border-radius: 12px;
  margin: 60px 0;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.author-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--neon-blue);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}

.author-info h4 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--neon-blue);
  font-family: '黑体', sans-serif;
}

.author-info p {
  margin-bottom: 15px;
  color: var(--gray);
}

.author-social {
  display: flex;
  gap: 15px;
}

.author-social a {
  color: var(--neon-blue);
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.author-social a:hover {
  color: var(--neon-purple);
}

/* 相关文章 */
.related-articles {
  padding: 60px 0;
  border-top: 1px solid rgba(96, 165, 250, 0.1);
  border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 40px;
  text-align: center;
  color: var(--neon-blue);
  position: relative;
  font-family: '黑体', sans-serif;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--neon-blue);
  border-radius: 2px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.related-card {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  border-color: var(--neon-blue);
}

.related-card-image {
  height: 180px;
  overflow: hidden;
}

.related-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-card:hover .related-card-image img {
  transform: scale(1.05);
}

.related-card-content {
  padding: 20px;
}

.related-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  font-family: '黑体', sans-serif;
}

.related-card p {
  margin-bottom: 20px;
  color: var(--gray);
  font-size: 0.95rem;
}

.related-card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--gray);
  font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .article-header h1 {
    font-size: 2.2rem;
  }
  
  .article-meta {
    flex-direction: column;
    gap: 15px;
  }
  
  .article-author {
    flex-direction: column;
    text-align: center;
  }
  
  .author-avatar {
    margin-bottom: 20px;
  }
  
  .author-info {
    text-align: center;
  }
  
  .author-social {
    justify-content: center;
  }
}

/* 粒子效果容器 */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

/* 文章图片限制样式 */
.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 大图限制（适合内容宽度） */
.article-image {
  max-width: 800px;
  margin: 40px auto;
}

/* 中等图片限制 */
.article-content img:not(.article-image) {
  max-width: 600px;
}

/* 小图片限制（如表情/图标） */
.article-content img[width*="100"], 
.article-content img[style*="width:100%"] {
  max-width: 300px !important;
}

/* 代码片段中的图片限制 */
.article-content pre img {
  max-width: 100%;
  height: auto;
  margin: 0;
  border-radius: 4px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .article-image {
    max-width: 100%;
    margin: 30px auto;
    border-radius: 6px;
  }
  
  .article-content img:not(.article-image) {
    max-width: 100%;
    padding: 0 15px;
  }
}

/* 保持原有图片悬浮效果 */
.article-content img:hover {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}