/* básico + fundo */
body {
  margin: 0;
  background: url('images/Water.png') no-repeat center center fixed;
  background-size: cover;
  overflow-x: hidden;
  user-select: none;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* título rainbow e comic sans */
#titulo {
  font-family: "Comic Sans MS", cursive, sans-serif;
  font-size: 50px;
  margin: 20px 0 10px 0;
  animation: rainbow 3s linear infinite;
  user-select: none;
}

/* layer dos itens */
#itemsLayer {
  position: relative;
  width: 100vw;
  height: 70vh;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  background: transparent;
  touch-action: none;
}

/* itens */
.item {
  position: absolute;
  width: 140px;
  height: 140px;
  cursor: grab;
  user-select: none;
  will-change: transform;
}

.item.dragging {
  cursor: grabbing;
}

/* botão amarelo maluco */
#addBtn {
  font-family: "Comic Sans MS", cursive, sans-serif;
  font-size: 30px;
  background: yellow;
  border: none;
  padding: 15px 25px;
  cursor: pointer;
  user-select: none;
  margin: 15px 0 30px 0;
  animation: rainbow 3s linear infinite;
  transition: transform 0.1s ease;
  border-radius: 8px;
  box-shadow: 0 0 8px 2px rgba(255, 255, 0, 0.6);
  outline: none;
}

/* esquizofrenia ao hover */
#addBtn:hover {
  animation: esquizofrenia 0.08s infinite;
}

/* animações do botão */
@keyframes esquizofrenia {
  0%   { transform: rotate(0deg) translateX(0); }
  25%  { transform: rotate(7deg) translateX(4px); }
  50%  { transform: rotate(-5deg) translateX(-3px); }
  75%  { transform: rotate(4deg) translateX(2px); }
  100% { transform: rotate(0deg) translateX(0); }
}

/* animação arco-íris para texto */
@keyframes rainbow {
  0%    { color: red; }
  16.6% { color: orange; }
  33.3% { color: yellow; }
  50%   { color: green; }
  66.6% { color: blue; }
  83.3% { color: indigo; }
  100%  { color: violet; }
}

/* +1 flutuante */
.floating-plus {
  position: fixed;
  font-size: 40px;
  font-weight: bold;
  color: lime;
  text-shadow: 2px 2px 4px black;
  user-select: none;
  pointer-events: none;
  animation: fadeUp 1s ease forwards;
  z-index: 9999;
}

/* explosão */
.explosion {
  position: fixed;
  width: 150px;
  height: 150px;
  pointer-events: none;
  animation: fadeOut 1s ease forwards;
  z-index: 9998;
}

/* animação do +1 */
@keyframes fadeUp {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-50px); }
}

/* animação fade da explosão */
@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
