body {
  font-family: "Comic Neue", cursive, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f4f3ee 0%, #d6bdb6 100%);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Vertically center content */
  padding: 40px 20px;
}

.container {
  background-color: #fff;
  padding: 20px 10px;
  margin-top: 5px;
  border-radius: 20px;
  text-align: center;
  width: 70%;
  max-width: 800px;
  animation: popIn 0.6s ease-out;
}

@keyframes popIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

h2 {
  font-size: 42px;
  margin-bottom: 10px;
  color: #2d3436;
}

.button-group {
  display: flex;
  justify-content: space-around;
  margin-bottom: 40px;
}

button {
  background-color: #00cec9;
  color: white;
  border: none;
  padding: 14px 24px;
  font-size: 24px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.3s;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
}

button:hover {
  background-color: #0984e3;
  transform: scale(1.05);
}

#questionOutput {
  display: flex;
  justify-content: center;
  font-size: 30px;
  color: #6c5ce7;
  background-color: #f1f2f6;
  border-radius: 5px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.3s ease-in;
  min-height: 60px;
  padding: 10px;
  width: 84%;
  margin: 0 auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.game-title {
  font-size: 48px;
  font-weight: 800;
  color: #6c5ce7;
  margin-bottom: 10px;
  letter-spacing: 2px;
  text-shadow: 2px 2px #dfe6e9;
  animation: popIn 0.5s ease-out;
}

.reset-button {
  background-color: #00cec9;
  color: #2d3436;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

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

/* Floating instructions button */
.instructions-wrapper {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

#infoBtn {
  background-color: #301229;
  color: #2d3436;
  border: none;
  font-size: 20px;
  padding: 10px 14px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

#infoBtn:hover {
  transform: scale(1.1);
}

/* Instruction box */
#instructionsBox {
  position: absolute;
  top: 60px;
  right: 0;
  background-color: #ffffff;
  border: 2px solid #dfe6e9;
  border-radius: 10px;
  padding: 16px;
  width: 260px;
  font-size: 14px;
  text-align: left;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.3s ease-in-out;
}

#instructionsBox.hidden {
  display: none;
}

#instructionsBox h4 {
  margin-top: 0;
  font-size: 16px;
  color: #2d3436;
}

@media (max-width: 768px) {
  .game-title {
    font-size: 36px;
  }

  h2 {
    font-size: 24px;
  }

  button {
    font-size: 14px;
    padding: 10px 16px;
    margin: 6px;
  }

  #instructionsBox {
    width: 220px;
    font-size: 13px;
  }

  .button-group {
    flex-direction: column;
    gap: 10px;
  }

  #questionOutput {
    font-size: 20px;
    width: 90%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 6vw 4vw;
    border-radius: 14px;
    width: 90%;
  }

  .game-title {
    font-size: 28px;
  }

  h2 {
    font-size: 20px;
  }

  button {
    font-size: 13px;
    padding: 8px 14px;
  }

  #instructionsBox {
    right: 10px;
    width: 200px;
  }
}

footer {
  margin-top: auto;
  text-align: center;
  font-size: 0.75em; /* slightly smaller */
  padding: 16px 10px;
  color: #636e72; /* softer gray for contrast */
  background-color: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

footer a {
  color: #00cec9;
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  text-decoration: underline;
}
