/* 洞穴探险 - 极简博客风格 */
/* 查询关键词: 洞穴探险 www.tandongjiqiao.cn 专注于洞穴探险的摄影技巧 安全知识 生态保护及专业培训 */

/* CSS 变量 */
:root {
  --accent-color: #333333;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --border-color: #e5e5e5;
  --link-color: #2c5aa0;
  --link-hover: #1a3a6e;
  --max-width: 680px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

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 {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header 样式 */
.header {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 3rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent-color);
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
}

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

/* 搜索框 */
.search-form {
  display: flex;
  align-items: center;
}

.search-input {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.875rem;
  width: 180px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--accent-color);
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* Main 内容区 */
.main {
  min-height: 50vh;
  margin-bottom: 4rem;
}

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

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

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

/* 区块标题 */
.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

/* 内容列表 */
.content-list {
  list-style: none;
}

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

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

.content-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

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

.content-title a:hover {
  color: var(--link-color);
  text-decoration: none;
}

.content-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.content-excerpt {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 精选内容 */
.featured-list {
  margin-bottom: 3rem;
}

.featured-item {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

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

.featured-item .content-title {
  font-size: 1.125rem;
}

/* 侧边内容区 */
.sidebar-section {
  margin-top: 3rem;
}

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

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

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

.sidebar-item a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.sidebar-item a:hover {
  color: var(--text-primary);
}

/* 分类页 */
.category-header {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.category-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.75rem;
}

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

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pagination a:hover {
  background: var(--bg-secondary);
  text-decoration: none;
}

.pagination .current {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* 文章页 */
.article-header {
  text-align: center;
  margin-bottom: 2rem;
}

.article-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 1rem;
  line-height: 1.3;
}

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

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

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

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

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

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

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: var(--accent-color);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--accent-color);
}

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

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

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

.article-tags {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.tag:hover {
  background: var(--border-color);
  text-decoration: none;
  color: var(--text-primary);
}

/* 相关文章 */
.related-articles {
  margin-top: 3rem;
}

.related-grid {
  display: grid;
  gap: 1.5rem;
}

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

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

.related-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.related-title {
  font-size: 1rem;
  font-weight: 500;
}

.related-title a {
  color: var(--text-primary);
}

/* 404 页面 */
.error-page {
  text-align: center;
  padding: 5rem 0;
}

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

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.error-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent-color);
  color: white;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn:hover {
  background: #555;
  text-decoration: none;
  color: white;
}

/* Footer 样式 */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-primary);
}

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

  .header-inner {
    flex-direction: column;
    text-align: center;
  }

  .nav {
    gap: 1rem;
  }

  .search-input {
    width: 200px;
  }

  .hero {
    padding: 2rem 0;
  }

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

  .hero-desc {
    font-size: 1rem;
  }

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

  .article-body {
    font-size: 1rem;
  }

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

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

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

  .content-title {
    font-size: 1.125rem;
  }
}
