/* Май: большая бабочка (редкое событие) */

#mayButterflyLayer {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
    background: transparent;
}

.may-btf {
    position: absolute;
    pointer-events: none;
    z-index: 20;
    left: -180px;
    top: var(--start-y, 30%);
    animation: mayBtfFlyAcross var(--fly-dur, 14s) ease-in-out forwards;
    opacity: 0;
}

@keyframes mayBtfFlyAcross {
    0% { transform: translateX(0) translateY(0); opacity: 0; }
    3% { opacity: 1; }
    10% { transform: translateX(10vw) translateY(-25px); }
    25% { transform: translateX(25vw) translateY(10px); }
    45% { transform: translateX(45vw) translateY(-30px); }
    65% { transform: translateX(65vw) translateY(15px); }
    85% { transform: translateX(85vw) translateY(-10px); opacity: 1; }
    95% { opacity: 0.5; }
    100% { transform: translateX(110vw) translateY(0); opacity: 0; }
}

.may-btf-body {
    position: relative;
    width: 30px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.may-btf-head {
    width: 20px;
    height: 20px;
    background: #2d1e0f;
    border-radius: 50%;
    margin-bottom: 2px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.may-btf-head::before,
.may-btf-head::after {
    content: '';
    position: absolute;
    top: -14px;
    width: 12px;
    height: 16px;
    border: 2px solid #2d1e0f;
    border-radius: 50%;
    border-bottom: none;
    border-left: none;
}

.may-btf-head::before {
    left: -4px;
    transform: rotate(-20deg);
}

.may-btf-head::after {
    right: -4px;
    transform: rotate(20deg);
}

.may-btf-thorax {
    width: 18px;
    height: 25px;
    background: #3e2a14;
    border-radius: 40%;
    margin-bottom: 2px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.may-btf-abdomen {
    width: 16px;
    height: 30px;
    background: #3e2a14;
    border-radius: 40%;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.may-btf-wings {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 120px;
    height: 100px;
    animation: mayBtfFlapWings 0.6s ease-in-out infinite alternate;
    transform-origin: center 30px;
}

@keyframes mayBtfFlapWings {
    0% { transform: translateX(-50%) rotateX(20deg) scaleY(0.9); }
    100% { transform: translateX(-50%) rotateX(-25deg) scaleY(1.1); }
}

.may-btf-wing {
    position: absolute;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.5),
        inset 0 0 15px rgba(255, 255, 200, 0.6);
    border: 2px solid rgba(200, 100, 0, 0.6);
}

.may-btf-wing.may-btf-wing--fore-left {
    width: 70px;
    height: 50px;
    top: 0;
    left: 45px;
    border-radius: 80% 20% 60% 20%;
    background: linear-gradient(135deg, #ffcc4d 0%, #ff8c00 40%, #ff6600 100%);
    transform: rotate(-20deg);
    transform-origin: 100% 50%;
}

.may-btf-wing.may-btf-wing--fore-right {
    width: 70px;
    height: 50px;
    top: 0;
    right: 45px;
    border-radius: 20% 80% 20% 60%;
    background: linear-gradient(225deg, #ffcc4d 0%, #ff8c00 40%, #ff6600 100%);
    transform: rotate(20deg);
    transform-origin: 0% 50%;
}

.may-btf-wing.may-btf-wing--hind-left {
    width: 60px;
    height: 45px;
    bottom: 0;
    left: 5px;
    border-radius: 60% 20% 50% 20%;
    background: linear-gradient(135deg, #ff9944 0%, #ff5500 100%);
    transform: rotate(-10deg);
    transform-origin: 100% 50%;
}

.may-btf-wing.may-btf-wing--hind-right {
    width: 60px;
    height: 45px;
    bottom: 0;
    right: 5px;
    border-radius: 20% 60% 20% 50%;
    background: linear-gradient(225deg, #ff9944 0%, #ff5500 100%);
    transform: rotate(10deg);
    transform-origin: 0% 50%;
}

.may-btf-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 200, 0.8);
    border-radius: 50%;
    animation: mayBtfSparkleFloat 2s ease-out forwards;
    opacity: 0;
    pointer-events: none;
}

@keyframes mayBtfSparkleFloat {
    0% { transform: translate(0, 0) scale(1); opacity: 0.9; }
    100% {
        transform: translate(var(--sx, 30px), var(--sy, -40px)) scale(0);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    #mayButterflyLayer {
        display: none;
    }
}
