/* Reset e Base */
*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(-45deg, #000000, #1a1a1a);
  background-size: 400% 400%;
  animation: gradient 5s ease infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Header */
header {
  display: flex;
  padding: 0 1rem;
  align-items: center;
  width: 100%;
  max-width: 480px;
  border-radius: 5px;
  overflow: hidden;
  justify-content: space-between;
}

header .header-logo {
  width: 80px;
  border-radius: 5px 5px 0px 0px;
  cursor: pointer;
  user-select: none;
}

header .floating {
  animation: floating 4s ease-in-out infinite;
}

@keyframes floating {
  0% { transform: translate(0, 0px); }
  50% { transform: translate(0, 15px); }
  100% { transform: translate(0, 0px); }
}

/* Icons */
.bi-arrow-left-circle-fill::before,
.bi-person-circle {
  color: white;
  font-size: 1.5rem;
}

/* IA Container */
.ia-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 1rem auto;
  width: 100%;
  max-width: 480px;
  background-color: #1a1a1a;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.ia-history {
  display: flex;
  justify-content: center;
  overflow: auto;
  background-color: #1b1919;
  padding: 10px 0;
}

.ia-profile {
  font-weight: bold;
  color: white;
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.ia-avatar {
  width: 80px;
  border-radius: 5px;
}

#ia-chat {
  margin: 0.5rem;
}

.ia-message {
  font-weight: bold;
  margin: 0;
  background-color: #1b1919;
  color: #f9f9f9;
  border-radius: 3px;
  padding: 0.5rem;
  text-align: justify;
}

.ia-button {
  width: 100%;
  border: none;
  padding: 1rem;
  font-weight: bold;
  color: white;
  background-color: rgb(11, 218, 76);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.ia-button:hover {
  background-color: rgb(9, 190, 66);
}

#gerarSinal {
  height: 50px;
  border: none;
  font-weight: bold;
  border-radius: 0px 0px 5px 5px;
  background-color: rgb(11, 218, 76);
}

/* Plataform Section - Responsiva */
.plataform {
  width: 100vw;
  margin: 1rem 0;
  padding: 0;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

#jogo-container {
  width: 100%;
  min-height: 70vh;
  height: auto;
  background-color: #1a1a1a;
  border-radius: 0;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  display: flex;
  flex-direction: column;
}

/* Media Queries para diferentes tamanhos de tela */
@media only screen and (max-width: 480px) {
  .ia-container {
    margin: 0.5rem;
  }
  
  #jogo-container {
    min-height: 60vh;
  }
}

@media only screen and (min-width: 481px) and (max-width: 768px) {
  #jogo-container {
    min-height: 65vh;
  }
}

@media only screen and (min-width: 769px) and (max-width: 1024px) {
  #jogo-container {
    min-height: 70vh;
  }
}

@media only screen and (min-width: 1025px) {
  #jogo-container {
    min-height: 75vh;
  }
}

/* Utilitários */
a {
  text-decoration: none;
  color: #f9f9f9;
}

img {
  user-select: none;
}

/* Loading Animation */
.ball {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #1a1a1a;
  border-radius: 50%;
  margin: 0 5px;
}

.ball:nth-child(1) {
  animation: bounce-1 2.1s ease-in-out infinite;
}

.ball:nth-child(2) {
  animation: bounce-2 2.1s ease-in-out 0.3s infinite;
}

.ball:nth-child(3) {
  animation: bounce-3 2.1s ease-in-out 0.6s infinite;
}

@keyframes bounce-1,
@keyframes bounce-2,
@keyframes bounce-3 {
  50% { transform: translateY(-18px); }
}