body {
    background: black;
    margin: 0;
    padding: 0;
    font-family: 'Helvetica';
    overflow: hidden; /* Prevent scrollbars */
}

#instructions {
    background-color: rgba(0, 128, 128, 0.8);
    color: white;
    text-align: center;
    padding: 20px;
    margin: 0;
    border: 2px solid white;
    border-radius: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* Ensure it's above everything else */
    max-width: 80%;
    pointer-events: none; /* Allow clicks to pass through */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    font-size: 18px;
    font-weight: bold;
}
#lives {
    position: absolute;
    left: 20px;
    top: 25px;
    padding: 4px;
    color: red;
    font-weight: bold;
}
#score {
    position: absolute;
    left: 20px;
    top: 50px;
    padding: 4px;
    color: yellow;
    font-weight: bold;
}
#gameover {
    display: none;
    max-width: 500px;
    width: 100%;
    margin: 0 auto 30px;
}
#help {
    position: absolute;
    left: 2px;
    bottom: 20px;
    padding: 4px;
    color: white;
}
#try, #totalscore, .mint-nft-button {
    margin: 0;
    padding: 15px 20px;
    border-radius: 4px;
    white-space: nowrap;
    text-align: center;
    min-width: 180px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
#try {
    border: none;
    color: white;
    background-color: green;
    display: none;
    cursor: pointer;
}
#totalscore {
    color: white;
    background-color: blue;
    font-weight: bold;
    font-size: 1.2em;
    opacity: 0.8;
    display: none;
}

#level {
    position: absolute;
    left: 20px;
    top: 0px;
    padding: 4px;
    color: turquoise;
    font-weight: bold;
}

#mute_button {
  background: rgba(66, 184, 221, 0.7);
  color: white;
  border-radius: 4px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  font-size: 125%;
  width: 40px;
  height: 40px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

#mute_button img {
  width: 25px;
  height: 25px;
}

div#volume {
    position: absolute;
    left: 20px;
    bottom: 50px;
    color: turquoise;
    font-weight: bold;
    z-index: 10;
}

#wallet-section {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#connect-wallet {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#connect-wallet:hover {
    background-color: #45a049;
}

#connect-wallet:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#wallet-status {
    color: white;
    font-size: 14px;
    margin-top: 5px;
}

/* Create a container for game over elements */
#endgame {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 800px;
    display: none; /* Hide by default, JavaScript will show it when needed */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
}

/* Create a row container for the game over controls */
#endgame-controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%;
}

/* Add styling for the Mint Score NFT button */
.mint-nft-button {
    border: none;
    color: white;
    background-color: #4CAF50;
    cursor: pointer;
}

/* Style for the WebGL canvas */
canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Ensure canvas is behind UI elements */
}

/* UI elements need to be above the canvas */
#level, #lives, #score, #help, #volume, #wallet-section {
    z-index: 10;
    position: absolute;
    text-shadow: 1px 1px 2px black, 0 0 5px black, 0 0 10px black; /* Text shadow for better visibility */
}
