/* 整体布局样式 */

/* 重置默认样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 基础样式 */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--background-color);
  padding-top: 80px; /* 为固定导航栏留出空间 */
}

/* 容器最大宽度设置 */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-right: auto;
  margin-left: auto;
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

/* 桌面端布局 - 最大宽度1200px，居中显示 */
@media screen and (min-width: 1200px) {
  .container {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
  }

  body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100vh;
  }

  header {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  main, footer {
    width: 100%;
    max-width: var(--container-max-width);
  }
}

/* 响应式容器间距调整 */
@media screen and (max-width: 767px) {
  .container {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
  }
  
  body {
    padding-top: 70px; /* 移动端导航栏高度可能稍小 */
  }
}

/* 内容区域样式 */
main {
  flex: 1 0 auto;
  width: 100%;
}

footer {
  width: 100%;
  padding: var(--spacing-lg) 0;
  background-color: var(--surface-color);
  text-align: center;
  color: var(--text-secondary);
  margin-top: var(--spacing-xxl);
}

/* 视觉层次样式 */
h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

/* 语义化HTML标签样式 */
header {
  width: 100%;
}

section {
  padding: var(--spacing-xxl) 0;
  width: 100%;
}

/* 辅助文本样式 */
.text-muted {
  color: var(--text-secondary) !important;
}

.text-primary-color {
  color: var(--primary-color) !important;
}

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

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* 垂直间距 */
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }
.mt-6 { margin-top: var(--spacing-xxl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }
.mb-6 { margin-bottom: var(--spacing-xxl); }

/* 最小触摸目标 - 确保所有交互元素在移动设备上易于点击（最小44px） */
.touch-target {
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}