/* ============================================================
   琉璃万花筒悬浮弹窗 - 设计2
   Crystal Kaleidoscope · 多层动态特效
   鼠标悬停时背景动画暂停
   ============================================================ */

.io-holo-popup {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 9998;
    width: calc(100% - 32px);
    max-width: 460px;
    opacity: 0;
    transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .4s ease;
    pointer-events: none;
}
.io-holo-popup.io-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* 外层包裹 - 透明背景，无黑色底板 */
.holo-popup-wrap {
    border-radius: 16px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    perspective: 1000px;
}

/* 卡片本体 */
.holo-popup-card {
    --rx: 0deg;
    --ry: 0deg;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #0a0518 0%, #0e0820 50%, #080414 100%);
    transform-style: preserve-3d;
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .15s cubic-bezier(.22,1,.36,1);
    will-change: transform;
}

/* ====== 旋转锥光层1 ====== */
.holo-popup-card .k-rotate1 {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    background: conic-gradient(from 0deg,
        transparent 0%,
        rgba(255,0,128,.08) 30deg,
        transparent 60deg,
        rgba(0,191,255,.08) 120deg,
        transparent 150deg,
        rgba(138,43,226,.08) 210deg,
        transparent 240deg,
        rgba(255,200,0,.06) 300deg,
        transparent 360deg);
    animation: k-rot1 12s linear infinite;
    mix-blend-mode: screen;
    pointer-events: none;
}

/* ====== 旋转锥光层2 ====== */
.holo-popup-card .k-rotate2 {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250px;
    height: 250px;
    transform: translate(-50%, -50%);
    background: conic-gradient(from 180deg,
        transparent 0%,
        rgba(0,255,200,.06) 60deg,
        transparent 120deg,
        rgba(255,100,200,.06) 180deg,
        transparent 240deg,
        rgba(100,200,255,.06) 300deg,
        transparent 360deg);
    animation: k-rot2 8s linear infinite reverse;
    mix-blend-mode: screen;
    pointer-events: none;
}
@keyframes k-rot1 { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes k-rot2 { to { transform: translate(-50%,-50%) rotate(-360deg); } }

/* ====== 中心光晕 ====== */
.holo-popup-card .k-shine {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255,255,255,.04) 0%, transparent 50%);
    animation: k-pulse 4s ease-in-out infinite;
    mix-blend-mode: screen;
    pointer-events: none;
}
@keyframes k-pulse {
    0%, 100% { opacity: .5; transform: translate(-50%,-50%) scale(.8); }
    50%      { opacity: 1; transform: translate(-50%,-50%) scale(1.2); }
}

/* ====== 漂浮碎片 ====== */
.holo-popup-card .k-facet {
    position: absolute;
    pointer-events: none;
    opacity: .1;
}
.holo-popup-card .k-facet1 {
    top: 10%; left: 15%;
    width: 30px; height: 30px;
    background: linear-gradient(135deg, #ff0080, #00bfff);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: k-float1 5s ease-in-out infinite;
}
.holo-popup-card .k-facet2 {
    top: 70%; right: 15%;
    width: 25px; height: 25px;
    background: linear-gradient(135deg, #00ffc8, #ffa500);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: k-float2 4s ease-in-out infinite .5s;
}
.holo-popup-card .k-facet3 {
    bottom: 15%; left: 20%;
    width: 20px; height: 20px;
    background: linear-gradient(135deg, #8a2be2, #ff0080);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: k-float1 6s ease-in-out infinite 1s;
}
.holo-popup-card .k-facet4 {
    top: 20%; right: 20%;
    width: 22px; height: 22px;
    background: linear-gradient(135deg, #00bfff, #00ff9d);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: k-float2 5s ease-in-out infinite 1.5s;
}
@keyframes k-float1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-10px) rotate(180deg); }
}
@keyframes k-float2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(8px) rotate(-180deg); }
}

/* ====== 星光闪烁 ====== */
.holo-popup-card .k-sparkle {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.holo-popup-card .k-sparkle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1.5px 1.5px at 15% 30%, rgba(255,255,255,.5), transparent),
        radial-gradient(1px 1px at 45% 60%, rgba(255,200,255,.4), transparent),
        radial-gradient(2px 2px at 75% 25%, rgba(200,255,255,.5), transparent),
        radial-gradient(1px 1px at 30% 80%, rgba(255,255,200,.3), transparent),
        radial-gradient(1.5px 1.5px at 70% 70%, rgba(255,200,200,.4), transparent),
        radial-gradient(1px 1px at 90% 50%, rgba(200,200,255,.3), transparent);
    animation: k-twinkle 3s ease-in-out infinite alternate;
}
@keyframes k-twinkle {
    0%   { opacity: .3; }
    100% { opacity: 1; }
}

