body {
  margin: 0;
  background: linear-gradient(to bottom, #fff8e1, #ffe082);
  font-family: "Comic Sans MS", cursive, sans-serif;
  overflow: hidden;
}

header {
  background: #ffd54f;
  color: #4e342e;
  font-size: 1.4rem;
  text-align: center;
  padding: 12px;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#gameCanvas {
  display: block;
  margin: 0 auto;
  background: #fffde7;
  border: 4px dashed #ffb300;
  border-radius: 12px;
  touch-action: manipulation;
  max-width: 100vw;
  max-height: 100vh;
}

#desafioBox {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffffdd;
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 1.2rem;
  box-shadow: 0 0 12px #ffca28;
  pointer-events: none;
  text-align: center;
  font-weight: bold;
  max-width: 90%;
}

#timerBar {
  position: absolute;
  top: 64px;
  left: 10px;
  right: 10px;
  height: 10px;
  background: #ffe0b2;
  border-radius: 10px;
  overflow: hidden;
}

#timerFill {
  height: 100%;
  width: 100%;
  background: linear-gradient(to right, #ff8f00, #f4511e);
  transition: width 0.2s linear;
}

#gameOverBox {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff3e0;
  padding: 20px;
  border-radius: 16px;
  font-size: 1.5rem;
  text-align: center;
  box-shadow: 0 0 20px #ff6f00;
  z-index: 10;
}

#gameOverBox.hidden {
  display: none;
}

button {
  padding: 12px 24px;
  margin-top: 15px;
  background: #ffca28;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  color: #4e342e;
}

/* 🌐 Mobile */
@media (max-width: 768px) {
  header {
    font-size: 1.1rem;
  }

  #desafioBox {
    font-size: 1rem;
    padding: 8px 14px;
  }
}
.btn-voltar {
  position: fixed;
  top: 15px;
  left: 15px;
  background: #ffffffaa;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 1.2rem;
  color: #000;
  text-decoration: none;
  box-shadow: 2px 2px 5px #00000033;
  z-index: 999;
  transition: background 0.3s;
}
.btn-voltar:hover {
  background: #fff;
}
@media (max-width: 600px) {
  .btn-voltar {
    font-size: 1rem;
    padding: 6px 10px;
  }
}
