/* 返回顶部按钮样式 */
#back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background-color: white;
    color: #4b5563;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    border-color: #d1d5db;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

#back-to-top:active {
    transform: translateY(0);
}

#back-to-top svg {
    width: 24px;
    height: 24px;
}

/* 黑暗模式适配 */
.dark #back-to-top {
    background-color: #1f2937;
    color: #d1d5db;
    border-color: #374151;
}

.dark #back-to-top:hover {
    border-color: #4b5563;
}

/* 移动端适配 */
@media (max-width: 768px) {
    #back-to-top {
        width: 48px;
        height: 48px;
        bottom: 80px;
        right: 24px;
    }
}

/* 大屏幕时避免与移动端目录按钮重叠 */
@media (max-width: 1024px) {
    #back-to-top {
        bottom: 80px;
    }
}
