/* 消费级无人机 - 极简阅读风格样式 */

/* CSS 变量 */
:root {
  --accent-color: #212121;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --border-color: #e8e8e8;
  --link-color: #212121;
  --link-hover: #000;
  --max-width: 800px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --border-color: #3a3a3a;
    --link-color: #e0e0e0;
    --link-hover: #fff;
  }
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  line-height: 1.8;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 链接样式 */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* 图片 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 容器 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 页面头部 */
.site-header {
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 3rem;
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title a:hover {
  text-decoration: none;
}

.site-description {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Hero 区域 */
.hero {
  padding: 4rem 0;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* 特色文章 */
.featured-section {
  padding: 2rem 0;
}

.featured-item {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.featured-item:last-child {
  margin-bottom: 0;
}

.featured-item h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.featured-item h3 a {
  color: var(--text-primary);
}

.featured-item h3 a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.featured-item p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.featured-meta {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* 文章列表 */
.article-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

.article-list {
  list-style: none;
}

.article-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color);
}

.article-item:last-child {
  border-bottom: none;
}

.article-item h4 {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.article-item h4 a {
  color: var(--text-primary);
}

.article-item h4 a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* 三栏布局 */
.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
}

.column h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.column ul {
  list-style: none;
}

.column li {
  padding: 0.5rem 0;
  font-size: 0.9375rem;
}

.column li a {
  color: var(--text-secondary);
}

.column li a:hover {
  color: var(--text-primary);
}

/* 分类页样式 */
.category-header {
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.category-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.category-desc {
  color: var(--text-secondary);
  font-size: 1rem;
}

.content-list {
  padding: 2rem 0;
}

.content-item {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
}

.content-item:hover {
  transform: translateX(4px);
}

.content-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.content-item h3 a {
  color: var(--text-primary);
}

.content-item h3 a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.content-item p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* 文章页样式 */
.article-header {
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.article-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.article-info {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.article-info span {
  margin: 0 0.5rem;
}

.article-featured-image {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
}

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

.article-content {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

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

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

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

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content img {
  margin: 1.5rem 0;
  border-radius: 8px;
}

/* 推荐文章区域 */
.recommended-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.recommended-item {
  text-align: center;
}

.recommended-item a {
  display: block;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 6px;
  color: var(--text-primary);
  font-weight: 500;
}

.recommended-item a:hover {
  background: var(--border-color);
  text-decoration: none;
}

/* 两栏布局 */
.two-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* 404页面 */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.error-code {
  font-size: 6rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.error-message {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 400px;
}

.error-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent-color);
  color: #fff;
  border-radius: 6px;
  font-weight: 500;
}

.error-link:hover {
  background: #000;
  text-decoration: none;
  color: #fff;
}

/* 页脚 */
.site-footer {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .hero-title {
    font-size: 1.875rem;
  }

  .article-title {
    font-size: 1.75rem;
  }

  .three-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .two-columns {
    grid-template-columns: 1fr;
  }

  .recommended-grid {
    grid-template-columns: 1fr;
  }

  .featured-item {
    padding: 1.5rem;
  }

  .site-header {
    padding: 2rem 0 1.5rem;
  }

  .error-code {
    font-size: 4rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 2.5rem 0;
  }

  .hero-title {
    font-size: 1.625rem;
  }

  .article-content h2 {
    font-size: 1.5rem;
  }

  .article-content h3 {
    font-size: 1.25rem;
  }
}
