/* 手冲咖啡 - 手册风格样式 */

/* CSS 变量 */
:root {
  --accent-color: #009688;
  --accent-hover: #00796b;
  --accent-light: #e0f2f1;
  --text-primary: #333;
  --text-secondary: #666;
  --bg-light: #f5f5f5;
  --border-color: #e0e0e0;
  --white: #fff;
  --warning: #ff9800;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 8px;
  --container-width: 1200px;
}

/* 基础重置 */
* {
  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: var(--text-primary);
  background: var(--bg-light);
}

a {
  text-decoration: none;
  color: var(--accent-color);
  transition: color 0.3s;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

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

/* Header 页头 */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color);
}

.logo span {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.search-box {
  display: flex;
  gap: 10px;
}

.search-input {
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  width: 250px;
  font-size: 14px;
}

.search-btn {
  padding: 10px 20px;
  background: var(--accent-color);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s;
}

.search-btn:hover {
  background: var(--accent-hover);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.hero-title {
  font-size: 36px;
  margin-bottom: 15px;
}

.hero-subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 30px;
}

.hero-search {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}

.hero-search input {
  flex: 1;
  padding: 15px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
}

.hero-search button {
  padding: 15px 30px;
  background: var(--white);
  color: var(--accent-color);
  border: none;
  border-radius: var(--radius);
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
}

/* 分类标签 */
.categories-section {
  padding: 40px 0;
  background: var(--white);
}

.section-title {
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-primary);
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.category-tag {
  padding: 10px 20px;
  background: var(--bg-light);
  border-radius: 20px;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.category-tag:hover {
  background: var(--accent-color);
  color: var(--white);
  transform: translateY(-2px);
}

/* 手册卡片列表 */
.manuals-section {
  padding: 40px 0;
}

.manuals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.manual-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border-left: 4px solid var(--accent-color);
}

.manual-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.manual-title {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.manual-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.5;
}

.manual-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.manual-category {
  background: var(--accent-light);
  color: var(--accent-color);
  padding: 4px 10px;
  border-radius: 4px;
}

.manual-pages {
  color: var(--text-secondary);
}

/* 统计信息 */
.stats-section {
  padding: 30px 0;
  background: var(--white);
  border-top: 1px solid var(--border-color);
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 60px;
  text-align: center;
}

.stat-item h3 {
  font-size: 32px;
  color: var(--accent-color);
  margin-bottom: 5px;
}

.stat-item p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* 文章推荐区 */
.articles-section {
  padding: 40px 0;
  background: var(--white);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.article-column h4 {
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
}

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

.article-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-light);
}

.article-list li a {
  color: var(--text-secondary);
  font-size: 14px;
  display: block;
  transition: color 0.3s;
}

.article-list li a:hover {
  color: var(--accent-color);
}

/* 面包屑 */
.breadcrumb {
  padding: 20px 0;
  background: var(--bg-light);
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  gap: 10px;
  font-size: 14px;
}

.breadcrumb-list a {
  color: var(--text-secondary);
}

.breadcrumb-list li:after {
  content: '>';
  margin-left: 10px;
  color: var(--text-secondary);
}

.breadcrumb-list li:last-child:after {
  content: '';
}

/* 分类页标题 */
.category-header {
  padding: 40px 0;
  text-align: center;
  background: var(--white);
}

.category-title {
  font-size: 32px;
  margin-bottom: 10px;
}

.category-count {
  color: var(--text-secondary);
  font-size: 16px;
}

.subcategories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

.subcategory-tag {
  padding: 8px 16px;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* 手册列表 */
.manuals-list-section {
  padding: 40px 0;
  background: var(--white);
}

.manuals-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.manual-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--radius);
  transition: all 0.3s;
  border-left: 4px solid var(--accent-color);
}

.manual-list-item:hover {
  background: var(--white);
  box-shadow: var(--shadow);
}

.manual-list-info h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.manual-list-info p {
  color: var(--text-secondary);
  font-size: 14px;
}

.manual-list-meta {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 5px;
}

.manual-list-actions {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  display: inline-block;
}

.btn-primary {
  background: var(--accent-color);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--border-color);
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  padding: 10px 15px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
}

.pagination a:hover,
.pagination .active {
  background: var(--accent-color);
  color: var(--white);
  border-color: var(--accent-color);
}

/* 文章详情页 */
.article-detail {
  padding: 40px 0;
  background: var(--white);
}

.article-header {
  text-align: center;
  margin-bottom: 40px;
}

.article-title {
  font-size: 36px;
  margin-bottom: 15px;
}

.article-meta {
  color: var(--text-secondary);
  font-size: 14px;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 24px;
  margin: 30px 0 15px;
  color: var(--accent-color);
}

.article-content h3 {
  font-size: 20px;
  margin: 25px 0 12px;
}

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

.article-content ul,
.article-content ol {
  margin-left: 25px;
  margin-bottom: 20px;
}

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

.article-content code {
  background: var(--accent-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--accent-color);
}

.article-content pre {
  background: var(--bg-light);
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 20px 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

/* 步骤说明 */
.step-box {
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  border-left: 4px solid var(--accent-color);
}

.step-box h4 {
  color: var(--accent-color);
  margin-bottom: 10px;
}

/* 快速链接 */
.quick-links {
  background: var(--bg-light);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 30px;
}

.quick-links h4 {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--accent-color);
}

.quick-links ul {
  list-style: none;
  margin: 0;
}

.quick-links li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.quick-links li:last-child {
  border-bottom: none;
}

/* 导航 */
.article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
}

.article-nav a {
  color: var(--accent-color);
  font-weight: 500;
}

/* 404 页面 */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-content h1 {
  font-size: 120px;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.error-content h2 {
  font-size: 32px;
  margin-bottom: 15px;
}

.error-content p {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 30px;
}

/* Footer 页脚 */
.footer {
  background: var(--text-primary);
  color: var(--white);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--white);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 10px;
}

.footer-section a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.footer-section a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 15px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .search-box {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-search {
    flex-direction: column;
  }

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

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

  .stats-grid {
    flex-direction: column;
    gap: 30px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .manual-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .manual-list-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .article-content {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 40px 0;
  }

  .hero-title {
    font-size: 24px;
  }

  .category-tags {
    flex-direction: column;
  }

  .category-tag {
    text-align: center;
  }

  .article-title {
    font-size: 28px;
  }
}
