@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Press Start 2P', cursive;
  background-color: black;
  color: #00ffcc;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto; /* ✅ allows scrolling when window is shorter */
  padding-bottom: 60px; /* space for footer */
}

.robot-image {
  width: 60%;
  max-width: 600px;
  height: auto;
  margin-top: 50px;
  flex-shrink: 0; /* ✅ prevents image from collapsing */
}

/* Dialogue box scales with screen */
.dialogue-box {
  background-color: #333;
  color: white;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
  font-size: 18px;
  width: 80%;
  max-width: 500px;
  box-sizing: border-box;
  word-wrap: break-word;
  flex-shrink: 0; /* ✅ ensures text box stays visible */
}

/* Buttons scale and wrap */
.button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 18px;
  background-color: #00ffcc;
  color: black;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.button:hover {
  background-color: #00cc99;
  transform: scale(1.05);
}

.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* ✅ allows buttons to wrap on smaller screens */
  gap: 20px;
  flex-shrink: 0;
}

/* Keep Play Game button centered */
#gameButton {
  display: none;
  margin-top: 20px;
}

#gameButtonContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  flex-shrink: 0;
}

/* Footer always visible or scrolls into view */
footer {
  margin-top: auto;
  font-size: 14px;
  color: white;
  padding: 10px;
  text-align: center;
  width: 100%;
  flex-shrink: 0;
}

/* 📱 Responsive Adjustments */
@media (max-width: 768px) {
  .robot-image {
    width: 80%;
    margin-top: 30px;
  }

  .dialogue-box {
    width: 90%;
    font-size: 14px;
    padding: 15px;
  }

  .button {
    width: 80%;
    font-size: 14px;
  }

  footer {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .robot-image {
    width: 90%;
  }

  .dialogue-box {
    width: 95%;
    font-size: 12px;
  }

  .button {
    width: 90%;
    font-size: 12px;
    padding: 8px 12px;
  }

  footer {
    font-size: 10px;
  }
}
