/* 旋转180度类 */
.rotate-180 {
    transform: rotate(180deg);
    display: inline-block; /* 确保transform生效 */
}

/* 回到顶部和回到底部按钮共用样式 */
#go-to-up, #go-to-bottom {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 999;
    text-decoration: none;
    border: none;
    outline: none;
}

#go-to-up:hover, #go-to-bottom:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

#go-to-up:active, #go-to-bottom:active {
    transform: translateY(1px);
}

/* 修复图标居中问题 */
#go-to-up i, #go-to-bottom i {
    font-size: 20px;
    line-height: 1; /* 确保行高正常 */
    display: flex; /* 使用flex确保居中 */
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease; /* 图标旋转过渡效果 */
}

/* 回到顶部按钮样式 */
#go-to-up {
    background: #3498db;
    color: white;
}

#go-to-up:hover {
    background: #2980b9;
}

/* 回到底部按钮样式 */
#go-to-bottom {
    background: #e74c3c;
    color: white;
}

#go-to-bottom:hover {
    background: #c0392b;
}

/* 调整按钮间距，让它们更紧凑 */
#footer-tools .btn.m-1 {
    margin: 0.1rem !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #go-to-up, #go-to-bottom {
        width: 45px;
        height: 45px;
    }
    
    #go-to-up i, #go-to-bottom i {
        font-size: 18px;
    }
}