body {
    background-color: black;
    margin: 0;
    min-height: 100vh; /* Ensure the background covers the entire viewport height */
    overflow: hidden; /* Hide scrollbars if player moves out of bounds slightly */
    display: flex; /* Use flex to center the container */
    flex-direction: column; /* Stack items vertically */
    justify-content: center;
    align-items: center;
}

#header {
    margin-bottom: 20px; /* Space between logo and game container */
    padding-top: 20px; /* Ensure space from the top edge */
    display: flex; /* To align HP display and logo */
    flex-direction: column; /* Stack logo and other header elements */
    align-items: center;
    position: relative; /* Context for absolute positioning if needed */
}

#logo {
    width: 150px; /* Adjust size as needed */
    height: auto;
    image-rendering: pixelated;
}

#hp-display {
    color: red;
    font-family: monospace; /* Use a distinct font for game info */
    font-size: 24px;
    margin-top: 10px;
    text-shadow: 1px 1px 2px black;
}

#game-container {
    position: relative;
    /* Use fixed size or calculated size based on desired arena size */
    width: 600px; /* Example size for the game area */
    height: 600px; /* Example size for the game area */
    /* Center is achieved via body flex properties */
    overflow: visible; /* Allow projectiles to start slightly outside the container top edge */
}

#arena {
    position: absolute;
    width: 90%; /* Make the arena slightly smaller than the container */
    height: 90%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid white; /* White outline */
    border-radius: 50%; /* Circle shape */
    box-sizing: border-box; /* Include border in size calculation */
}

#player {
    position: absolute;
    width: 32px; /* Set a reasonable size for the player sprite */
    height: 32px;
    image-rendering: pixelated; /* Maintain pixel art look */
    /* Initial position will be set by JS */
    /* top: 0; */ /* Removed */
    /* left: 0; */ /* Removed */
    /* Removed transform: translate(-50%, -50%) */
    z-index: 10;
}

.projectile {
    position: absolute;
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    pointer-events: none; /* Make sure projectiles don't interfere with interaction */
    /* Position and transform set by JS */
}

.bone-projectile {
    position: absolute;
    width: 90px; /* Increased size to be longer */
    height: 30px; /* Kept height */
    image-rendering: pixelated;
    pointer-events: none;
    z-index: 5;
}

.flag-projectile {
    position: absolute;
    width: 70px; /* Define a size for the flag */
    height: 50px;
    image-rendering: pixelated;
    pointer-events: none;
    z-index: 5;
    /* Position and transform set by JS */
}

.robux-projectile {
    position: absolute;
    width: 30px; /* Size defined in JS constant ROBUX_SIZE */
    height: 30px;
    image-rendering: pixelated;
    pointer-events: none;
    z-index: 6; /* Slightly higher z-index than flags/bones maybe */
}

/* New styles for damage effect */
#damage-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    pointer-events: none; /* Should not block interaction */
    background-color: rgba(255, 0, 0, 0.1); /* Subtle red flash effect */
}

#dog-damage-img {
    width: 200px;
    height: auto;
    opacity: 0; /* Hidden by default, only visible briefly when damage is applied */
    transition: opacity 0.05s ease-out;
}

/* New styles for death effect */
#death-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none; /* Hidden by default */
    justify-content: flex-start; /* Align to top left */
    align-items: flex-start;
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
}

#rickroll-gif {
    width: 300px; /* Large enough to be prominent */
    height: auto;
    /* Already aligned to top-left due to parent flex properties */
}