/* HTML5 样式重置 - 完整增强版 */
/* 1. 全局基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* 去掉移动端点击元素的高亮背景 */
}

*+p{
    margin: 0;
}

*:before, *:after {
    box-sizing: border-box;
}

/* 2. HTML5 新标签块级化 + 兼容 */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, main,
address, caption, cite, code, dfn, em, th, var {
    display: block;
    font-style: normal;
    font-weight: normal;
}

/* 3. 列表/链接/图片重置 */
ul, ol, li {
    list-style: none;
}
a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s ease; /* 可选：链接过渡效果，按需去掉 */
}
a:hover, a:active, a:focus {
    text-decoration: none;
    outline: none;
}
img, video, audio, canvas, svg, iframe {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
    vertical-align: middle;
}
img {
    object-fit: cover; /* 可选：图片自适应填充，避免变形，按需去掉 */
}

/* 4. 表格/表单深度重置 */
table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}
th, td {
    text-align: left;
    vertical-align: middle;
}
input, button, textarea, select, optgroup, option {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    background: transparent;
    border: 0;
    outline: 0;
    resize: none;
    appearance: none;
    -webkit-appearance: none;
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: #999; /* 占位符默认颜色，按需修改 */
}
input::-moz-placeholder,
textarea::-moz-placeholder {
    color: #999;
    opacity: 1;
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: #999;
}
input::placeholder,
textarea::placeholder {
    color: #999;
}
/* 解决input[type=number]右侧箭头 */
input[type="number"] {
    -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
button:disabled, input:disabled, textarea:disabled, select:disabled {
    cursor: not-allowed;
    opacity: 0.6; /* 禁用元素透明度，按需修改 */
}

/* 5. 页面主体样式 */
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px; /* 全局基础字号，移动端可配合rem修改 */
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    min-width: 320px; /* 移动端最小宽度，防止挤压 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* 防止横向滚动，按需去掉 */
}
dl dl, ul dl, ol dl, dl ul, ul ul, ol ul, dl ol, ul ol, ol ol{
    padding-left: 0;
}

dl dd, dl, ul{
    margin: 0;
    padding: 0;
}

/* 6. 标题/文本重置 */
h1, h2, h3, h4, h5, h6 {
    font-size: 100%;
    font-weight: 500;
    margin: 0;
}
p {
    margin-bottom: 0; /* 去掉段落默认底部边距，按需添加 */
}
b, strong {
    font-weight: 600;
}
i, em {
    font-style: normal;
}
sup, sub {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}
sup {
    top: -0.5em;
}
sub {
    bottom: -0.25em;
}

/* 7. 清除浮动 + 隐藏元素 */
.clearfix::after {
    content: "";
    display: block;
    clear: both;
    height: 0;
    visibility: hidden;
}
.clearfix {
    *zoom: 1;
}
.hide {
    display: none !important;
}
.invisible {
    visibility: hidden !important;
}
.overflow-hidden {
    overflow: hidden !important;
}

/* 8. 可选：自定义滚动条（美化，适配webkit内核） */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 9. 可选：移动端禁止长按选中文本/图片 */
/*
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
img {
  pointer-events: none; // 禁止图片长按弹出菜单
}
*/