/* ====== 流光边框 ====== */
.holo-popup-card .k-border {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1.5px;
    background: linear-gradient(135deg,
        rgba(255,0,128,.4),
        rgba(0,191,255,.3),
        rgba(0,255,200,.25),
        rgba(138,43,226,.3),
        rgba(255,0,128,.4));
    background-size: 300% 300%;
    animation: border-flow 5s linear infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 3;
}
@keyframes border-flow { to { background-position: 200% 0; } }

/* ====== 鼠标悬停时暂停所有背景动画 ====== */
.holo-popup-card:hover .k-rotate1,
.holo-popup-card:hover .k-rotate2,
.holo-popup-card:hover .k-shine,
.holo-popup-card:hover .k-facet,
.holo-popup-card:hover .k-sparkle::before,
.holo-popup-card:hover .k-border {
    animation-play-state: paused;
}

/* ====== 内容层 ====== */
.holo-popup-card .holo-inner {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 24px;
    transform: translateZ(30px);
}

/* 标题 */
.holo-popup-card .holo-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #ff0080, #00bfff, #00ffc8, #8a2be2, #ff0080);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: cyber-text 4s ease-in-out infinite;
}
@keyframes cyber-text {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* 按钮区 */
.holo-popup-card .holo-btns {
    display: flex;
    gap: 12px;
    transform: translateZ(20px);
}
.holo-popup-card .holo-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.holo-popup-card .holo-btn svg {
    width: 13px;
    height: 13px;
}

/* 官方频道按钮 - 渐变主按钮 */
.holo-popup-card .holo-btn-ch {
    background: linear-gradient(135deg, #ff0080, #8a2be2);
    color: #fff;
    box-shadow: 0 3px 12px rgba(255,0,128,.25);
}
.holo-popup-card .holo-btn-ch::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
    transition: left .5s ease;
}
.holo-popup-card .holo-btn-ch:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,0,128,.4);
}
.holo-popup-card .holo-btn-ch:hover::before {
    left: 100%;
}

/* 官方群按钮 - 玻璃描边按钮 */
.holo-popup-card .holo-btn-qq {
    background: linear-gradient(135deg, rgba(0,191,255,.12), rgba(0,255,200,.12));
    color: rgba(255,255,255,.9);
    border: 1px solid rgba(0,191,255,.2);
}
.holo-popup-card .holo-btn-qq:hover {
    background: linear-gradient(135deg, rgba(0,191,255,.2), rgba(0,255,200,.2));
    border-color: rgba(0,191,255,.4);
    transform: translateY(-2px);
}

/* APP下载按钮 - 玻璃描边按钮（与官方群一致） */
.holo-popup-card .holo-btn-app {
    background: linear-gradient(135deg, rgba(0,255,200,.12), rgba(138,43,226,.12));
    color: rgba(255,255,255,.9);
    border: 1px solid rgba(0,255,200,.2);
}
.holo-popup-card .holo-btn-app:hover {
    background: linear-gradient(135deg, rgba(0,255,200,.2), rgba(138,43,226,.2));
    border-color: rgba(0,255,200,.4);
    transform: translateY(-2px);
}

/* 关闭按钮 */
.holo-popup-card .holo-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    border: none;
    color: rgba(255,255,255,.35);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
    transform: translateZ(35px);
}
.holo-popup-card .holo-close:hover {
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.7);
}

/* ============ 移动端适配 ============ */
@media (max-width: 575.98px) {
    .io-holo-popup {
        bottom: 80px;
        width: calc(100% - 24px);
        max-width: none;
    }
    .holo-popup-card .holo-inner {
        padding: 22px 20px;
    }
    .holo-popup-card .holo-title {
        font-size: 18px;
    }
    .holo-popup-card .holo-btn {
        padding: 7px 18px;
        font-size: 12px;
    }
    .holo-popup-card .holo-btns {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .holo-popup-card .k-rotate1,
    .holo-popup-card .k-rotate2,
    .holo-popup-card .k-shine,
    .holo-popup-card .k-facet,
    .holo-popup-card .k-sparkle::before,
    .holo-popup-card .k-border,
    .holo-popup-card .holo-title {
        animation: none;
    }
    .io-holo-popup {
        transition: opacity .3s ease;
    }
    .holo-popup-card {
        transform: none !important;
    }
}
