#levelHeaderLine {
  display:flex;
  flex-flow:row wrap;
  margin-bottom: 0;
  height: 2.5em;
}

#scoreLine {
  margin-top: 0.2em;
  display:flex;
  justify-content: space-between;
}

#scoreText {
  line-height: 1em;
  padding-bottom: 1.2em;
  width: 70%;
}

.alignLeft {
  width: 33.33333%;
  text-align: left;
}

.alignCenter {
  width: 33.33333%;
  text-align: center;
}

.alignRight {
  width: 33.33333%;
  text-align: right;
  display: flex;
  justify-content: flex-end;
}

.verticalBottom {
  display: flex;
  align-items: flex-end;
}

#levelTitle {
  color: #EEE;
  margin: 0;
  font-family: sans-serif;
  font-size: 20px;
  font-weight: bold;
  vertical-align: top;
}

#muncherGrid table, td {
  border-collapse: collapse;
  border: 1px solid #666;
}

#muncherGrid table {
  table-layout: fixed;
  width: 100%;
  border: 2px solid white;
  background-color: #000080;
}

#muncherGrid {
  position: relative;
}

#muncherGrid td {
  text-align: center;
  vertical-align: middle;
  height: 60px;
  position: relative;
  padding: 0; /* Remove default padding */
  z-index: 3;
}

#muncherGrid .cell-div {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  border: 4px solid transparent;
  box-sizing: border-box;
  z-index: 4;
}

.safe-square {
  border-color: white !important;
}

#livesRemaining {
  width: 30%;
}

#livesRemaining img {
  height: 2em;
}

.muncher-image {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
}

.debugBG {
  background-color: orange;
  transition: background-color 1s;
}

#gameOverlay {
  display: none; /* Hidden by default */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(66.66% - 2px); /* 4 cells wide minus cell border width * 2 */
  height: calc(60% - 2px);
  background-color: #000080;
  color: white;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 100; /* Ensure it's on top */
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#gameOverlay p {
  margin: 5px 0;
  font-size: 1.1em;
}

#gameOverlay.gameOverOverlay {
  background-color: #5A0000;
}

.animation-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  z-index: 2; /* Ensure it's above the muncher */
}

.muncher-animation-sprite {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  pointer-events: none;
  z-index: 1;
}

.troggle-animation-sprite {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  pointer-events: none;
  z-index: 2;
}

.emoji-font-size {
  font-size: 1.8em;
}
