/*!
 * alex-side 悬浮侧边栏样式
 * 前缀: alex-side-
 * 功能: 玻璃效果、双端自适应、图标提示卡
 */



/* ---------- alex-side 悬浮侧边栏 核心样式 ---------- */
.alex-side-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 9999;
}

/* 右侧图标条 - 玻璃风格 */
.alex-side-bar {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-radius: 20px 0 0 20px;
    padding: 10px 5px 10px 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-right: none;
    transition: background 0.3s;
}

.alex-side-bar:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* 每个图标项容器 */
.alex-side-item {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    width: 52px;
    height: 52px;
    border-radius: 30px;
    background: rgba(245, 245, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.5);
    transition: transform 0.2s ease, background 0.2s, box-shadow 0.2s;
    color: white;
    font-size: 24px;
    box-shadow: 0 5px 12px rgba(0,0,0,0.1);
}

.alex-side-item:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255,255,255,0.8);
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}

.alex-side-item i {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* 左侧信息卡 (玻璃风格 + 箭头) */
.alex-side-tip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11, 11, 11, 0.6);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border-radius: 20px;
    padding: 12px 22px;
    white-space: nowrap;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 100;
    line-height: 1.4;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 小箭头 */
.alex-side-tip::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 10px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.35);
    filter: drop-shadow(2px 0 5px rgba(0,0,0,0.1));
}

/* 微信二维码特殊处理 */
.alex-side-tip.wechat-tip {
    white-space: normal;
    text-align: center;
    padding: 12px;
}

.wechat-qr {
    width: 130px;
    height: 130px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px 0 3px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.wechat-qr svg,
.wechat-qr img {
    width: 120px;
    height: 120px;
    display: block;
    border-radius: 8px;
    background: #f2f2f2;
    object-fit: cover;
}

.tip-label {
    display: block;
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* 默认隐藏所有tip */
.alex-side-item .alex-side-tip {
    opacity: 0;
    visibility: hidden;
}

/* 桌面端 hover 显示 */
@media (hover: hover) and (pointer: fine) {
    .alex-side-item:hover .alex-side-tip {
        opacity: 1;
        visibility: visible;
    }
}

/* ----------------- 移动端适配 ----------------- */
@media (max-width: 768px) {
    .alex-side-bar {
        padding: 8px 4px 8px 6px;
        gap: 12px;
    }
    
    .alex-side-item {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    .alex-side-tip {
        right: 60px;
        padding: 8px 16px;
        font-size: 1rem;
    }
    
    .wechat-qr {
        width: 110px;
        height: 110px;
    }
    
    .wechat-qr svg,
    .wechat-qr img {
        width: 100px;
        height: 100px;
    }
    
    /* 移动端通过 active 类控制显示 */
    .alex-side-item .alex-side-tip {
        transition: opacity 0.2s, visibility 0.2s;
    }
    
    .alex-side-item.active .alex-side-tip {
        opacity: 1;
        visibility: visible;
    }
    
    .alex-side-item:hover {
        transform: scale(1.02);
        background: rgba(255, 255, 255, 0.25);
    }
}

/* 小屏幕微调 */
@media (max-width: 420px) {
    .alex-side-tip {
        right: 55px;
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .wechat-qr {
        width: 95px;
        height: 95px;
    }
    
    .wechat-qr svg,
    .wechat-qr img {
        width: 85px;
        height: 85px;
    }
}