/* ============================================================
   基础样式重置与全局设定
============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 24px); /* 为固定导航栏留出缓冲空间 */
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text-secondary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 防止移动端 iframe 导致双重滚动条的工具类 */
body.no-scroll {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

button, input, textarea {
    font-family: inherit;
    outline: none;
}

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

/* 隐藏滚动条但保留滚动功能 (针对部分容器) */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}