* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}


:root {
    --primary: #fdd000;
    --primary-dark: #fdd000;
    --text-dark: #040404;
    --text-light: #fff;
    --bg-light: #f5f7fa;
    --white: #fff;
    --dark: #040404;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden !important;   /* 兜底：任何页面都不允许横向滚动 */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    height: 100vh;
    overflow-x: hidden !important;   /* 防止任何子元素溢出导致页面横向滚动 */
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top img {
    width: 48px;
    height: 48px;
}
.back-to-top:active {
    background: transparent;
}
.back-to-top.fly {
    animation: flyUp 0.6s ease-out forwards;
}
@keyframes flyUp {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-100px); opacity: 0; }
}
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}