﻿/* ========================================
   CSS Reset - 基础重置样式
   包含最常用的跨浏览器重置规则
   ======================================== */

/* 1. 使用更好的盒模型 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 2. 移除默认边距和内边距 */
* {
    margin: 0;
    padding: 0;
}

/* 3. HTML和body基础设置 */
html {
    line-height: 1.15; /* 1 */
    -webkit-text-size-adjust: 100%; /* 2 */
    -webkit-tap-highlight-color: transparent; /* 3 */
}

body {
    margin: 0; /* 移除默认margin */
    font-family: '宋体', '微软雅黑', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: left;
    background-color: #ffffff;
}

/* 4. 标题元素重置 */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
    color: inherit;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.875rem; }
h6 { font-size: 0.75rem; }

/* 5. 段落和文本元素 */
p {
    margin-top: 0;
    overflow-wrap: break-word;
}

/* 6. 链接重置 */
a {
    color: inherit;
    text-decoration: none;
    background-color: transparent;
}

a:hover {
    text-decoration: none;
}

/* 7. 列表重置 */
ol, ul {
    margin-top: 0;
    padding-left: 0;
    list-style: none;
}

ol ol,
ul ul,
ol ul,
ul ol {
    margin-bottom: 0;
}

li {
    display: list-item;
    text-align: -webkit-match-parent;
}

/* 8. 图片和媒体元素 */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
    display: block;
    vertical-align: middle;
    max-width: 100%;
    height: auto;
}

img {
    border-style: none;
}

svg {
    overflow: hidden;
    vertical-align: middle;
}

/* 9. 表格重置 */
table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

caption {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    color: #6c757d;
    text-align: left;
    caption-side: bottom;
}

th {
    text-align: inherit;
    text-align: -webkit-match-parent;
}

thead,
tbody,
tfoot,
tr,
td,
th {
    border-color: inherit;
    border-style: solid;
    border-width: 0;
}

/* 10. 表单元素重置 */
label {
    display: inline-block;
    margin-bottom: 0.5rem;
}

button {
    border-radius: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    text-transform: none;
    background-color: transparent;
    border: 0;
    cursor: pointer;
}

button:focus {
    outline: 1px dotted;
    outline: 5px auto -webkit-focus-ring-color;
}

input,
button,
select,
optgroup,
textarea {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button,
input {
    overflow: visible;
}

button,
select {
    text-transform: none;
}

select {
    word-wrap: normal;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
    cursor: pointer;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    padding: 0;
    border-style: none;
}

input[type="radio"],
input[type="checkbox"] {
    box-sizing: border-box;
    padding: 0;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
    -webkit-appearance: listbox;
}

textarea {
    overflow: auto;
    resize: vertical;
}

fieldset {
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
}

legend {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    line-height: inherit;
    color: inherit;
    white-space: normal;
}

progress {
    vertical-align: baseline;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

[type="search"] {
    outline-offset: -2px;
    -webkit-appearance: none;
}

[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    font: inherit;
    -webkit-appearance: button;
}

/* 11. 其他常用元素重置 */
address {
    margin-bottom: 1rem;
    font-style: normal;
    line-height: inherit;
}

blockquote {
    margin: 0 0 1rem;
    padding: 0;
}

b,
strong {
    font-weight: bolder;
}

small {
    font-size: 0.875em;
}

mark {
    padding: 0.2em;
    background-color: #fcf8e3;
}

sub,
sup {
    position: relative;
    font-size: 0.75em;
    line-height: 0;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

/* 12. 辅助类 */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* 13. 清除浮动 */
.clearfix::after {
    display: block;
    clear: both;
    content: "";
}

/* 14. 隐藏元素 */
[hidden] {
    display: none !important;
}

/* 15. 禁用iOS的点击高亮 */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* 16. 滚动条样式（webkit浏览器） */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 17. 焦点样式优化 */
:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* 18. 选择文本样式 */
::selection {
    background-color: #b3d4fc;
    color: #000;
    text-shadow: none;
}

::-moz-selection {
    background-color: #b3d4fc;
    color: #000;
    text-shadow: none;
} 
.fleft {
    float: left;
}
.fright {
    float: right;
}
.clear {
    clear: both;
}