/**
 * 按钮特效和动画样式 - Effects & Animations
 * 包含主题切换、滚动按钮、动画效果等交互样式
 */

/* ==================== 主题切换按钮 ==================== */
.theme-switch {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 100;
    cursor: pointer;
    font-size: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--shadow);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

/* ==================== 滚动按钮 ==================== */
.scroll-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    cursor: pointer;
    font-size: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--shadow);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.scroll-button.visible {
    opacity: 1;
    visibility: visible;
}

.theme-switch:hover, .scroll-button:hover {
    transform: translateY(-3px);
}

/* ==================== SVG图标样式 ==================== */
.inline-svg-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.125em;
}

/* ==================== 主题图标动画 ==================== */
.theme-icon-rotate {
    animation: rotateIcon 0.5s ease;
}

@keyframes rotateIcon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.theme-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* ==================== 按钮摆动动画 ==================== */
.button-shake {
    animation: shakeButton 0.8s ease;
}

@keyframes shakeButton {
    0% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

/* ==================== 按钮角标样式 ==================== */
.button-badge {
    position: absolute;
    top: 6px;
    right: 7px;
    font-size: 0.75rem;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.button-with-shop-badge {
    padding-right: 0;
    margin-right: 0;
    display: inline-block;
}

.shop-button-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 0;
}

/* ==================== 按钮斜滑光效 ==================== */
.button-sheen {
    position: relative;
    overflow: hidden;
    will-change: transform;
}

/* ==================== 工具提示显示层级 ==================== */
.tooltip.show {
    opacity: 1;
    visibility: visible;
    z-index: 9999 !important;
}

/* ==================== 移动端特别适配 ==================== */
@media (max-width: 360px) {
    .button-badge {
        width: 14px;
        height: 14px;
        font-size: 0.55rem;
        top: 3px;
        right: 3px;
    }
}

/* ==================== 移除移动端点击蓝色蒙版 ==================== */
.theme-switch, .scroll-button, button, a, .button, .reward-card, .indicator {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

/* ==================== 移动端响应式调整 ==================== */
@media (max-width: 768px) {
    .theme-switch, .scroll-button {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .theme-switch {
        bottom: 70px;
    }
}

@media (max-width: 480px) {
    .theme-switch, .scroll-button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        right: 15px;
    }
    
    .theme-switch {
        bottom: 65px;
    }
    
    .scroll-button {
        bottom: 15px;
    }
}