body {
  margin: 0;
  overflow: hidden;
  background-color: #111;
  font-family: "Courier New", monospace;
}

/* ---- OBJETOS FLUTUANTES (agora só giram) ---- */
.random-img {
  position: absolute;
  max-width: 200px;
  cursor: grab;
  user-select: none;
  animation: spin 320s linear infinite; /* só gira */
  transition: left 0.6s ease, top 0.6s ease; /* para shuffle/drag */
}
.random-img:active { cursor: grabbing; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---- BALÃO ---- */
.bubble {
  position: fixed;
  max-width: 260px;
  padding: 8px 30px 8px 13px;
  background: #fff;
  font-size: 14px;
  color: #333;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -120%) scale(0.8);
  animation: bubbleIn 0.4s ease forwards;
  z-index: 9999;
}

.bubble-close {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  color: #666;
  transition: 0.3s;
}
.bubble-close:hover { color: #ffb6c1; }

@keyframes bubbleIn {
  to { opacity: 1; transform: translate(-50%, -120%) scale(1); }
}

/* ---- BOTÕES INFERIORES ---- */
#buttons-wrapper {
  position: fixed;
  bottom: 20px;
  left: 20px; /* esquerda no desktop */
  display: flex;
  gap: 10px;
  z-index: 99999;
}

#botao-pedra-dia {
  background: #fff;
  color: #333;
  border: 1px solid #333;
  padding: 10px 18px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  text-transform: lowercase;
  cursor: pointer;
}
#botao-pedra-dia:hover { background: #f9f9f9; }

#shuffle-btn {
  background: #000;
  color: #fff;
  border: 1px solid #fff;
  padding: 10px 18px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  text-transform: lowercase;
  cursor: pointer;
}
#shuffle-btn:hover { background: #222; }

/* ---- POPUP PEDRA DO DIA ---- */
.popup-pedra-dia {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 280px;
  max-width: 85vw;
  background: #fff;
  border-radius: 0;
  padding: 25px 20px 20px;
  text-align: center;
  font-size: 14px;
  color: #333;
  z-index: 100000;
  animation: popupIn 0.35s ease forwards;
}

.popup-img { width: 160px; max-width: 70%; }

.popup-pedra-dia h2 { margin: 0 0 6px; font-size: 16px; text-transform: lowercase; opacity: 0.8; }
.popup-pedra-dia h3 { margin: 10px 0 8px; font-size: 15px; text-transform: lowercase; font-weight: normal; }
.popup-pedra-dia p { font-size: 13px; line-height: 1.4; opacity: 0.8; }

.close-x {
  position: absolute;
  top: 12px;
  right: 14px;
  cursor: pointer;
  color: #666;
  transition: 0.3s;
}
.close-x:hover { color: #ffb6c1; }

@keyframes popupIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ---- TOP MENU ---- */
#top-menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 18px;
  font-family: 'courier new', monospace;
  font-size: 0.95rem;
  color: #ffffff;
  pointer-events: none;
  user-select: none;
}

/* ---- MOBILE ---- */
@media (max-width: 480px) {
  #top-menu {
    font-size: 0.85rem;
    height: 40px;
    padding-left: 12px;
  }

  #buttons-wrapper {
    left: 50%;
    transform: translateX(-50%);
    gap: 6px;
  }

  #shuffle-btn, #botao-pedra-dia {
    font-size: 13px;
    min-width: 140px; /* largura mínima para caber o texto */
    padding: 10px 18px; /* mantém o padding interno */
    white-space: nowrap; /* evita quebra de texto */
  }

  .bubble {
    font-size: 10px;
  }
}
