/* ============================================
   飘窗样式 - QQ群礼包 + 微信群礼包
   文件: float.css
   ============================================ */

/* ===== 通用 ===== */
.qq-float-wrap, .wx-float-wrap {
    position: fixed;
    z-index: 9999;
    width: 260px;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}
.qq-float-wrap { right: 20px; bottom: 20px; animation: floatInRight 0.6s ease-out both; }
.wx-float-wrap { left: 20px;  bottom: 20px; animation: floatInLeft  0.6s ease-out both; }

@keyframes floatInRight {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes floatInLeft {
    from { transform: translateX(-120%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

.qq-float-wrap .float-body,
.wx-float-wrap .float-body {
    position: relative;
    border-radius: 14px;
    padding: 14px 14px 12px;
    color: #fff;
    overflow: hidden;
    animation: bobAnim 3s ease-in-out infinite;
}
@keyframes bobAnim {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

.qq-float-wrap .float-body {
    background: linear-gradient(135deg, #12B7F5 0%, #0D8BD8 100%);
    box-shadow: 0 6px 24px rgba(13,139,216,0.45), 0 2px 6px rgba(0,0,0,0.2);
}
.wx-float-wrap .float-body {
    background: linear-gradient(135deg, #07C160 0%, #06AD56 100%);
    box-shadow: 0 6px 24px rgba(7,193,96,0.45), 0 2px 6px rgba(0,0,0,0.2);
}

.qq-float-wrap .float-body::before,
.wx-float-wrap .float-body::before {
    content: "";
    position: absolute;
    top: -30px;
    width: 100px; height: 100px;
    background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}
.qq-float-wrap .float-body::before { left: -30px; }
.wx-float-wrap .float-body::before  { right: -30px; }

/* ===== 关闭按钮 ===== */
.qq-float-wrap .close-btn,
.wx-float-wrap .close-btn {
    position: absolute;
    top: 6px; right: 8px;
    width: 22px; height: 22px;
    line-height: 20px;
    text-align: center;
    background: rgba(0,0,0,0.25);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s, transform 0.2s;
    z-index: 2;
}
.qq-float-wrap .close-btn:hover,
.wx-float-wrap .close-btn:hover {
    background: rgba(0,0,0,0.5);
    transform: rotate(90deg);
}

/* ===== 标题行 ===== */
.qq-float-wrap .title-row,
.wx-float-wrap .title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-right: 24px;
}
.qq-float-wrap .icon-circle,
.wx-float-wrap .icon-circle {
    width: 28px; height: 28px;
    background: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.qq-float-wrap .title,
.wx-float-wrap .title {
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ===== 礼包信息 ===== */
.qq-float-wrap .gift-info,
.wx-float-wrap .gift-info {
    background: rgba(255,255,255,0.18);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 10px;
    backdrop-filter: blur(4px);
}
.qq-float-wrap .gift-info .gift-title { color: #FFE082; }
.wx-float-wrap .gift-info .gift-title { color: #FFEB3B; }
.qq-float-wrap .gift-info .gift-title,
.wx-float-wrap .gift-info .gift-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}
.qq-float-wrap .gift-info ul,
.wx-float-wrap .gift-info ul {
    margin: 0; padding-left: 16px;
}
.qq-float-wrap .gift-info li,
.wx-float-wrap .gift-info li {
    list-style: disc;
}

/* ===== 二维码区 ===== */
.qq-float-wrap .qrcode-area,
.wx-float-wrap .qrcode-area {
    text-align: center;
    margin-bottom: 10px;
}
.qq-float-wrap .qrcode-area img,
.wx-float-wrap .qrcode-area img {
    width: 120px; height: 120px;
    background: #fff;
    padding: 6px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.6);
}
.qq-float-wrap .qrcode-tip,
.wx-float-wrap .qrcode-tip {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
}

/* ===== 按钮 ===== */
.qq-float-wrap .join-btn,
.wx-float-wrap .join-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    padding: 9px 0;
    border-radius: 22px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: transform 0.15s, box-shadow 0.15s;
}
.qq-float-wrap .join-btn {
    background: linear-gradient(135deg, #FFE082 0%, #FFB300 100%);
    color: #5D2E00;
}
.wx-float-wrap .join-btn {
    background: linear-gradient(135deg, #FFEB3B 0%, #FFC107 100%);
    color: #5D4E00;
}
.qq-float-wrap .join-btn:hover,
.wx-float-wrap .join-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.3);
}
.qq-float-wrap .join-btn:active,
.wx-float-wrap .join-btn:active {
    transform: translateY(1px);
}

/* ===== 折叠小图标 ===== */
.qq-float-wrap.collapsed .float-body,
.wx-float-wrap.collapsed .float-body { display: none; }
.qq-float-wrap.collapsed .float-mini,
.wx-float-wrap.collapsed .float-mini { display: flex; }

.qq-float-wrap .float-mini,
.wx-float-wrap .float-mini {
    display: none;
    width: 56px; height: 56px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}
.qq-float-wrap .float-mini {
    background: linear-gradient(135deg, #12B7F5 0%, #0D8BD8 100%);
    box-shadow: 0 4px 16px rgba(13,139,216,0.5);
    animation: pulseQq 2s ease-in-out infinite;
}
.wx-float-wrap .float-mini {
    background: linear-gradient(135deg, #07C160 0%, #06AD56 100%);
    box-shadow: 0 4px 16px rgba(7,193,96,0.5);
    animation: pulseWx 2s ease-in-out infinite;
}
@keyframes pulseQq {
    0%, 100% { box-shadow: 0 4px 16px rgba(13,139,216,0.5); }
    50%      { box-shadow: 0 4px 16px rgba(13,139,216,0.5), 0 0 0 8px rgba(18,183,245,0.25); }
}
@keyframes pulseWx {
    0%, 100% { box-shadow: 0 4px 16px rgba(7,193,96,0.5); }
    50%      { box-shadow: 0 4px 16px rgba(7,193,96,0.5), 0 0 0 8px rgba(7,193,96,0.25); }
}
.qq-float-wrap .float-mini .badge,
.wx-float-wrap .float-mini .badge {
    position: absolute;
    top: -2px; right: -2px;
    background: #FF3B30;
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: bold;
    border: 2px solid #fff;
}

/* ===== 闪烁标签 ===== */
.qq-float-wrap .gift-tag,
.wx-float-wrap .gift-tag {
    display: inline-block;
    background: #FF3B30;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    animation: tagBlink 1s ease-in-out infinite;
}
@keyframes tagBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}
