/* TO TOP 按钮样式 */
.to-top-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    z-index: 999;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}

.to-top-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.to-top-btn:active {
    transform: translateY(0);
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .to-top-btn {
        background: rgba(45, 45, 45, 0.95);
        border-color: #444;
        color: #e8e8e8;
    }
    
    .to-top-btn:hover {
        background: rgba(45, 45, 45, 1);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .to-top-btn {
        right: 10px;
        bottom: 80px; /* 避免与TOC按钮重叠 */
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }
}

/* 滚动显示/隐藏动画 */
.to-top-btn.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.to-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
}
