/* styles.css */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #000;
    color: #fff;
    font-family: Arial, sans-serif;
}

#game-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: 20px; /* Keep some padding for larger screens */
    box-sizing: border-box;
}

#game-canvas {
    border: 1px solid #fff;
    display: flex; /* Prevent extra bottom margin */
}

#game-info {
    position: absolute;
    top: 10px;
    left: 10px;
    text-align: left; /* Align game info text to the left */
}

#controls {
    display: flex;
    justify-content: space-between;
    margin-top: 10px; /* Space above controls */
    width: 100%; /* Controls take full width of container */
    max-width: 300px; /* Match canvas width */
}

.touch-button {
    flex: 1; /* Make buttons take equal space */
    padding: 12px 0; /* Fixed padding for desktop and base for mobile */
    margin: 0 5px;      /* Fixed margin for desktop and base for mobile */
    font-size: 16px;    /* Fixed font size for desktop and base for mobile */
    border: none;
    border-radius: 8px;
    background-color: #555;
    color: white;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    min-width: 60px;   /* Minimum width for buttons */
    text-align: center;
    display: flex;        /* Use flexbox for button content centering */
    justify-content: center; /* Center horizontally */
    align-items: center;     /* Center vertically */
    line-height: 1;        /* Reset line-height to ensure vertical centering */
}

.touch-button:active {
    background-color: #777;
}

/* --- Media Query for Mobile Devices (adjust breakpoint as needed) --- */
@media (max-width: 600px) { /* Example breakpoint for smaller screens */
    #game-container {
        padding-top: 10px; /* Reduced top padding on mobile */
        padding-bottom: 10px; /* Reduced bottom padding on mobile */
    }

    .touch-button {
        padding: 3vw 0; /* Further reduced vertical padding on mobile buttons */ /* Reduced to make buttons less tall */
        margin: 0 2vw;
        font-size: 4vw;
        min-width: 0;
    }

    #game-info {
        margin-bottom: 5px;
        font-size: 0.9em;
    }

    #controls {
        margin-top: 5px;
    }
}

.soldier {
    background-image: url('soldier.png');
    width: 50px;
    height: 50px;
}

.horde {
    background-image: url('horde.png');
    width: 30px;
    height: 30px;
}

.boss {
    background-image: url('boss.png');
    width: 50px;
    height: 50px;
}

.chest {
    background-image: url('chest.png');
    width: 40px;
    height: 40px;
}

.shot {
    background-image: url('big.png');
    width: 20px;
    height: 20px;
}

#highscore-container {
    margin-top: 20px;
    text-align: left;
    width: fit-content;
}

#highscore-list {
    list-style-type: none;
    padding: 0;
}

#highscore-list li {
    background-color: #333;
    margin: 5px 0;
    padding: 10px;
    border-radius: 5px;
}