/* 基础样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

/* 网站头部 */
.site-header {
  text-align: center;
  padding: 4rem 0 2rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 3rem;
}

.site-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #111;
}

.subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 0;
}

/* 主要内容 */
.main-content {
  min-height: 60vh;
  margin-bottom: 3rem;
}

/* 搜索和筛选区域 */
.filters-section {
  background: #f8f9fa;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.search-box {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.search-button {
  padding: 0.75rem 1.5rem;
  background: #0066cc;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-button:hover {
  background: #0056b3;
}

.filter-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 500;
  color: #555;
  font-size: 0.9rem;
}

.filter-select {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.clear-button {
  padding: 0.75rem 1rem;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  height: fit-content;
}

.clear-button:hover {
  background: #5a6268;
}

/* 无结果状态 */
.no-results {
  text-align: center;
  padding: 3rem 0;
  color: #666;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.no-results p {
  font-size: 1rem;
}

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

.article-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border-color: #ddd;
}

.article-title {
  margin-bottom: 1rem;
}

.article-title a {
  color: #111;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.article-title a:hover {
  color: #0066cc;
}

.article-description {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #888;
}

/* 标签 */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: #f0f0f0;
  color: #666;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* 文章页面 */
.article-header {
  padding: 2rem 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 2rem;
}

.breadcrumb {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #0066cc;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.article-header .article-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-header .article-meta {
  margin-bottom: 1rem;
  justify-content: flex-start;
  gap: 2rem;
}

/* 文章内容 */
.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 3rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  margin: 2rem 0 1rem 0;
  color: black;
  font-weight: 600;
}

.article-content h1 { font-size: 2.5rem; }
.article-content h2 { font-size: 2rem; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.25rem; }
.article-content h5 { font-size: 1.1rem; }
.article-content h6 { font-size: 1rem; }

.article-content p {
  margin: 1.5rem 0;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-content li {
  margin: 0.5rem 0;
}

.article-content blockquote {
  border-left: 4px solid #ddd;
  margin: 2rem 0;
  padding: 1rem 2rem;
  background: #f9f9f9;
  font-style: italic;
}

.article-content code {
  background: #f4f4f4;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

.article-content pre {
  background: #f8f8f8;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid #e5e5e5;
}

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

.article-content a {
  color: #0066cc;
  text-decoration: none;
}

.article-content a:hover {
  text-decoration: underline;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.article-content th,
.article-content td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
}

.article-content th {
  background: #f9f9f9;
  font-weight: 600;
}

/* 文章页脚 */
.article-footer {
  padding: 2rem 0;
  border-top: 1px solid #eee;
}

.back-link {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

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

/* 网站脚部 */
.site-footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 0.9rem;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 4rem 0;
}

.empty-state h2 {
  font-size: 2rem;
  color: #666;
  margin-bottom: 1rem;
}

.empty-state p {
  color: #888;
  font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .site-header h1 {
    font-size: 2.5rem;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .article-card {
    padding: 1.25rem;
  }
  
  .article-header .article-title {
    font-size: 2rem;
  }
  
  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .article-content {
    font-size: 1rem;
  }
}

