/* Font Face */
@font-face {
    font-family: 'Alimama ShuHeiTi';
    src: url('../font/Alimama_ShuHeiTi_Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* CSS Reset and Base Styles */

/* 1. 使用更合理的盒模型 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 2. 重置默认边距 */
body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd {
    margin: 0;
}

/* 3. 设置核心根元素默认值 */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html:focus-within {
    scroll-behavior: smooth;
}

/* 4. 设置body基础样式 */
body {
    min-height: 100vh;
    line-height: 1.6;
    text-rendering: optimizeSpeed;
    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";
    color: #333;
    background-color: #f3f6f8;
    overflow-x: hidden;
}

/* 5. 重置列表样式 */
ul[role='list'],
ol[role='list'],
ul,
ol {
    list-style: none;
}

/* 6. 设置标题默认字重 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

/* 7. 链接样式 */
a {
    text-decoration: none;
    color: inherit;
}

a:not([class]) {
    text-decoration-skip-ink: auto;
}

/* 8. 图片和媒体元素 */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

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

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

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

/* 11. 防止文本溢出 */
p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* 12. 移除默认的表单样式 */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: none;
}

/* 13. 移除 iOS 输入框阴影 */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 14. 清除浮动 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 15. 常用工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

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

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* 16. 响应式断点参考 */
/* 移动设备: < 576px */
/* 平板设备: >= 576px */
/* 桌面设备: >= 768px */
/* 大屏设备: >= 992px */
/* 超大屏: >= 1200px */

/* 17. 屏幕小于1200px时整体缩放 */
@media screen and (max-width: 1199px) {
    body {
        width: 1200px !important;
        min-height: 100vh;
        transform-origin: 0 0;
        overflow-x: visible !important;
    }
    
    html {
        overflow-x: hidden;
    }
}
