/**
 * base.css - 基础样式重置与通用样式
 * 作用：统一浏览器默认样式、设置基础排版、提供通用工具类
 */

/* ========== 1. 样式重置 (Reset) ========== */
/* 清除默认内外边距，统一盒模型 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  /* 清除移动端点击高亮 */
}

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
sub,
sup,
tt,
var,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: normal;
  vertical-align: baseline;
}

/* 清除列表默认样式 */
ul,
ol,
li {
  list-style: none;
}

/* 清除链接默认样式 */
a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* 清除按钮、输入框默认样式 */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  resize: none;
}

/* 清除按钮点击默认样式 */
button {
  cursor: pointer;
}

section {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* 清除表格边框 */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 清除图片默认间隙 */
img {
  display: block;
  max-width: 100%;
  height: auto;
  border: none;
  object-fit: cover;
}

/* 清除浮动 */
.clearfix::after {
  content: "";
  display: block;
  clear: both;
  height: 0;
  visibility: hidden;
}

@font-face {
  font-family: "OPPO Sans 4.0";
  /* 自定义字体名称（后续引用时用） */
  font-weight: normal;
  /* 字体粗细（常规体对应 normal） */
  font-style: normal;
  /* 字体样式（常规体对应 normal） */
  /* 引入字体文件，按优先级排列（浏览器会选择第一个支持的格式） */
  src: url("../fonts/OPPO\ Sans\ 4.0.woff2") format("woff2"),
    url("../fonts/OPPO\ Sans\ 4.0.woff") format("woff"),
    url("../fonts/OPPO\ Sans\ 4.0.ttf") format("truetype");
}

/* 定义阿里巴巴普惠体 2 常规体 */
@font-face {
  font-family: "DouyinSansBold";
  /* 自定义字体名称（后续引用时用） */
  font-weight: normal;
  /* 字体粗细（常规体对应 normal） */
  font-style: normal;
  /* 字体样式（常规体对应 normal） */
  /* 引入字体文件，按优先级排列（浏览器会选择第一个支持的格式） */
  src:
    url("../fonts/OPPO\ Sans\ 4.0.ttf") format("truetype");
}

/* ========== 2. 基础样式 (Base Style) ========== */
/* 全局字体与颜色 */
body {
  font-family: 'OPPO Sans 4.0';
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  /* 字体抗锯齿 */
  -moz-osx-font-smoothing: grayscale;
}

/* 基础排版 */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2em;
  font-family: 'DouyinSansBold';
}

h2 {
  font-size: 1.8em;
  font-family: 'DouyinSansBold';
}

h3 {
  font-size: 1.6em;
  font-family: 'DouyinSansBold';
}

h4 {
  font-size: 1.4em;
  font-family: 'DouyinSansBold';
}

h5 {
  font-size: 1.2em;
  font-family: 'DouyinSansBold';
}

h6 {
  font-size: 1em;
  font-family: 'DouyinSansBold';
}

p {
  margin-bottom: 1em;
}

/* 禁用状态通用样式 */
.disabled {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

/* ========== 3. 通用工具类 (Utility Classes) ========== */
/* 布局类 */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.flex-1 {
  flex: 1;
}

/* 定位类 */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.top-0 {
  top: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.bottom-0 {
  bottom: 0;
}

/* 显示隐藏 */
.hide {
  display: none !important;
}

.show {
  display: block !important;
}

.invisible {
  visibility: hidden;
}

.visible {
  visibility: visible;
}

/* 文本样式 */
.text-center {
  text-align: center;
}

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

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

.text-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-break {
  word-break: break-all;
  word-wrap: break-word;
}

/* 间距类 (按需扩展) */
.m-0 {
  margin: 0;
}

.m-1 {
  margin: 4px;
}

.m-2 {
  margin: 8px;
}

.mt-1 {
  margin-top: 4px;
}

.mb-1 {
  margin-bottom: 4px;
}

.ml-1 {
  margin-left: 4px;
}

.mr-1 {
  margin-right: 4px;
}

.p-0 {
  padding: 0;
}

.p-1 {
  padding: 4px;
}

.p-2 {
  padding: 8px;
}

/* 圆角类 */
.rounded {
  border-radius: 4px;
}

.rounded-lg {
  border-radius: 8px;
}

.rounded-full {
  border-radius: 50%;
}

/* 阴影类 */
.shadow {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}