@font-face {
    font-family: 'HarmonyOS Sans SC';
    src: url('../font2/HarmonyOS_SansSC_Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    size-adjust: 100%;
    ascent-override: 88%;
    descent-override: 20%;
}

@font-face {
    font-family: 'HarmonyOS Sans SC';
    src: url('../font2/HarmonyOS_SansSC_Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    size-adjust: 100%;
    ascent-override: 88%;
    descent-override: 20%;
}

/* ---------- CSS变量 ---------- */
:root {
    --font-family-regular: "HarmonyOS Sans SC", 
                            "PingFang SC", 
                            "Microsoft YaHei", 
                            "微软雅黑",
                            system-ui, 
                            -apple-system, 
                            BlinkMacSystemFont,
                            "Segoe UI", 
                            Roboto, 
                            sans-serif;
    --font-family-bold: "HarmonyOS Sans SC", 
                        "PingFang SC", 
                        "Microsoft YaHei", 
                        "微软雅黑",
                        system-ui, 
                        -apple-system, 
                        sans-serif;
}

/* ---------- 全局重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------- 基础元素样式 ---------- */
html {
    font-size: 15px;
    scroll-behavior: smooth;
    background-color: #ffdf00;
}

body {
    font-family: var(--font-family-regular);
    font-weight: 400;
    line-height: 1.5;
    color: #1a1a1a;
    background-color: #ffffff;
    
    /* Windows + Chrome 字体渲染优化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-synthesis: none;
    font-variant-ligatures: none;
    font-kerning: normal;
}

/* ---------- 加粗元素 ---------- */
h1, h2, h3, h4, h5, h6,
strong, b,
th,
dt {
    font-family: var(--font-family-bold);
    font-weight: 700;
}

/* ---------- 标题 ---------- */
h1 {
    font-size: 2rem;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.75rem;
    letter-spacing: -0.005em;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5, h6 {
    font-size: 1.1rem;
}

/* ---------- 文本元素 ---------- */
p {
    margin-bottom: 1em;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

/* ---------- 小字号优化 ---------- */
small, .text-small {
    font-size: 0.875rem;
    -webkit-font-smoothing: subpixel-antialiased;
}

/* ---------- 大字号优化 ---------- */
.large-text, h1, h2, h3 {
    -webkit-font-smoothing: antialiased;
}

/* ---------- 表格 ---------- */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ---------- 表单元素 ---------- */
button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

/* ---------- 媒体元素 ---------- */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* ---------- 隐藏属性 ---------- */
[hidden] {
    display: none !important;
}

/* ---------- 焦点样式 ---------- */
:focus-visible {
    /* outline: 2px solid #0066cc;
    outline-offset: 2px; */
}

/* ---------- 滚动条美化 ---------- */
::-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;
}

/* ---------- 选中文字样式 ---------- */
::selection {
    background-color: rgba(255, 223, 0, 1);
    color: #131924;
}

::-moz-selection {
    background-color: rgba(255, 223, 0, 1);
    color: #131924;
}