html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Sour Gummy';
  background: #111;
  color: white;
}


#game-layout {
  display: flex;
  height: 100%;
}

#game-canvas {
  flex: 1;
  display: block;
  background: #222;
  min-width: 0;
}

#ui-panel {
  width: 30vw;
  flex-shrink: 0; /* prevents panel from shrinking offscreen */
  background: #1a1a1a;
  padding: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: auto;
  box-sizing: border-box; /* prevents padding from increasing width */
}
.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;

  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}


.tutorial-popup {
  width: 80%;
  background: #222;
  border: 2px solid rgb(114, 114, 114);
  border-radius: 5px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tutorial-popup-message {
  font-size: 1.2em;
  white-space: pre-line;
}

.tutorial-ok-btn {
  align-self: flex-end;
  border-radius: 5px;
  padding: 8px 16px;
  font-size: 1em;
}

.tutorial-reminder {
  background: rgb(25, 47, 94);
  border-radius: 5px;
  padding: 5px;
  font-size: 1.1em;
  margin-bottom: 10px;
  white-space: pre-line;
}

.hidden {
  display: none;
}
.fade-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* Prevent clicks while hidden */
}


button {
  margin: 5px 0;
  padding: 8px;
  font-size: 1em;
  background: #04e94d;
  color: rgb(0, 0, 0);
  border-radius: 5px;
  font-family: 'Sour Gummy';
  border: none;
  cursor: pointer;
  
}

button:active {
  background-color: rgb(44, 154, 0);
  transform: translateY(2px); /* Creates a slight "pressed" effect */
}

button:disabled {
  background: #555;
  color: rgb(212, 212, 212);
  cursor: not-allowed;
}


#stats-dropdown {
  background: #2a2a2a;
  border-radius: 5px;
  padding: 5px;
  margin-top: 10px;
  color: white;
}

#stats-content {
  padding: 5px;
}

#pop-graph {
  background: #111;
  border: 1px solid #444;
  display: block;
  margin-top: 5px;
}

label {
  user-select: none;
  font-size: 1em;
  margin: 10px 0;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}


#life-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

#life-table th, #life-table td {
  border: 1px solid #444;
  padding: 4px 6px;
  text-align: center;
}

#life-table th {
  background-color: #333;
}