* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

img, video {
    pointer-events: none;
}
.container {
    width: 100%;
    height: 100vh;
    background-image: url('bg1.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: background-image 0.5s ease-in-out;
}

@keyframes changeBackground {
    0%, 32% {
        background-image: url('bg1.webp');
    }
    33%, 65% {
        background-image: url('bg2.webp');
    }
    66%, 100% {
        background-image: url('bg3.webp');
    }
}

.content {
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1.5rem;
}

.birds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bird {
    position: absolute;
    background-image: url("bird.png");
    background-size: contain;
    width: 100px;
    height: 100px;
    opacity: 0;
    animation: none;
}

.bird.start-flying {
    animation: fly 15s linear infinite;
}

.bird:nth-child(1) { top: 20%; left: -20px; animation-delay: 0s; }
.bird:nth-child(2) { top: 40%; left: -20px; animation-delay: 3s; }
.bird:nth-child(3) { top: 60%; left: -20px; animation-delay: 6s; }
.bird:nth-child(4) { top: 30%; left: -20px; animation-delay: 9s; }
.bird:nth-child(5) { top: 50%; left: -20px; animation-delay: 12s; }

@keyframes fly {
    0% {
        transform: translateX(-20px) translateY(0px) scale(0.3);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 20px)) translateY(-100px) scale(0.3);
        opacity: 0;
    }
}

.animals {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    
    pointer-events: none;
}

.animal {
    position: absolute;
    background-image: url("animal.gif");
    background-size: contain;
    background-repeat: no-repeat;
    width: 80px;
    height: 80px;
    bottom: -9px;
    opacity: 0;
    animation: none;
}

.animal.start-walking {
    animation: walk 200s linear infinite;
}

.animal:nth-child(1) { animation-delay: 0s; }
.animal:nth-child(2) { animation-delay: 26s; }
.animal:nth-child(3) { animation-delay: 32s; }
.animal:nth-child(4) { animation-delay: 58s; }

@keyframes walk {
    0% {
        transform: translateX(-80px) scaleX(1);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    47% {
        transform: translateX(calc(100vw - 80px)) scaleX(1);
    }
    48% {
        transform: translateX(calc(100vw - 80px)) scaleX(-1);
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translateX(-80px) scaleX(-1);
        opacity: 0;
    }
}

.bg-change-btn {
    position: fixed;
    right: 20px;
    top: 8%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 10;
}

.bg-change-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

const backgrounds = ['bg1.webp', 'bg2.webp', 'bg3.webp'];