
#game-ui {
  width: 960px;
  height: 768px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background-color: black;
  font-family: 'Press Start 2P', monospace;
}
#ui-top {

  height: 81px;
  background-color: #111;
  color: white;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
#left-controls, #right-controls {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.control-icon {
  font-size: 20px;
  cursor: pointer;
  color: white;
  text-decoration: none;
}
#speed-slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #222;
  padding: 8px;
  border-radius: 8px;
  z-index: 100;
}
#speed-slider-container.hidden {
  display: none;
}
#ui-scene {
  height: 435px;
  position: relative;
  overflow: hidden;
}
#background-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url('assets/background.png');
  background-size: cover;
  image-rendering: pixelated;
}
#avatar-layer {
  position: absolute;
  bottom: 0;
  image-rendering: pixelated;
  transform: scale(3);
  transform-origin: top left;
  pointer-events: none;
}
#speech-bubble {
  position: absolute;
  color: white;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  text-shadow:
    -2px -2px 0 #000,
     2px -2px 0 #000,
    -2px  2px 0 #000,
     2px  2px 0 #000;
  width: 320px;
  transform: translateX(-50%);
  z-index: 10;
}
.speech-bubble.player {
  position: absolute;
  color: limegreen;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  text-shadow:
    -2px -2px 0 #000,
     2px -2px 0 #000,
    -2px  2px 0 #000,
     2px  2px 0 #000;
  width: 320px;
  transform: translateX(-50%);
  z-index: 10;
}
#ui-dialogue {
  height: 252px;
  background-color: rgba(0, 0, 0, 0.85);
  color: limegreen;
  padding: 20px;
  font-size: 12px;
  line-height: 1.6;
}
.dialogue-option {
  cursor: pointer;
  margin: 5px 0;
  color: #00FF00;
}
.dialogue-option:hover {
  color: #FFFF00;
}


.speech-bubble.avatar {
  color: #00FF00;
  text-shadow:
    -2px -2px 0 #000,
     2px -2px 0 #000,
    -2px  2px 0 #000,
     2px  2px 0 #000;
}


#toolbar-container {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  transition: transform 0.3s ease;
}

#mobile-controls {
  display: flex;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px;
}

#toolbar-handle {
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
}

#toolbar-container.hidden {
  transform: translateY(-100%);
}

@media screen and (max-height: 500px) and (orientation: landscape) {
  #toolbar-container.hidden #toolbar-handle {
    display: block;
  }
}

@media screen and (min-height: 501px) {
  #toolbar-container {
    transform: translateY(0);
  }
}

#rotate-warning {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  color: white;
  font-size: 18px;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  text-align: center;
  padding: 1em;
}
