/* ==========================================================================
   CSS Reset / Normalization (清除/重置默认样式)
   ========================================================================== */

/* 1. 统一盒模型，防止 padding 和 border 撑大盒子 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 2. 根节点与全局设置 */
html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    /* 防止移动端横屏时字体自动变大 */
    -webkit-tap-highlight-color: transparent;
    /* 移除移动端点击高亮空白层 */
    scroll-behavior: smooth;
    /* 开启平滑滚动 */
}

/* 3. Body 默认重置 */
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    color: #333333;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    /* macOS/iOS 字体抗锯齿优化 */
    -moz-osx-font-smoothing: grayscale;
}

/* 4. 列表与列表元素 */
ul,
ol,
dl {
    list-style: none;
}

/* 5. 链接与文本格式 */
a {
    color: inherit;
    text-decoration: none;
    background-color: transparent;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
    /* 避免长文本溢出容器 */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: normal;
}

/* 6. 媒体元素（响应式处理与块级化） */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 7. 表单与按钮样式统一 */
input,
button,
textarea,
select {
    font: inherit;
    /* 继承父级的字体属性 */
    color: inherit;
    letter-spacing: inherit;
    border: none;
    outline: none;
    background: none;
}

button,
input[type="submit"],
input[type="reset"] {
    cursor: pointer;
}

textarea {
    resize: vertical;
    /* 限制用户只能垂直拉伸文本域 */
}

/* 8. 表格重置 */
table {
    border-collapse: collapse;
    border-spacing: 0;
}


.u-flex {
    display: flex;
    align-items: center;
}

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

.two-line-ellipsis {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* 限制文本为2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.u-flex-1 {
    flex: 1;
}

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

.u-col-top {
    align-items: flex-start;
}

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

.u-row-right {
    justify-content: flex-end;
}

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

.u-text-center {
    text-align: center;
}

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

.u-col-bottom {
    align-items: flex-end;
}

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

.pointer {
    cursor: pointer;
}

.hoverImg {
    overflow: hidden;
}

.hoverImg img {
    transition: all .3s ease;
}