/* =========================
   base.css - HTML5 基础样式
   ========================= */

/* 1. CSS Reset（基础重置） */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
dl,
dd,
ul,
ol,
figure,
form,
fieldset,
legend,
input,
textarea,
button,
th,
td {
    margin: 0;
    padding: 0;
}

/* 2. HTML5 语义化标签兼容 */
article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
nav,
section {
    display: block;
}

/* 3. 基础文档设置 */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, "Helvetica Neue",
        Arial, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
}

/* 4. 列表样式 */
ul,
ol {
    list-style: none;
}

/* 5. 链接 */
a {
    color: inherit;
    text-decoration: none;
    background-color: transparent;
}

a:hover {
    text-decoration: underline;
}

/* 6. 图片与多媒体 */
img,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 7. 表格 */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* 8. 表单元素 */
button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
    outline: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

textarea {
    resize: vertical;
}

/* 9. 去除 Chrome 自动填充背景色 */
input:-webkit-autofill {
    box-shadow: 0 0 0 1000px #fff inset;
}

/* 10. 常用辅助类 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}