/* General Styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-image: url('images/backyard-barnyard.webp');
    background-attachment: fixed;
    background-size: cover;
    color: #333;
    position: relative;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: 'Chewy', cursive;
}

p {
    font-size: 1.2em;
}

/* Content Container for Title and Intro */
.content-container {
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
    padding: 20px;
    margin: 20px auto;
    max-width: 800px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Animated Chicken */
.chicken-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

#chicken {
    position: absolute;
    left: -200px;
    top: 50px;
    width: 150px;
    animation: moveChicken 10s linear infinite;
    transform: scaleX(-1); /* Flip the chicken */
}

@keyframes moveChicken {
    0% {
        left: -200px;
    }
    100% {
        left: calc(100% + 200px);
    }
}

#chicken:hover {
    animation-play-state: paused;
}

/* Canvas Styling */
#background-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Behind content */
    pointer-events: none; /* Allow clicks to pass through */
}

/* Games Section */
.games {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 50px 0;
    position: relative;
    z-index: 2;
}

.game {
    margin: 20px;
    text-align: center;
}

.game img {
    width: 300px;
    height: auto;
    border: 5px solid #ffd700;
    border-radius: 10px;
}

.game-content {
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
    padding: 15px;
    border-radius: 10px;
    margin-top: -10px; /* Slight overlap with the image */
}

.game-content h2 {
    font-family: 'Chewy', cursive;
    margin-top: 10px;
}

.game-content p {
    font-size: 1.1em;
    color: #333;
}

.game-content a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #000000;
    color: #ffd700;
    text-decoration: none;
    border-radius: 5px;
}

.game-content a:hover {
    background-color: #ffd700;
}

/* Fox Pop-Up */
#fox {
    position: absolute;
    width: 200px;
    display: none;
    cursor: pointer;
    z-index: 1000;
}

/* Background Music Control */
#music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    background-color: #ffcc00;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 3; /* Add this line */
}

#music-control:hover {
    background-color: #ffd700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .games {
        flex-direction: column;
        align-items: center;
    }

    .game img {
        width: 80%;
    }
}
