/**
 * @file base.css
 * @description 全局基础样式表（变量定义 + 样式重置 + 通用工具类）
 *              统一管理项目全局变量、重置浏览器默认样式及公共工具类
 * @author oncedrop
 * @update 2026-06-25
 */

/* ========================================================================
   1. 全局变量定义（Global Variables）
   ======================================================================== */
:root {
  /* —— 品牌色（Logo 配色） —— */
  --color-primary: #f78210;       /* 主色 - 橙 */
  --color-secondary: #3e3e3e;     /* 副色 - 深灰 */

  /* —— 文本颜色 —— */
  --color-text: #333;             /* 默认正文颜色 */
  --color-text-light: #999;       /* 辅助文字颜色 */

  /* —— 字体 —— */
  --font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Helvetica Neue", Arial, sans-serif;

  /* —— 布局 —— */
  --container-max-width: 1560px;  /* 全局版心宽度 */

  /* —— 间距（可选扩展） —— */
  --spacing-base: 10px;
}

/* ========================================================================
   2. 样式重置（CSS Reset）
   ======================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 页面整体滚动丝滑效果 */
html {
  scroll-behavior: smooth;
}

html, body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  font-size: 18px;
  line-height: 1.6;
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 72px;
  overflow-wrap: break-word;
  word-break: normal;
}

/* —— 链接 —— */
a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* —— 列表 —— */
ul, ol {
  list-style: none;
}

/* —— 图片 —— */
img {
  max-width: 100%;
  display: block;
  border: 0;
}

/* —— 表单元素 —— */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

/* —— 标题（统一使用品牌副色） —— */
h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
  color: var(--color-secondary);
}

/* —— 段落 —— */
p {
  overflow-wrap: break-word;
  word-break: normal;
}

/* ========================================================================
   3. 通用工具类（Utility Classes）
   ======================================================================== */

/* —— 清除浮动 —— */
.clearfix::after {
  content: "";
  display: block;
  clear: both;
}

/* —— 浮动 —— */
.fl { float: left; }
.fr { float: right; }

/* —— 文本对齐 —— */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* —— 文字省略（单行） —— */
.text-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
