/* ========================================
   专业运动服装 - 术语表风格样式
   www.jiashenfu.cn
   ======================================== */

/* CSS 变量 */
:root {
  --accent-color: #795548;
  --accent-light: #a1887f;
  --accent-dark: #5d4037;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #fafafa;
  --bg-card: #fff;
  --border-color: #e0e0e0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --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: var(--bg-secondary);
}

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

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

ul {
  list-style: none;
}

/* ========================================
   页头 Header
   ======================================== */
.header {
  background: var(--bg-primary);
  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: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.logo span {
  color: var(--text-secondary);
  font-weight: 400;
}

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

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

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  gap: 8px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 180px;
  font-size: 0.9rem;
}

.search-box button {
  border: none;
  background: var(--accent-color);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.search-box button:hover {
  background: var(--accent-dark);
}

/* ========================================
   面包屑 Breadcrumb
   ======================================== */
.breadcrumb {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}

.breadcrumb-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

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

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

/* ========================================
   Hero 区域
   ======================================== */
.hero {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
}

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

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

/* ========================================
   A-Z 字母导航
   ======================================== */
.az-nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  position: sticky;
  top: var(--header-height);
  z-index: 90;
}

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

.az-nav-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.az-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.az-nav-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.az-nav-list a:hover,
.az-nav-list a.active {
  background: var(--accent-color);
  color: #fff;
}

/* ========================================
   主内容区域
   ======================================== */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px;
}

.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;
}

/* ========================================
   术语卡片 Definition Card
   ======================================== */
.definitions-grid {
  display: grid;
  gap: 20px;
}

.definition-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.definition-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.definition-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.definition-category {
  font-size: 0.75rem;
  color: var(--accent-color);
  background: rgba(121, 85, 72, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.definition-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

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

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

/* ========================================
   文章列表 Article List
   ======================================== */
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.content-column {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.column-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  color: var(--text-primary);
}

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

.article-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.article-number {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.article-item:nth-child(1) .article-number,
.article-item:nth-child(2) .article-number,
.article-item:nth-child(3) .article-number {
  background: var(--accent-color);
  color: #fff;
}

.article-title {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-title:hover {
  color: var(--accent-color);
}

/* ========================================
   分类页面样式
   ======================================== */
.category-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 32px 20px;
  text-align: center;
}

.category-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.category-header p {
  color: var(--text-secondary);
}

.letter-section {
  margin-bottom: 40px;
}

.letter-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

/* ========================================
   文章详情页样式
   ======================================== */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.3;
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.8rem;
  color: var(--accent-color);
  background: rgba(121, 85, 72, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

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

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 32px 0 16px;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text-primary);
}

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

.article-content ul {
  margin-bottom: 16px;
  padding-left: 24px;
  list-style: disc;
}

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

/* 相关术语 */
.related-terms {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.related-terms h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.related-terms-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.related-term {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.related-term:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

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

.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;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.error-desc {
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 400px;
}

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

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

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

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

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

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

/* ========================================
   页脚 Footer
   ======================================== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 40px 20px;
  margin-top: 60px;
}

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

.footer-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 16px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 20px;
}

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

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

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .nav {
    order: 3;
    width: 100%;
    gap: 20px;
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
  }

  .search-box {
    flex: 1;
    max-width: 200px;
  }

  .search-box input {
    width: 100%;
  }

  .hero {
    padding: 40px 16px;
  }

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

  .az-nav {
    top: 104px;
    padding: 16px 0;
  }

  .az-nav-list {
    gap: 6px;
  }

  .az-nav-list a {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .main {
    padding: 24px 16px;
  }

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

  .definition-card {
    padding: 20px;
  }

  .article-container {
    padding: 24px;
  }

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

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

  .footer-nav {
    flex-wrap: wrap;
    gap: 16px 24px;
  }
}

@media (max-width: 480px) {
  .definition-header {
    flex-direction: column;
    gap: 8px;
  }

  .definition-category {
    align-self: flex-start;
  }

  .error-actions {
    flex-direction: column;
    width: 100%;
    padding: 0 20px;
  }

  .btn {
    justify-content: center;
  }
}
