/* 钱包和会员按钮滚动行为样式 */

/* 所有顶部固定元素隐藏状态的动画样式 */
.wallet-connect-btn.hidden,
.membership-btn.hidden,
.social-links-top.hidden,
.network-indicator.hidden {
    transform: translateY(-100px);
    opacity: 0;
    pointer-events: none;
}

/* 所有顶部固定元素显示状态的动画样式 */
.wallet-connect-btn.visible,
.membership-btn.visible,
.social-links-top.visible,
.network-indicator.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* 确保所有顶部固定元素有平滑的过渡动画 */
.wallet-connect-btn,
.membership-btn,
.social-links-top,
.network-indicator {
    transition: transform 0.3s ease, opacity 0.3s ease, all 0.3s ease;
}

/* 右上角的切换按钮 */
.button-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    z-index: 10003; /* 确保在最上层 */
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.button-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.button-toggle:active {
    transform: translateY(0) scale(0.95);
}

.button-toggle.show {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

/* 切换按钮中的箭头图标 */
.button-toggle .arrow-icon {
    transition: transform 0.3s ease;
}

/* 当按钮隐藏时，箭头向下 */
.button-toggle.buttons-hidden .arrow-icon {
    transform: rotate(0deg);
}

/* 当按钮显示时，箭头向上 */
.button-toggle.buttons-visible .arrow-icon {
    transform: rotate(180deg);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .button-toggle {
        width: 35px;
        height: 35px;
        font-size: 14px;
        top: 10px;
        right: 10px;
    }
    
    /* 移动端所有顶部固定元素隐藏时向上移动更少的距离 */
    .wallet-connect-btn.hidden,
    .membership-btn.hidden,
    .social-links-top.hidden,
    .network-indicator.hidden {
        transform: translateY(-80px);
    }
}

/* 确保切换按钮在所有情况下都在最上层 */
.button-toggle {
    z-index: 10003;
}

/* 当按钮被隐藏时，切换按钮保持在右上角原位置 */

/* 防止按钮隐藏时仍然可以被点击 */
.wallet-connect-btn.hidden,
.membership-btn.hidden {
    pointer-events: none;
    user-select: none;
}

/* 按钮容器，用于统一管理 */
.buttons-container {
    position: relative;
}

/* 添加一些视觉反馈，让用户知道按钮被隐藏了 */
.button-toggle {
    animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5), 0 0 0 4px rgba(255, 107, 107, 0.2);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

/* 当鼠标悬停时停止脉冲动画 */
.button-toggle:hover {
    animation: none;
}