body {
  margin: 0;
  font-family: sans-serif;
  background: #111;
  color: white;
  overflow-x: hidden;
  overflow-y: auto;

  min-height: 100vh;
  height: auto;
  display: flex;
  flex-direction: column;
}

#cloud {
  background: rgba(20, 20, 20, 0.8);
  /* previously 44, 43, 43 */
  min-height: 500px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

#inputContainer {
  padding: 20px;
  text-align: center;
}

#userCount {
  color: #ccc;
  font-size: 0.9em;
  margin-top: 10px;
  font-style: italic;
  transition: all 0.3s ease;
}

#textInput {
  width: 60%;
  max-width: 600px;
  padding: 14px 20px;
  font-size: 1.2em;
  border-radius: 999px;
  /* pill shape */
  border: none;
  background: #1e1e1e;
  color: white;
  box-shadow: inset 0 0 4px #000, 0 0 8px rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

#textInput:focus {
  outline: none;
  box-shadow: 0 0 0 2px #00f5d4, 0 0 10px #00f5d4;
  background: #2a2a2a;
}

#filters {
  margin: 10px 0;
}

#filters button {
  background: #222;
  color: white;
  border: none;
  padding: 6px 12px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

#filters button.selected {
  font-weight: bold;
  border: 1px solid white;
}

.message {
  position: absolute;
  padding: 12px 16px;
  border-radius: 20px;
  background: #fff;
  color: #000;
  white-space: pre-wrap;
  max-width: 90vw;
  font-size: clamp(0.9em, 4vw, 1.1em);
  opacity: 0;
  animation: fadein 0.4s ease-out forwards, fadeout 0.5s ease-in 19s forwards;
  transform-origin: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

  transform: scale(1) rotate(var(--rotation, 0deg));
  transition: transform 0.3s ease;
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeout {
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

.hot-word {
  color: #ff00ff;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

footer {
  padding: 14px 20px;
  background: #1e1e1e;
  color: rgb(161, 161, 161);
  text-align: center;
  font-size: 0.95em;
  font-style: italic;
  box-shadow: inset 0 0 4px #000, 0 0 8px rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  margin: 20px auto;
  width: fit-content;
  max-width: 90%;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  margin-bottom: env(safe-area-inset-bottom, 10px);
}

#fabMenu {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
}

#fabBtn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #00f5d4;
  color: black;
  font-size: 2em;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 101;
}

#fabOptions {
  position: absolute;
  bottom: 70px; /* Place above the button */
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #1e1e1e;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#fabOptions.hidden {
  display: none;
}

#fabOptions button {
  padding: 10px;
  border: none;
  background: #333;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  #textInput {
    width: 90%;
    font-size: 1em;
    padding: 12px 16px;
  }

  .message {
    max-width: 90vw;
    font-size: clamp(0.9em, 4vw, 1.1em);
  }

  footer {
    font-size: 0.85em;
    padding: 10px 16px;
    max-width: 95%;
  }

  #inputContainer {
    padding: 12px;
  }

  #filters button {
    margin: 3px 3px;
    padding: 6px 10px;
    font-size: 0.9em;
  }

  #cloud {
    padding: 4px;
  }
}
