/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Corpo e fonte */
body {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  background: linear-gradient(to bottom, #cbe9ff, #f5faff);
  overflow-x: hidden;
  color: #444;
  min-height: 100vh;
  position: relative;
  padding-bottom: 80px; /* espaço para footer */
}

/* Canvas fundo */
canvas#fundoCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 2px solid #a6d0f0;
  padding: 10px 20px;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#bencaos {
  font-size: 1.2rem;
  font-weight: bold;
}

header button {
  background: #fff8cc;
  border: 2px solid #ffe066;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
}

header button:hover {
  transform: scale(1.1);
  background: #fff3b8;
}

/* Main */
main {
  padding: 80px 20px 20px; /* padding-top para não ficar atrás do header */
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

main h1 {
  font-size: 2.4rem;
  color: #3366cc;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px #a8c4ff;
}

#instrucoes {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #555;
}

/* Área palavras embaralhadas */
#versiculoArea {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
  min-height: 80px;
}

/* Tabuleiro para montar versículo */
#tabuleiro {
  margin-top: 10px;
}

#tabuleiro h2 {
  font-size: 1.5rem;
  color: #2a4d69;
  margin-bottom: 10px;
  text-shadow: 0 0 5px #a8c4ff;
}

/* Drop area / tabuleiro */
#dropArea {
  min-height: 100px;
  border: 3px dashed #88aaff;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  transition: background 0.3s;
  cursor: grab;
}

/* Botão verificar */
#verificarBtn {
  margin-top: 15px;
  padding: 12px 24px;
  font-size: 1.1rem;
  background: #c1e1ff;
  border: 2px solid #6fa8dc;
  border-radius: 15px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}

#verificarBtn:hover {
  background: #b0d5ff;
  transform: scale(1.05);
}

/* Cartões das palavras */
.palavra {
  background: #fffefc;
  border: 2px dashed #a3bad9;
  border-radius: 15px;
  padding: 12px 22px;
  font-size: 1.25rem;
  color: #333;
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.1);
  cursor: grab;
  user-select: none;
  transition: transform 0.2s, background 0.3s, border-color 0.3s;
}

.palavra:hover {
  transform: scale(1.1);
  background: #f0f7ff;
  border-color: #6699ff;
}

/* Animação de celebração */
#celebracao {
  position: fixed;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.98);
  border: 4px solid #ffd700;
  padding: 35px 45px;
  border-radius: 25px;
  text-align: center;
  z-index: 20;
  box-shadow: 0 0 20px #ffeb3b;
  animation: aparecer 0.5s ease forwards;
}

.oculto {
  display: none;
}

#celebracao .arco-iris {
  width: 100%;
  height: 12px;
  background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
  margin-bottom: 25px;
  border-radius: 6px;
}

.anjos-celebrando {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: pulinho 1s infinite ease-in-out;
}

/* Animações */
@keyframes aparecer {
  from { opacity: 0; transform: translate(-50%, -30%) scale(0.8); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes pulinho {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Footer fixo */
footer#rodape {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #f0f9ff;
  border-top: 2px solid #a6d0f0;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #444;
  font-family: 'Arial', sans-serif;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
  z-index: 15;
}

footer#rodape .footer-texto {
  line-height: 1.2;
}

/* Responsividade */
@media (max-width: 600px) {
  main h1 {
    font-size: 1.8rem;
  }

  #versiculoArea {
    gap: 10px;
  }

  .palavra {
    font-size: 1rem;
    padding: 10px 14px;
  }

  #tabuleiro h2 {
    font-size: 1.3rem;
  }

  #verificarBtn {
    font-size: 1rem;
    padding: 10px 18px;
  }

  header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 10px;
  }
}
