/* CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    width: 100%;
    position: relative;
    min-height: 100vh;
}

img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea {
    font-family: inherit;
    outline: none;
    border: none;
}

button {
    cursor: pointer;
}

/* 移除移动端点击高亮 */
-webkit-tap-highlight-color: transparent;

/* 强制防止横向滚动 - 仅移动端 */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* 确保所有主要元素不超出 - 仅移动端 */
    main, section, header, footer, nav, article, aside {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    /* 确保图片和媒体不超出 - 仅移动端 */
    img, video, iframe, embed, object, svg {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* 确保表格不超出 - 仅移动端 */
    table {
        max-width: 100% !important;
        overflow-x: auto !important;
        display: block !important;
    }
}
