/* 背景样式 */
body::before, body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

body::before {
    z-index: -2;
    background-image: url('../assets/images/backgrounds/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    image-rendering: -webkit-optimize-contrast;
}

body::after {
    z-index: -1;
    transition: background-color var(--transition-speed) ease;
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] body::after {
    background-color: rgba(0, 0, 0, 0.5);
}

/* 移动端优化 */
@media (max-width: 768px) {
    body::before {
        background-image: none; /* 移动端不显示背景图片 */
        background-attachment: scroll;
    }
}