/* ========================================
   摩托车装备 - 全局样式
   域名: www.motuolvxing.cn
   主题: 摩托车装备介绍 摩托车骑行装备推荐 摩托车防护用品大全
   ======================================== */

/* CSS 变量 */
:root {
  --accent-color: #e65100;
  --primary-dark: #bf360c;
  --primary-light: #ff9800;
  --text-primary: #212121;
  --text-secondary: #757575;
  --text-muted: #9e9e9e;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-dark: #263238;
  --border-color: #e0e0e0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

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

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

ul, ol {
  list-style: none;
}

/* ========================================
   布局容器
   ======================================== */

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

.section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* ========================================
   页头 Header
   ======================================== */

.header {
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

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

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-color);
}

.search-box {
  position: relative;
}

.search-box input {
  width: 240px;
  padding: 8px 16px 8px 40px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.875rem;
  background: var(--bg-secondary);
  transition: all 0.2s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: var(--bg-primary);
}

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
}

/* ========================================
   Banner 横幅
   ======================================== */

.banner {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #37474f 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.banner-content {
  position: relative;
  z-index: 1;
}

.banner-avatar {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-light));
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: var(--shadow-lg);
}

.banner h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.banner p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto 24px;
}

.banner-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 32px;
}

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

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-light);
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
}

/* ========================================
   面包屑导航
   ======================================== */

.breadcrumb {
  background: var(--bg-secondary);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

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

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

/* ========================================
   卡片组件
   ======================================== */

.card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-image {
  width: 100%;
  height: 180px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 3rem;
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.4;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ========================================
   内容网格
   ======================================== */

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ========================================
   文章列表
   ======================================== */

.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.article-item:hover {
  box-shadow: var(--shadow-md);
}

.article-thumb {
  width: 200px;
  height: 140px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
}

.article-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.4;
}

.article-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(230, 81, 0, 0.1);
  color: var(--accent-color);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ========================================
   侧边栏组件
   ======================================== */

.sidebar-section {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

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

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

.sidebar-list .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sidebar-list a:hover .num {
  background: var(--accent-color);
  color: white;
}

/* ========================================
   分类标签
   ======================================== */

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

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.category-tag:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: rgba(230, 81, 0, 0.05);
}

.category-tag .count {
  font-size: 0.75rem;
  padding: 2px 8px;
  background: var(--bg-secondary);
  border-radius: 10px;
}

/* ========================================
   分页
   ======================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

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

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

.pagination .prev,
.pagination .next {
  padding: 0 16px;
}

/* ========================================
   文章内容页
   ======================================== */

.article-header {
  text-align: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 40px;
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.article-header .meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.article-featured-image {
  width: 100%;
  max-width: 800px;
  height: 400px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  margin: 0 auto 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--text-muted);
}

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

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 40px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 16px;
  color: var(--accent-color);
}

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

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

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

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

.article-content strong {
  color: var(--accent-color);
}

/* ========================================
   两栏布局
   ======================================== */

.two-column {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
}

.main-content {
  min-width: 0;
}

.sidebar {
  min-width: 0;
}

/* ========================================
   404 页面
   ======================================== */

.error-page {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-content {
  max-width: 500px;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.8;
}

.error-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}

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

.error-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* ========================================
   按钮
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

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

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

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

/* ========================================
   页脚
   ======================================== */

.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.8);
  padding: 48px 0 24px;
  margin-top: 64px;
}

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

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: white;
}

.footer-brand p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
}

.footer-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: white;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.6);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 1024px) {
  .two-column {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

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

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .header .container {
    flex-wrap: wrap;
  }

  .nav {
    display: none;
  }

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

  .banner {
    padding: 48px 0;
  }

  .banner h1 {
    font-size: 1.75rem;
  }

  .banner-stats {
    gap: 24px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

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

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

  .article-thumb {
    width: 100%;
    height: 200px;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

  .article-featured-image {
    height: 240px;
  }

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

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

@media (max-width: 480px) {
  .section {
    padding: 32px 0;
  }

  .container {
    padding: 0 16px;
  }

  .pagination a,
  .pagination span {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.875rem;
  }
}
