body { 
  margin: 0; 
  padding: 0;
  font-family: 'Arial', sans-serif;
  background: url('bg.png') no-repeat center center fixed;
  background-size: cover;
  touch-action: manipulation;
}

/* Painel de palavras (em cima) */
#hint {
  background: rgba(173, 216, 230, 0.95);
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  width: 90vw;
  max-width: 500px;
  margin: 20px auto;
}

#hint h2 {
  color: #333;
  margin: 0 0 20px 0;
  font-size: 8vw;
  text-align: center;
  font-weight: bold;
}

#hint p {
  margin: 12px 0;
  font-size: 5.5vw;
  font-weight: bold;
  color: #333;
  text-align: left;
}

#hint p.done {
  text-decoration: line-through;
  color: #4CAF50;
  text-shadow: 0 0 10px lime;
  animation: glow 1s infinite alternate;
}

@keyframes glow {
  0% { text-shadow: 0 0 10px lime; }
  100% { text-shadow: 0 0 20px #90EE90; }
}

/* Grade de letras (embaixo) */
#letters {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  width: 95vw;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  margin: 20px auto;
}

.individual {
  background: rgba(255,255,255,0.9);
  border: 2px solid #666;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7vw;
  font-weight: bold;
  color: #333;
  user-select: none;
  touch-action: manipulation;
  cursor: pointer;
  transition: all 0.2s;
}

.individual:hover {
  transform: scale(1.05);
}

.colorPurple {
  background: linear-gradient(45deg, #DDA0DD, #E6E6FA) !important;
}

.correctlySelected {
  background: linear-gradient(45deg, #90EE90, #98FB98) !important;
  animation: celebrate 0.6s ease-in-out;
  border-color: lime !important;
}

@keyframes celebrate {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

#phaseComplete {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(76,175,80,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: white;
  font-size: 8vw;
  z-index: 999;
}

#nextPhaseBtn {
  padding: 20px 40px;
  font-size: 6vw;
  background: white;
  color: #4CAF50;
  border: none;
  border-radius: 20px;
  margin-top: 20px;
  cursor: pointer;
}
