/* ==================== 浮动按钮组合 ==================== */
.float-buttons-wrapper {
    position: fixed;
    z-index: 1000;
    --float-offset-x: 20px;
    --float-offset-y: 100px;
}

/* 水平位置 */
.float-buttons-wrapper:not(.position-left) {
    right: var(--float-offset-x);
}
.float-buttons-wrapper.position-left {
    left: var(--float-offset-x);
}

/* 垂直位置 */
.float-buttons-wrapper.position-v-top {
    top: var(--float-offset-y);
}
.float-buttons-wrapper.position-v-middle {
    top: 50%;
    transform: translateY(-50%);
}
.float-buttons-wrapper.position-v-bottom {
    bottom: var(--float-offset-y);
}

/* 按钮组容器 */
.float-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* 圆形按钮组 */
.float-btn-group {
    background: var(--bg-primary);
    border-radius: 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 单个按钮 */
.float-btn {
    width: 52px;
    height: 52px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    color: var(--text-secondary);
}

.float-btn:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.float-btn i {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.float-btn:hover i {
    transform: scale(1.15);
}

/* 分隔线 */
.float-btn:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: var(--border-color);
}

/* 主题切换按钮 */
.float-btn.theme-toggle {
    color: #9c27b0;
}

.float-btn.theme-toggle:hover {
    background: rgba(156, 39, 176, 0.1);
}

body.dark-theme .float-btn.theme-toggle {
    color: #ffca28;
}

/* QQ客服按钮 */
.float-btn.qq-btn {
    color: #12B7F5;
}

.float-btn.qq-btn:hover {
    background: rgba(18, 183, 245, 0.1);
}

/* 返回顶部 */
.float-btn.back-to-top {
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.float-btn.back-to-top:hover {
    color: var(--primary-color);
    background: rgba(24, 144, 255, 0.1);
}

.float-btn.back-to-top i {
    font-size: 16px;
}

/* 浮动提示 */
.float-btn-tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.float-btn-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
}

.float-btn:hover .float-btn-tooltip {
    opacity: 1;
    visibility: visible;
}

/* 悬浮窗在左侧时，tooltip在右边 */
.float-buttons-wrapper.position-left .float-btn-tooltip {
    right: auto;
    left: 100%;
    margin-right: 0;
    margin-left: 12px;
}

.float-buttons-wrapper.position-left .float-btn-tooltip::after {
    left: auto;
    right: 100%;
    border-left-color: transparent;
    border-right-color: rgba(0, 0, 0, 0.8);
}

/* 黑暗主题 */
body.dark-theme .float-btn-group {
    background: var(--bg-secondary);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body.dark-theme .float-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 响应式 */
@media (max-width: 768px) {
    .float-buttons-wrapper {
        --float-offset-x: 16px;
        --float-offset-y: 16px;
    }
    
    .float-btn {
        width: 46px;
        height: 46px;
    }
    
    .float-btn i {
        font-size: 16px;
    }
    
    .float-btn-tooltip {
        display: none;
    }
}

/* ==================== 二维码弹窗 ==================== */
.qrcode-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.qrcode-modal.show {
    display: flex;
}

.qrcode-modal-content {
    position: relative;
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.qrcode-modal-content img {
    max-width: 250px;
    max-height: 250px;
    border-radius: 8px;
}

.qrcode-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-modal-close:hover {
    background: var(--primary-color);
    color: white;
}
