/* 摩托车改装 - 全局样式 */
:root {
  --accent-color: #546e7a;
  --primary-color: #37474f;
  --secondary-color: #78909c;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-muted: #757575;
  --border-color: #e0e0e0;
  --link-color: #1565c0;
  --hover-bg: #eceff1;
  --max-width: 1200px;
  --header-height: 64px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

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

a:hover {
  text-decoration: underline;
}

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

/* 页头 */
.header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

.nav {
  display: flex;
  gap: 30px;
}

.nav a {
  color: var(--text-color);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.nav a:hover {
  text-decoration: none;
  border-bottom-color: var(--accent-color);
}

.search-box {
  display: flex;
  align-items: center;
}

.search-box input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  width: 200px;
}

.search-box button {
  padding: 8px 16px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 14px;
}

.search-box button:hover {
  background-color: var(--primary-color);
}

/* 主体内容 */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 20px;
}

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: white;
  padding: 60px 40px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 30px;
}

.hero-keywords {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-keywords span {
  background: rgba(255,255,255,0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
}

/* 特色区块 */
.section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.card-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
}

.card-content {
  padding: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.card-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}

/* 内容列表 */
.content-list {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-item {
  display: flex;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
}

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

.content-item:hover {
  background-color: var(--hover-bg);
}

.content-thumb {
  width: 120px;
  height: 90px;
  background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
  border-radius: 4px;
  flex-shrink: 0;
  margin-right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
}

.content-info {
  flex: 1;
}

.content-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.content-summary {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 10px;
}

.content-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.content-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 三栏布局 */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.sidebar-section {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

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

.sidebar-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.sidebar-list a {
  color: var(--text-color);
  display: block;
  transition: color 0.2s;
}

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

/* 面包屑 */
.breadcrumb {
  background: var(--card-bg);
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

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

.breadcrumb a:hover {
  color: var(--link-color);
}

.breadcrumb span {
  color: var(--text-color);
  font-weight: 500;
}

.breadcrumb .sep {
  margin: 0 10px;
  color: var(--text-muted);
}

/* 分类页头 */
.category-header {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-header h1 {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.category-header p {
  color: var(--text-muted);
  margin-bottom: 15px;
}

.category-stats {
  display: flex;
  gap: 30px;
  font-size: 14px;
  color: var(--text-muted);
}

.category-stats span {
  display: flex;
  align-items: center;
  gap: 5px;
}

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

.pagination a,
.pagination span {
  padding: 10px 16px;
  background: var(--card-bg);
  border-radius: 4px;
  color: var(--text-color);
  font-size: 14px;
  transition: all 0.2s;
}

.pagination a:hover {
  background: var(--accent-color);
  color: white;
  text-decoration: none;
}

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

.pagination .disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

/* 文章页 */
.article-header {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article-title {
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  gap: 25px;
  color: var(--text-muted);
  font-size: 14px;
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-featured-image {
  width: 100%;
  height: 400px;
  background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
  border-radius: 8px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 80px;
}

.article-content {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

.article-content h2 {
  font-size: 24px;
  color: var(--primary-color);
  margin: 30px 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
  font-size: 20px;
  color: var(--primary-color);
  margin: 25px 0 12px;
}

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

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

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

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

/* 相关文章 */
.related-section {
  margin-bottom: 30px;
}

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

.related-card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.related-card-image {
  width: 100%;
  height: 150px;
  background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 40px;
}

.related-card-title {
  padding: 15px;
  font-size: 15px;
  font-weight: 500;
  color: var(--primary-color);
}

/* 404页面 */
.error-page {
  text-align: center;
  padding: 80px 20px;
}

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

.error-title {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.error-desc {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--accent-color);
  color: white;
  border-radius: 4px;
  font-size: 16px;
  transition: background-color 0.2s;
}

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

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

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand h3 {
  font-size: 20px;
  margin-bottom: 15px;
}

.footer-brand p {
  opacity: 0.8;
  font-size: 14px;
  line-height: 1.6;
}

.footer-section h4 {
  font-size: 16px;
  margin-bottom: 15px;
}

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

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

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

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

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

/* 响应式设计 */
@media (max-width: 992px) {
  .three-col {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 15px 20px;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-top: 15px;
    gap: 20px;
    overflow-x: auto;
  }

  .search-box {
    order: 2;
  }

  .search-box input {
    width: 150px;
  }

  .hero {
    padding: 40px 20px;
  }

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

  .hero p {
    font-size: 16px;
  }

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

  .content-item {
    flex-direction: column;
  }

  .content-thumb {
    width: 100%;
    height: 180px;
    margin-right: 0;
    margin-bottom: 15px;
  }

  .article-header {
    padding: 25px;
  }

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

  .article-featured-image {
    height: 250px;
    font-size: 50px;
  }

  .article-content {
    padding: 25px;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .error-code {
    font-size: 80px;
  }
}

@media (max-width: 480px) {
  .hero-keywords {
    gap: 10px;
  }

  .hero-keywords span {
    font-size: 12px;
    padding: 6px 12px;
  }

  .category-stats {
    flex-direction: column;
    gap: 10px;
  }

  .pagination a,
  .pagination span {
    padding: 8px 12px;
    font-size: 13px;
  }
}
