/* 样式表引入 */
@import url('./variables.css');
@import url('./header.css');
@import url('./footer.css');
@import url('./modal.css');
@import url('./pages.css');
@import url('./auth.css');

/* Pure CSS 基础覆盖和全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family-base);
  color: var(--text-primary);
  background-color: var(--bg-white);
  line-height: 1.6;
  font-size: var(--font-size-base);
  padding-top: 80px;
}

/* 标题样式 */
h1 {
  font-size: var(--font-size-3xl);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--spacing-lg);
}

h2 {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

h4, h5, h6 {
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
}

/* 链接样式 */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* 列表样式 */
ul, ol {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

li {
  margin-bottom: var(--spacing-sm);
}

/* 按钮样式 */
button, .btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--font-size-base);
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-white);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-gray);
  text-decoration: none;
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--text-white);
}

.btn-accent:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--text-white);
  text-decoration: none;
}

/* 容器样式 */
.container {
  width: 100%;
  max-width: var(--max-width-container);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-sm {
  max-width: var(--max-width-sm);
}

.container-md {
  max-width: var(--max-width-md);
}

.container-lg {
  max-width: var(--max-width-lg);
}

/* 栅格系统 */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: calc(var(--spacing-md) * -1);
}

.col {
  flex: 1 1 100%;
  padding: var(--spacing-md);
}

.col-1 { flex-basis: 8.333%; max-width: 8.333%; }
.col-2 { flex-basis: 16.666%; max-width: 16.666%; }
.col-3 { flex-basis: 25%; max-width: 25%; }
.col-4 { flex-basis: 33.333%; max-width: 33.333%; }
.col-5 { flex-basis: 41.666%; max-width: 41.666%; }
.col-6 { flex-basis: 50%; max-width: 50%; }
.col-7 { flex-basis: 58.333%; max-width: 58.333%; }
.col-8 { flex-basis: 66.666%; max-width: 66.666%; }
.col-9 { flex-basis: 75%; max-width: 75%; }
.col-10 { flex-basis: 83.333%; max-width: 83.333%; }
.col-11 { flex-basis: 91.666%; max-width: 91.666%; }
.col-12 { flex-basis: 100%; max-width: 100%; }

/* 响应式设计 */
@media (max-width: 768px) {
  h1 { font-size: var(--font-size-2xl); }
  h2 { font-size: var(--font-size-xl); }
  
  .col {
    flex: 1 1 50%;
  }
  
  .col-md-1 { flex-basis: 8.333%; max-width: 8.333%; }
  .col-md-2 { flex-basis: 16.666%; max-width: 16.666%; }
  .col-md-3 { flex-basis: 25%; max-width: 25%; }
  .col-md-4 { flex-basis: 33.333%; max-width: 33.333%; }
  .col-md-5 { flex-basis: 41.666%; max-width: 41.666%; }
  .col-md-6 { flex-basis: 50%; max-width: 50%; }
  .col-md-7 { flex-basis: 58.333%; max-width: 58.333%; }
  .col-md-8 { flex-basis: 66.666%; max-width: 66.666%; }
  .col-md-9 { flex-basis: 75%; max-width: 75%; }
  .col-md-10 { flex-basis: 83.333%; max-width: 83.333%; }
  .col-md-11 { flex-basis: 91.666%; max-width: 91.666%; }
  .col-md-12 { flex-basis: 100%; max-width: 100%; }
}

@media (max-width: 576px) {
  .col {
    flex: 1 1 100%;
  }
  
  .col-sm-1 { flex-basis: 8.333%; max-width: 8.333%; }
  .col-sm-2 { flex-basis: 16.666%; max-width: 16.666%; }
  .col-sm-3 { flex-basis: 25%; max-width: 25%; }
  .col-sm-4 { flex-basis: 33.333%; max-width: 33.333%; }
  .col-sm-5 { flex-basis: 41.666%; max-width: 41.666%; }
  .col-sm-6 { flex-basis: 50%; max-width: 50%; }
  .col-sm-7 { flex-basis: 58.333%; max-width: 58.333%; }
  .col-sm-8 { flex-basis: 66.666%; max-width: 66.666%; }
  .col-sm-9 { flex-basis: 75%; max-width: 75%; }
  .col-sm-10 { flex-basis: 83.333%; max-width: 83.333%; }
  .col-sm-11 { flex-basis: 91.666%; max-width: 91.666%; }
  .col-sm-12 { flex-basis: 100%; max-width: 100%; }
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mt-2xl { margin-top: var(--spacing-2xl); }
.mt-3xl { margin-top: var(--spacing-3xl); }

.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }
.mb-2xl { margin-bottom: var(--spacing-2xl); }
.mb-3xl { margin-bottom: var(--spacing-3xl); }

.p-xs { padding: var(--spacing-xs); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

.hidden { display: none; }
.visible { display: block; }

.no-margin { margin: 0; }
.no-padding { padding: 0; }
