/* CSS Reset - 重置浏览器默认样式 
   作者：张同学
   更新日期：2024年3月 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 10px = 1rem */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.4rem;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 确保可以滚动 */
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
}

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

/* 移除表格间隙 */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* 重置标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
    font-size: 100%;
}

/* 重置链接样式 */
a {
    color: inherit;
    text-decoration: none;
    background-color: transparent;
    -webkit-tap-highlight-color: transparent;
}

a:active,
a:hover {
    outline: 0;
}

/* 重置表单元素 */
button, input, optgroup, select, textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    background: none;
}

button,
input {
    overflow: visible;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    cursor: pointer;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

/* 重置图片样式 */
img {
    border: 0;
    vertical-align: middle;
    max-width: 100%;
    height: auto;
}

/* 重置多媒体元素 */
audio,
canvas,
progress,
video {
    display: inline-block;
    vertical-align: baseline;
}

/* 隐藏音频控件 */
audio:not([controls]) {
    display: none;
    height: 0;
}

/* 修复IE中的隐藏属性 */
[hidden],
template {
    display: none;
}

/* 清除浮动 */
.clearfix::before,
.clearfix::after {
    content: "";
    display: table;
}

.clearfix::after {
    clear: both;
}

/* 文本溢出处理 */
.ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 移动端优化 */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* 禁止文本选择 */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}