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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #f0f2f5;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Header */
.header {
  background: linear-gradient(135deg, #0052d9, #0073e6);
  padding: 16px 0;
  box-shadow: 0 2px 8px rgba(0, 82, 217, 0.3);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  gap: 8px;
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
}

.logo-divider {
  opacity: 0.5;
  font-weight: 300;
}

.logo-sub {
  font-size: 16px;
  font-weight: 400;
  opacity: 0.9;
}

/* Hero */
.hero {
  text-align: center;
  padding: 48px 0 32px;
}

.hero h1 {
  font-size: 32px;
  color: #1a1a2e;
  margin-bottom: 12px;
  font-weight: 700;
}

.hero-desc {
  font-size: 16px;
  color: #666;
}

/* Article Grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
  padding-bottom: 40px;
}

.article-card {
  background: #fff;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 82, 217, 0.12);
}

.article-card-body {
  padding: 24px;
}

.article-category {
  display: inline-block;
  background: #e8f3ff;
  color: #0052d9;
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}

.article-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-summary {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #999;
}

/* Article Detail */
.article-detail {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  margin: 24px 0 40px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.article-detail-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eee;
}

.article-detail-header h1 {
  font-size: 28px;
  color: #1a1a2e;
  margin: 12px 0 16px;
  line-height: 1.4;
}

.article-content {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

.article-content h2 {
  font-size: 22px;
  color: #1a1a2e;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8f3ff;
}

.article-content h3 {
  font-size: 18px;
  color: #1a1a2e;
  margin: 24px 0 12px;
}

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

.article-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  color: #d63384;
}

.article-content pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.article-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

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

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

.article-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

/* Back Link */
.back-link {
  display: inline-block;
  color: #0052d9;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 16px;
}

.back-link:hover {
  text-decoration: underline;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 24px 0 48px;
}

.page-btn {
  display: inline-block;
  padding: 8px 20px;
  background: #0052d9;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}

.page-btn:hover {
  background: #003cab;
}

.page-info {
  font-size: 14px;
  color: #666;
}

/* Alert & Empty */
.alert {
  background: #fff3cd;
  color: #856404;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.empty {
  text-align: center;
  padding: 80px 0;
  color: #999;
}

.empty h2 {
  font-size: 24px;
  color: #666;
  margin-bottom: 12px;
}

/* Footer */
.footer {
  margin-top: auto;
  background: #1a1a2e;
  color: #999;
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 24px;
  }
  .article-detail {
    padding: 24px 16px;
  }
  .article-detail-header h1 {
    font-size: 22px;
  }
}
