/* ===================================
   balloons.css — 气球样式和漂浮动画
   =================================== */

.balloons-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    z-index: 2;
    pointer-events: none;
}

/* 气球整体容器 */
.balloon {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
    transition: filter 0.3s ease;
}

.balloon:hover {
    filter: brightness(1.1);
}

/* 气球椭圆身体 */
.balloon-body {
    width: 60px;
    height: 75px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    position: relative;
    box-shadow:
        inset -8px -8px 20px rgba(0,0,0,0.08),
        inset 4px 4px 12px rgba(255,255,255,0.5),
        0 8px 24px rgba(0,0,0,0.1);
}

/* 气球高光 */
.balloon-body::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 22%;
    width: 22%;
    height: 18%;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    transform: rotate(-20deg);
}

/* 气球结（下方小三角） */
.balloon-knot {
    width: 14px;
    height: 14px;
    margin: -4px auto 0;
    background: inherit;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    position: relative;
    z-index: -1;
}

/* 气球线 */
.balloon-string {
    width: 1.5px;
    height: 80px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.6);
    transform-origin: top center;
    animation: string-sway 3s ease-in-out infinite;
}

@keyframes string-sway {
    0%, 100% { transform: rotate(-3deg); }
    50%      { transform: rotate(3deg); }
}

/* 气球漂浮（每个气球有微小的上下浮动差异） */
@keyframes balloon-float-1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-15px) rotate(2deg); }
    75%      { transform: translateY(8px) rotate(-2deg); }
}

@keyframes balloon-float-2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    30%      { transform: translateY(-20px) rotate(-3deg); }
    70%      { transform: translateY(10px) rotate(2deg); }
}

@keyframes balloon-float-3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    40%      { transform: translateY(-12px) rotate(1deg); }
    60%      { transform: translateY(-5px) rotate(-1deg); }
    80%      { transform: translateY(-18px) rotate(3deg); }
}

/* 气球破裂效果 */
@keyframes balloon-pop {
    0%   { transform: scale(1); opacity: 1; }
    50%  { transform: scale(1.3); opacity: 0.5; }
    100% { transform: scale(0); opacity: 0; }
}

.balloon.popping {
    animation: balloon-pop 0.3s ease-out forwards;
}
