/* ================================
   m_default14 - 样式重置
   ================================ */

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

/* ================================
   HTML & Body 基础
   ================================ */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--bg-color);
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================
   文本元素
   ================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    line-height: var(--line-height-tight);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-base) var(--transition-timing);
}

a:hover {
    color: var(--primary-dark);
}

/* ================================
   列表
   ================================ */
ul, ol {
    list-style: none;
    margin-bottom: var(--spacing-md);
}

/* ================================
   图片与媒体
   ================================ */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ================================
   表单元素
   ================================ */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

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

/* ================================
   表格
   ================================ */
table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

/* ================================
   滚动条样式
   ================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Firefox 滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) var(--bg-color);
}

/* ================================
   通用工具类
   ================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* ================================
   防止移动端点击高亮
   ================================ */
* {
    -webkit-tap-highlight-color: transparent;
}

/* ================================
   防止文本选择装饰
   ================================ */
::selection {
    background-color: var(--primary-color);
    color: var(--text-light);
}

::-moz-selection {
    background-color: var(--primary-color);
    color: var(--text-light);
}
