/* base.css - 重置+变量+工具类（全局加载） */

/* ===== CSS变量 ===== */
:root {
  --primary: #2E1A47;
  --secondary: #00BFA5;
  --dark: #1A0F2E;
  --light: #F3F0F7;
  --white: #FFFFFF;
  --text: #333333;
  --text-muted: #666666;
  --border: #D0C8E0;
  --font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --container: 1200px;
  --radius: 6px;
  --shadow: 0 2px 12px rgba(46,26,71,0.12);
}

/* ===== 重置样式 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  color: var(--text);
  background: var(--light);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: var(--secondary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--primary); }
h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.4; color: var(--primary); }
h1 { font-size: 2em; }
h2 { font-size: 1.6em; margin: 1.5em 0 0.8em; }
h3 { font-size: 1.25em; margin: 1.2em 0 0.6em; }
p { margin: 0.8em 0; }
ul, ol { padding-left: 2em; margin: 0.8em 0; }
li { margin: 0.3em 0; }
table { border-collapse: collapse; width: 100%; }
input, textarea, button, select {
  font-family: var(--font-family);
  font-size: 1em;
  outline: none;
}
button { cursor: pointer; border: none; }

/* ===== 工具类 ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.clearfix::after { content: ""; display: table; clear: both; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.gap-3 { gap: 30px; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.pt-1 { padding-top: 10px; }
.pt-2 { padding-top: 20px; }
.pt-3 { padding-top: 30px; }
.pb-1 { padding-bottom: 10px; }
.pb-2 { padding-bottom: 20px; }
.pb-3 { padding-bottom: 30px; }

/* 响应式隐藏 */
@media (max-width: 768px) { .hide-mobile { display: none !important; } }
@media (min-width: 769px) { .hide-pc { display: none !important; } }

/* ===== 通用按钮 ===== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-size: 1em;
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
}
.btn-primary {
  background: var(--secondary);
  color: var(--white);
  border: 2px solid var(--secondary);
}
.btn-primary:hover {
  background: transparent;
  color: var(--secondary);
}
.btn-outline {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}
.btn-outline:hover {
  background: var(--secondary);
  color: var(--white);
}

/* ===== 通用卡片 ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(46,26,71,0.15);
}

/* ===== 通用标签 ===== */
.tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85em;
  background: var(--light);
  color: var(--primary);
  border: 1px solid var(--border);
  margin: 4px;
  transition: all 0.3s;
}
.tag:hover {
  background: var(--primary);
  color: var(--white);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 15px 0;
  font-size: 0.9em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--secondary); }
.breadcrumb span { margin: 0 8px; color: var(--border); }

/* ===== 分页 ===== */
.pagination { text-align: center; padding: 30px 0; }
.pagination a, .pagination span {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.3s;
}
.pagination a:hover, .pagination .current {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}

/* ===== 返回顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  background: var(--secondary);
  color: var(--white);
  border-radius: 50%;
  text-align: center;
  line-height: 48px;
  font-size: 1.2em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,191,165,0.3);
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary); transform: translateY(-3px); }

/* 响应式字号 */
@media (max-width: 768px) {
  html { font-size: 15px; }
  h1 { font-size: 1.6em; }
  h2 { font-size: 1.35em; }
  h3 { font-size: 1.1em; }
}
