body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    user-select: none;
    background-color: #000; /* Default background color */
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent scrollbars */
}

#title {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.2); /* Slightly darker background */
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 5px;
    font-size: 18px; /* Slightly larger title */
    font-weight: bold;
    color: white;
    z-index: 10;
    font-family: sans-serif; /* Added a default font */
    padding: 6px;
}

.go-back-btn {
        position: fixed;
        top: 10px;
        right: 10px;
        background-color: rgba(255, 255, 255, 0.2); /* Slightly darker background */
        border: 1px solid rgba(255,255,255,0.5);
        border-radius: 5px;
        color: yellow;
        font-size: 12px;
        cursor: pointer;
        padding: 5px;
    }

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

#ui {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    z-index: 10;
    display: flex;
    flex-direction: column; /* Stack score and lives vertically */
    font-family: sans-serif;
}

#score, #lives {
    margin-bottom: 5px; /* Space between score and lives */
    font-size: 18px;
}

#autoFireBtn {
    margin-top: 10px;
    font-size: 14px;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.2); /* Slightly darker background */
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-family: sans-serif;
}

#mobile-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px; /* Reduced gap on mobile */
    z-index: 10;
}

#mobile-controls button {
    font-size: 24px; /* Larger buttons for touch */
    padding: 15px 30px;
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 10px;
    touch-action: manipulation;
    color: white;
    font-family: sans-serif;
    margin: 10px 45px;
}

#start-screen, #game-over, #pause-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 30px; /* More padding */
    border-radius: 10px;
    text-align: center;
    font-family: sans-serif;
    z-index: 11; /* Ensure it's on top */
}

#start-screen h1 {
    margin-bottom: 15px;
}

#start-screen p {
    margin-bottom: 20px;
    font-size: 16px;
}

#start-btn, #restart-btn, #resume-btn {
    font-size: 18px;
    padding: 12px 24px;
    background-color: #6e6e6e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
}

.hidden {
    display: none;
}

/* Hide mobile controls on larger screens */
/* @media (min-width: 768px) { */
/*    #mobile-controls { */
/*        display: none; */
/*    } */
/*} */


/* Styles for promo codes display */
#promo-codes {
    position: absolute;
    top: 52px;
    right: 10px;
    z-index: 10;
    color: white;
    font-family: sans-serif;
}

#promo-codes .promo-code {
    margin-bottom: 5px;
    font-size: 12px;
    background-color: rgba(60, 249, 26, 0.62); /* Semi-transparent green background */
    padding: 5px 10px;
    border-radius: 5px;
}

/* Styles for the game message */
#game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px;
    border-radius: 10px;
    text-align: center;
    font-family: sans-serif;
    z-index: 20; /* Ensure it's on top of everything */
    display: none; /* Initially hidden */
    /* background-image: url('/backg22.png'); / Replace with your image path */
    /* background-size: cover; / Cover the entire element */
    /* background-position: center; / Center the background image */
}

#message-text {
    font-size: 16px;
    margin-bottom: 10px;
    display: block; /* Ensure it takes up the full width for text animation */
}

#countdown {
    font-size: 18px;
    color: #FFD700; /* Gold color for countdown */
}