/* The page is just the game canvas with menus floating on top of it. */

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;            /* no scroll bars */
  background: #14181c;
  color: #e8ecef;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  user-select: none;           /* dragging the mouse should not highlight text */
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: crosshair;
}

/* An overlay covers the whole screen and centers a panel in the middle. */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 13, 16, 0.78);
  padding: 16px;
  overflow-y: auto;
}

/* Adding the "hidden" class makes a menu disappear. */
.hidden { display: none; }

.panel {
  background: #222a31;
  border: 3px solid #3d4a55;
  border-radius: 12px;
  padding: 24px 32px;
  width: min(560px, 100%);
  text-align: center;
  box-sizing: border-box;
  margin: auto;
}

h1 {
  margin: 0 0 12px;
  font-size: 44px;
  letter-spacing: 3px;
  color: #ffd24a;
}

h2 {
  margin: 18px 0 8px;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9fb0bd;
}

button {
  font: inherit;
  font-size: 17px;
  color: #e8ecef;
  background: #33404b;
  border: 2px solid #4b5c69;
  border-radius: 8px;
  padding: 10px 18px;
  margin: 4px;
  cursor: pointer;
}
button:hover { background: #3f4f5c; }

button.big {
  display: block;
  width: 100%;
  margin: 20px 0 8px;
  font-size: 22px;
  font-weight: bold;
  color: #1b1f23;
  background: #ffd24a;
  border-color: #ffe38c;
}
button.big:hover { background: #ffdf7a; }

.choices { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.choice { flex: 1; min-width: 120px; margin: 0; }
.choice.selected {
  background: #2f6fd0;
  border-color: #7fb0ff;
  font-weight: bold;
}

.help {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #9fb0bd;
  display: grid;
  gap: 8px;
}

/* ----- Shop ----- */
#shopCredits { font-size: 20px; color: #ffd24a; margin-bottom: 12px; }
#shopMessage { min-height: 22px; margin: 8px 0; color: #8fe38f; }

.shop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 6px 0;
  text-align: left;
  box-sizing: border-box;
}
.shop-item .key {
  background: #14181c;
  border-radius: 6px;
  padding: 2px 9px;
  font-weight: bold;
}
.shop-item .info { flex: 1; }
.shop-item .info small { display: block; color: #9fb0bd; font-size: 13px; }
.shop-item .price { color: #ffd24a; font-weight: bold; white-space: nowrap; }
.shop-item.owned { opacity: 0.55; }
.shop-item.too-expensive .price { color: #ff7a6b; }

/* ----- Game over ----- */
#gameoverStats { font-size: 20px; line-height: 1.7; }

/* The volume sliders in the pause menu: name, slider, percent - in three columns. */
.sound-controls {
  display: grid;
  grid-template-columns: auto 1fr 48px;
  gap: 10px 12px;
  align-items: center;
  margin: 14px 0 8px;
  text-align: left;
  color: #9fb0bd;
}
.sound-controls input[type="range"] {
  width: 100%;
  accent-color: #ffd24a;
  cursor: pointer;
}
.sound-controls span { text-align: right; }

/* "Made by..." line under the title and on the game-over screen. */
.credit {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffd24a;
  opacity: 0.85;
}
.game-title { margin-bottom: 4px; }
#gameover .credit { margin-top: 16px; }
