/* 
 * 气泡汇聚Logo动画样式
 * Version: 2.0
 * 蓝色系主题，白色背景，95%透明度
 */

/* 遮罩层 */
.bubble-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.bubble-overlay.fade-out {
    opacity: 0;
}

/* 容器 */
.bubble-container {
    position: relative;
    width: 900px;
    max-width: 95vw;
    height: 600px;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo包装器 */
.bubble-logo-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Logo主容器 */
.bubble-logo {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 气泡层 */
.bubbles-layer {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 文字层 */
.logo-text-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.9);
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-text-layer.show {
    opacity: 1;
    transform: scale(1);
}

/* 中文文字 - 深蓝色渐变 */
.logo-chinese {
    font-family: "Microsoft YaHei", "苹方-简", "PingFang SC", "华文楷体", "STKaiti", "SimHei", sans-serif;
    font-size: 84px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    color: transparent;
    background: linear-gradient(135deg, #0D47A1 0%, #1976D2 40%, #2196F3 70%, #42A5F5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 
        0 0 20px rgba(33, 150, 243, 0.3),
        2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 12px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(33, 150, 243, 0.2));
    animation: textGlow 3s ease-in-out infinite;
}

.logo-chinese span {
    display: inline-block;
    margin: 0 5px;
    transform-origin: center;
    animation: characterGlow 2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

/* 英文字母 - 深蓝色 */
.logo-english {
    font-family: "Montserrat", "Poppins", "Arial Black", "Impact", sans-serif;
    font-size: 48px;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(135deg, #1565C0 0%, #1E88E5 40%, #1976D2 70%, #0D47A1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 16px;
    text-transform: uppercase;
    margin-top: 15px;
    text-shadow: 
        0 0 15px rgba(21, 101, 192, 0.3),
        1px 1px 2px rgba(0, 0, 0, 0.1);
    filter: drop-shadow(0 0 10px rgba(33, 150, 243, 0.2));
}

.logo-english span {
    display: inline-block;
    animation: letterGlow 2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.05s);
}

/* 文字动画 */
@keyframes textGlow {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(33, 150, 243, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(33, 150, 243, 0.4));
    }
}

@keyframes characterGlow {
    0%, 100% {
        text-shadow: 0 0 15px rgba(33, 150, 243, 0.3);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 30px rgba(33, 150, 243, 0.6);
        transform: scale(1.03);
    }
}

@keyframes letterGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(33, 150, 243, 0.3);
    }
    50% {
        text-shadow: 0 0 25px rgba(33, 150, 243, 0.5);
    }
}

/* 气泡样式 - 蓝色系 */
.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255, 255, 255, 0.9), 
        rgba(33, 150, 243, 0.3)
    );
    box-shadow: 
        0 0 20px currentColor,
        inset 0 0 15px rgba(255, 255, 255, 0.8),
        inset -3px -3px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translate(0, 0) scale(0);
    transition: all 0.3s ease;
    pointer-events: none;
    will-change: transform, opacity;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* 汇聚动画 */
.bubble.animate {
    animation: bubbleConverge var(--animation-duration, 3500ms) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* 最终状态 */
.bubble.final {
    opacity: 1;
    transform: scale(1) translate(0, 0);
    box-shadow: 
        0 0 25px currentColor,
        inset 0 0 15px rgba(255, 255, 255, 0.8),
        inset -3px -3px 8px rgba(0, 0, 0, 0.1);
}

/* 脉冲动画 */
.bubble.pulse {
    animation: bubblePulse 2s ease-in-out infinite;
}

/* 汇聚关键帧 */
@keyframes bubbleConverge {
    0% {
        opacity: 0;
        transform: translate(var(--start-x), var(--start-y)) scale(0.1);
    }
    15% {
        opacity: 0.5;
    }
    30% {
        opacity: 0.8;
        transform: translate(calc(var(--start-x) * 0.4), calc(var(--start-y) * 0.4)) scale(0.3);
    }
    50% {
        opacity: 0.9;
        transform: translate(calc(var(--start-x) * 0.15), calc(var(--start-y) * 0.15)) scale(0.6);
    }
    75% {
        opacity: 1;
        transform: translate(calc(var(--start-x) * 0.05), calc(var(--start-y) * 0.05)) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}

/* 脉冲关键帧 */
@keyframes bubblePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 0 25px currentColor,
            inset 0 0 15px rgba(255, 255, 255, 0.8);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 
            0 0 40px currentColor,
            inset 0 0 25px rgba(255, 255, 255, 1);
    }
}

/* 装饰层 */
.logo-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 2;
}

/* 装饰线 - 蓝色半透明 */
.decoration-line {
    position: absolute;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(33, 150, 243, 0.2), 
        rgba(33, 150, 243, 0.4), 
        rgba(33, 150, 243, 0.2), 
        transparent
    );
    height: 2px;
    width: 80%;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    animation: linePulse 3s ease-in-out infinite;
    border-radius: 2px;
}

/* 装饰圆环 - 蓝色半透明 */
.decoration-ring {
    position: absolute;
    border: 2px solid rgba(33, 150, 243, 0.15);
    border-radius: 50%;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ringRotate 20s linear infinite;
}

.decoration-ring::before,
.decoration-ring::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #2196F3;
    border-radius: 50%;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 15px #2196F3;
}

.decoration-ring::after {
    top: auto;
    bottom: -4px;
}

/* 装饰动画 */
@keyframes linePulse {
    0%, 100% {
        opacity: 0.2;
        transform: translateY(-50%) scaleX(0.9);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50%) scaleX(1.1);
    }
}

@keyframes ringRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .bubble-container {
        height: 500px;
    }
    
    .logo-chinese {
        font-size: 48px;
        letter-spacing: 8px;
    }
    
    .logo-english {
        font-size: 28px;
        letter-spacing: 8px;
    }
    
    .decoration-ring {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .logo-chinese {
        font-size: 36px;
        letter-spacing: 4px;
    }
    
    .logo-english {
        font-size: 20px;
        letter-spacing: 4px;
    }
    
    .bubble-container {
        height: 400px;
    }
}

/* 打印样式 */
@media print {
    .bubble-overlay {
        display: none !important;
    }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .bubble {
        box-shadow: 
            0 0 15px currentColor,
            inset 0 0 12px rgba(255, 255, 255, 0.6);
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .bubble.animate,
    .bubble.pulse,
    .logo-text-layer,
    .decoration-line,
    .decoration-ring {
        animation: none !important;
        transition: none !important;
    }
    
    .bubble.animate {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}