/* aipgo.cn 网站样式 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

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

/* 头部 */
.site-header {
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6366f1;
  text-decoration: none;
}

.main-nav a {
  margin-left: 20px;
  color: #666;
  text-decoration: none;
}

.main-nav a:hover {
  color: #6366f1;
}

/* 分类区块 */
.category-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin: 30px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
}

.category-header h2 {
  font-size: 1.5rem;
  color: #333;
}

.category-link {
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
}

/* 文章网格 */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

/* 文章卡片 */
.post-card {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
  border-color: #6366f1;
}

.post-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.post-title a {
  color: #333;
  text-decoration: none;
}

.post-title a:hover {
  color: #6366f1;
}

.post-meta {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.post-excerpt {
  color: #666;
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.read-more {
  display: inline-block;
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid #6366f1;
  border-radius: 6px;
  transition: all 0.2s;
}

.read-more:hover {
  background: #6366f1;
  color: white;
}

/* 文章详情页 */
.post-detail {
  background: white;
  border-radius: 12px;
  padding: 40px;
  margin: 30px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.back-link {
  display: inline-block;
  color: #6366f1;
  text-decoration: none;
  margin-bottom: 24px;
  font-weight: 500;
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid #f0f0f0;
}

.article-header h1 {
  font-size: 2rem;
  margin-bottom: 16px;
  color: #333;
}

.article-meta {
  display: flex;
  gap: 16px;
  color: #666;
  font-size: 0.9rem;
}

.article-content {
  max-width: 800px;
}

.article-body h2 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
  color: #333;
}

.article-body h3 {
  font-size: 1.25rem;
  margin: 24px 0 12px;
  color: #444;
}

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

.article-body pre {
  background: #1a1a2e;
  color: #eee;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
}

.article-body code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
}

.article-body ul, .article-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

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

/* 页脚 */
.site-footer {
  background: white;
  padding: 30px 0;
  margin-top: 40px;
  text-align: center;
  color: #666;
  border-top: 1px solid #e5e7eb;
}

/* 响应式 */
@media (max-width: 768px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
  
  .site-header .container {
    flex-direction: column;
    gap: 16px;
  }
  
  .main-nav a {
    margin: 0 10px;
  }
}
