/* Common Game Elements */
.game-item {
    position: absolute;
    cursor: crosshair;
}

/* Ducks - disappear when shot, move slowly */
.game-duck {
    font-size: 2.5rem;
    animation: moveDuckRightToLeft 20s linear infinite;
}
.game-duck::before {
    content: "🦆";
}
.game-duck-slow {
    animation-duration: 33s;
}

/* Knight and Predator - disappear when shot, normal speed */
.game-knight, .game-predator {
    font-size: 3rem;
    animation: moveRightToLeft 21s linear infinite;
}
.game-knight::before {
    content: "🤺";
}
.game-predator::before {
    content: "🐺";
}

/* Birds - additional bird, dove, and eagle with specific styling */
.game-bird, .game-dove, .game-eagle {
    font-size: 2.5rem;
    animation: moveRightToLeft 16s linear infinite;
    cursor: crosshair;
}
.game-bird::before {
    content: "🐦"; /* Generic bird */
}
.game-dove::before {
    content: "🕊️"; /* Dove */
}
.game-eagle::before {
    content: "🦅"; /* Eagle */
    font-size: 3.3rem; /* Eagle appears larger */
    animation-duration: 13s; /* Faster movement for eagle */
}

.game-bee {
    font-size: 1.7rem;
    animation: moveBeeLeftToRight 9.5s linear infinite;
    cursor: crosshair;
    display: inline-block;
    transform-origin: center;
}

.game-bee::before {
    content: "🐝"; /* Generic bee */
}

/* Clouds - deduct points, float slowly */
.game-cloud {
    background-color: #fff;
    border-radius: 50%;
    opacity: 0.8;
    position: absolute;
    cursor: pointer;
    animation: moveLeftToRight 80s linear infinite;
}
.game-cloud1 { width: 70px; height: 40px; top: 10%; left: 5%; animation-duration: 60s; }
.game-cloud2 { width: 90px; height: 55px; top: 15%; left: 85%; animation-duration: 70s; }
.game-cloud3 { width: 75px; height: 45px; top: 20%; left: 35%; animation-duration: 65s; }
.game-cloud4 { width: 85px; height: 50px; top: 25%; left: 55%; animation-duration: 75s; }
.game-cloud5 { width: 100px; height: 60px; top: 30%; left: 10%; animation-duration: 80s; }

/* Tree - stationary, deducts points when shot */
.game-tree {
    width: 50px;
    height: 80px;
    background-color: #8B4513;
    position: absolute;
    right: 15%;
    bottom: 10%;
    cursor: pointer;
}
.game-tree::before {
    content: '';
    background: #388E3C;
    border: 1px solid black;
    border-radius: 50%;
    height: 80px;
    width: 140px;
    position: absolute;
    bottom: 80px;
    left: -50px;
}

/* Scoreboard */
.game-scoreboard {
    background: #FFD700;
    border: 2px solid #FFC107;
    border-radius: 5px;
    color: #3E2723;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 10px 0;
    padding: 10px;
    text-align: center;
    width: 150px;
    transition: background-color 0.3s ease;
}
.game-scoreboard.increase { background-color: #C8E6C9; } /* Light green for increase */
.game-scoreboard.decrease { background-color: #FFCDD2; } /* Light red for decrease */

/* Game Area Container */
.container-game-castle {
    background: #4CAF50;
    border-radius: 10px;
    height: 80vh;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Animations */
@keyframes moveDuckRightToLeft {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100vw); }
}

@keyframes moveRightToLeft {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100vw); }
}

@keyframes moveLeftToRight {
    0% { transform: translateX(-100vw); }
    100% { transform: translateX(100vw); }
}

/* Animation for bee movement and flip */
@keyframes moveBeeLeftToRight {
    0% {
        transform: translateX(-100vw) scaleX(1); /* Facing right */
    }
    49.9% {
        transform: translateX(0vw) scaleX(1); /* Moving right */
    }
    50% {
        transform: translateX(0vw) scaleX(-1); /* Flip to face left */
    }
    100% {
        transform: translateX(100vw) scaleX(-1); /* Moving left */
    }
}

/* Position the Reset Button */
.reset-button {
    background: radial-gradient(circle, #FFD700 40%, #FFA500);
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 20px;
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    cursor: pointer;
    position: absolute;
    top: 5%;
    right: 2%;
    transition: transform 0.3s;
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.5), 0 0 30px rgba(255, 223, 0, 0.7);
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    z-index: 10; /* Ensures it stays above other game elements */
}

.reset-button:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
    box-shadow: 0 0 20px rgba(255, 223, 0, 0.7), 0 0 40px rgba(255, 223, 0, 0.9);
}

/* Sun rays */
.reset-button::before,
.reset-button::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 223, 0, 0.3), transparent);
    top: -15px;
    left: -15px;
    z-index: -1;
    transform: rotate(45deg);
    animation: rotate 6s linear infinite; /* Slow rotation for a glowing effect */
}

.reset-button::after {
    animation-direction: reverse; /* Reverse rotation for a dynamic effect */
}

/* Rotate animation */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Centered Timer Styling */
.timer {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff8dc; /* Light yellow background */
    border: 2px solid #FFD700;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #3E2723;
    padding: 15px 30px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    z-index: 10; /* Keep it above other elements */
}

/* Flower Decoration */
.timer::before,
.timer::after {
    content: "🌸";
    font-size: 1.5rem;
    color: #FF69B4;
}

/* Flowers around the timer */
.timer .flower-left,
.timer .flower-right {
    position: absolute;
    font-size: 1.2rem;
}

/* Left Flower */
.timer .flower-left {
    left: -30px;
    top: -20px;
    animation: floatFlower 4s ease-in-out infinite;
}

/* Right Flower */
.timer .flower-right {
    right: -30px;
    bottom: -20px;
    animation: floatFlower 4s ease-in-out infinite reverse;
}

/* Floating Animation for Flowers */
@keyframes floatFlower {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
