/* 根据主题颜色切换背景颜色 */
[data-theme='light'] {
    color-scheme: light only;
}
[data-theme='dark'] {
    color-scheme: dark only;
}

/* normalize（仍然保留，避免跨浏览器差异）*/
@import url('https://unpkg.com/normalize.css');


/* 基础设置 */
html {
    color-scheme: light dark;
    scroll-behavior: smooth;
    background: light-dark(white, black);
}

*, *:after, *:before {
    box-sizing: border-box;
}

body {
    background: light-dark(white, black);
    display: grid;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow: auto;
    font-family: 'SF Pro Text', 'SF Pro Icons', 'AOS Icons',
                 'Helvetica Neue', Helvetica, Arial, sans-serif, system-ui;
}

/* 无障碍文本隐藏 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 滚动条样式（body）*/
body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: #00000;
}

body::-webkit-scrollbar-thumb {
    background: #222222;
    border-radius: 5px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #f26422;
}

/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    color: white;
    font-size: 30px;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s;
    z-index: 1000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

#backToTop:hover {
    opacity: 1;
    transform: scale(1.1);
}




/* debug */
/*
*{
    border: 1px solid red;
}
*/