#particles-js {
  width: 100%§;
  height: 100%;
  position: fixed;
}

/* default to small screens */
#wrapper {
  position: relative;
  display: grid;
  grid-template-columns: 1fr; /* single column layout */
}

/* MAIN SECTIONS */
main {
  margin-top: 1em;
  display: flex;
  justify-content: center;
}

section {
  display: flex;
  flex-direction: column;
  max-width: 800px;
  width: 100%;
}

header {
  text-align: center;
  padding: 10px;
}

nav {
  padding: 5px;
}
.nav-ul {
  padding: 0;
  margin: 0;
  display: flex; /* Arrange items in a row by default */
  flex-wrap: wrap; /* Allow wrapping to multiple lines if necessary */
}
.nav-li {
  flex: 1; /* Make each list item take up equal space */
  text-align: center; /* Center the text inside the box */
  text-transform: capitalize;
}
.nav-li a {
  display: block; /* Allow hover styles to apply to the entire box */
  padding: 1em;
}

aside {
  padding: 10px;
  margin-top: 10px;
}

footer {
  padding: 10px;
  margin-top: 10px;
}

tbody {
  text-align: left;
}

li {
  text-align: left;
}
/* ------------------- */

/* contains: gameContainer, aside */
#gameInfoContainer {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
}

/* contains: startButton, gameCanvas, shopWindow, finishedGameWindow */
#canvasContainer {
  position: relative;
  display: inline-block;
  max-width: 500px;
  margin: auto;
  overflow: hidden;
}

#gameCanvas {
  max-width: 100%;
}

/* contain: gameInventory & gameButtons */
#gameControls {
  display: none; /* Initially hidden */
  justify-content: space-between; /* Pushes items to the edges */
  align-items: center;
}
/* inventory, funds & fuel display */
#gameInventory {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
/* pause, play & map buttons */
#gameButtons {
  display: flex;
  flex-direction: row;
}

#startButton,
#finishedGameWindow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Center button */
  z-index: 20;
}
#finishedGameWindow {
  display: none;
}

/* shop */
#shopWindow {
  position: absolute;
  top: 0;
  left: -500px; /* Off-screen initially */
  height: 100%;
  transition: left 1s ease-in-out;
  z-index: 100;
  padding: 20px;
  box-sizing: border-box;
}
#shopWindow.open {
  left: 0; /* Slide it in */
}

#shopWrapper {
  display: flex;
}
#shopButtonContainer {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 1em;
}
#shopInfoContainer {
  margin: 1em;
  display: flex;
  flex-direction: column;
  gap: 1em;
}
#fuelInfoHeader,
#resourceInfoHeader {
  margin: 0;
}

/* map */
#modalContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  overflow: hidden; /* prevent background scroll */
}
#mapContainer {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}
#mapScrollWrapper {
  max-width: 80vw;
  max-height: 90vh;
  overflow: auto; /* allow scrolling if needed */
  position: relative;
}
#mapImage {
  display: block;
  max-width: none;
  max-height: none;
}

/* medium screens */
@media only screen and (min-width: 800px) {
  /* canvas and aside in a row */
  #gameInfoContainer {
    flex-direction: row;
  }

  #canvasContainer {
    flex: 2;
  }

  aside {
    flex: 1;
    margin-left: 10px;
    margin-top: 0;
  }
}

/* large screen */
@media only screen and (min-width: 1200px) {
  #wrapper {
    max-width: 1300px;
    margin: auto;
    grid-template-columns: 1fr 4fr; /* two columns */
  }
  header,
  footer {
    grid-column: 1 / 3; /* full width */
  }
  nav {
    margin-top: 1em;
    padding-top: 0em;
    width: 100%;
    margin-bottom: 0em;
    grid-column: 1; /* nav will occupy the first column */
  }

  main {
    grid-column: 2; /* main will occupy the second column */
  }

  .nav-ul {
    padding-top: 1em;
    flex-direction: column; /* Switch to column layout for large screens */
  }
  .nav-li {
    margin-bottom: 1em;
    text-align: left;
  }
}
