.mascot-container {
    position: fixed;
    right: 0;
    bottom: 5px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mascot-figure {
    width: 100px;
    height: auto;
    position: relative;
    pointer-events: auto;
    cursor: pointer;
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-right: 10px;
}

.mascot-figure img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.mascot-figure.state-peek {
    width: 70px;
    transform: translateY(40%) scale(0.85);  /* 缩小到85%，向下移动55% */
    transform-origin: bottom right;
    animation: mascotPeekFloat 3s ease-in-out infinite;
}
.mascot-figure.state-peek:hover {
    transform: translateY(20%) scale(0.9);   /* 悬停时多露一点，稍微放大 */
}

.mascot-figure.state-full,
.mascot-figure.state-tip,
.mascot-figure.state-happy,
.mascot-figure.state-warn,
.mascot-figure.state-busy {
    transform: translateY(0);
}

.mascot-figure.state-happy {
    animation: mascotHappyBounce 0.6s ease;
}
.mascot-figure.state-warn {
    animation: mascotWarnShake 0.5s ease;
}
.mascot-figure.state-busy {
    animation: mascotBusyShake 1s linear infinite;
}
.mascot-figure.state-tip {
    animation: mascotTipPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mascot-figure.state-full {
    animation: mascotFullAppear 0.5s ease;
}

.mascot-bubble {
    position: absolute;
    bottom: 110px;
    right: 30px;
    min-width: 180px;
    max-width: 260px;
    background: white;
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border: 1px solid #e2e8f0;
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    word-break: break-word;
}

.mascot-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 40px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.05));
}

.mascot-bubble.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.mascot-bubble.bubble-info { border-top: 3px solid #4a6fa5; }
.mascot-bubble.bubble-success { border-top: 3px solid #10b981; }
.mascot-bubble.bubble-warning { border-top: 3px solid #f59e0b; }
.mascot-bubble.bubble-error { border-top: 3px solid #ef4444; }

.mascot-close {
    display: none !important;
}
.mascot-bubble:hover .mascot-close,
.mascot-figure:hover .mascot-close {
    display: flex;
}

@keyframes mascotPeekFloat {
    0%, 100% { transform: translateY(40%) scale(0.85); }
    50% { transform: translateY(20%) scale(0.85); } 
}
@keyframes mascotHappyBounce {
    0% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-20px) scale(1.05); }
    50% { transform: translateY(0) scale(0.95); }
    70% { transform: translateY(-10px) scale(1.02); }
    100% { transform: translateY(0) scale(1); }
}
@keyframes mascotWarnShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px) rotate(-3deg); }
    40% { transform: translateX(8px) rotate(3deg); }
    60% { transform: translateX(-4px) rotate(-1deg); }
    80% { transform: translateX(4px) rotate(1deg); }
}
@keyframes mascotBusyShake {
    0%, 100% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-3px) rotate(-2deg); }
    75% { transform: translateX(3px) rotate(2deg); }
}
@keyframes mascotTipPop {
    from { transform: translateY(20px) scale(0.8); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes mascotFullAppear {
    from { transform: translateY(30px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .mascot-container { right: 0; }
    .mascot-figure { 
        width: 80px;
        margin-right: 5px;
    }
    .mascot-bubble {
        min-width: 150px;
        max-width: 200px;
        font-size: 12px;
        bottom: 90px;
        right: 5px;
    }
    .mascot-figure.state-peek {
        transform: translateY(60%) scale(0.8);
    }
    @keyframes mascotPeekFloat {
        0%, 100% { transform: translateY(45%) scale(0.8); }
        50% { transform: translateY(40%) scale(0.8); }
    }
}