html, body {
  margin: 0;
  padding: 0;
}
#game-ui {
  display: flex;
  flex-direction: column;
  width: 100vw;
  margin-bottom: 20px;
}
#game-header {
  flex-shrink: 0;
  color: white;
  background: rgba(0,0,0,0.6);
}
#game-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#loading-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: all;
  color: #ffffff;
}

#rotate-overlay {
  display:none;
  position:absolute;
  width: 100vw;
  color:#fff;
  z-index:9999;
  font-size:2em;
  text-align:center;
}
canvas#gameCanvas {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 1200px;
  max-height: calc(100vh - var(--header-height, 0px));
  height: auto;
  border-radius: 10px;
}
.flexy-container {
  display: flex;
  gap: 2em;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}
#game-instructions {
  margin: 1.3em auto 0 auto;
  border-radius: 10px;
  background-color: #0b74bf;
  color: #ffffff;
  max-width: 900px;
  width: 80%;
  font-size: 1.14em;
  padding: 1em 1.4em;
  text-align: center;
}
#game-instructions p {
  color: #ffffff;
  font-size: 0.96em;
}
.leaderboard {
  min-width: 200px;
  max-width: 260px;
  flex: 1 0 220px;
  border-radius: 9px;
  padding: 1em;
  margin-bottom: 0;
}
.instructions {
  flex: 2 1 380px;
  min-width: 220px;
  max-width: 600px;
  padding: 1em 0 1em 2em;
}
@media (max-width: 700px) {
  .flexy-container {
    flex-direction: column;
    gap: 1.2em;
    align-items: stretch;
    text-align: center;
  }
  .instructions {
    padding: 1em 0 0.5em 0; 
    max-width: 100%;
    min-width: 0;    
    width: 100%;
    box-sizing: border-box;
  }
  .leaderboard {
    max-width: 100%;
  }
}



#toast {
  display:none;
  position:fixed;
  left:50%;
  bottom:64px;
  transform:translateX(-50%);
  background:#222;
  color:#fff;
  padding:16px 36px;
  border-radius:18px;
  font-size:22px;
  box-shadow:0 2px 18px #000;
  opacity:0;transition:opacity 0.44s;
}