/* 


LEMBRAR DE FAZER MOSTRAR CORRETAMENTE O ARREDONTAMENTO PRA CIMA


Reset */
* {
  box-sizing: border-box;
}

html,
body {
  background: radial-gradient(1400px 900px at 50% -20%,
      #2c2c2c 0%,
      #141414 45%,
      #0b0b0b 100%);
  min-height: 100%;
}

body {
  padding:
    env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* 🌌 Base */
body {
  font-family: Sora, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f0f0f0;
  min-height: 100vh;
  padding: 32px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 32px;
}

/* 🖼️ Imagem */
img {
  display: block;
  margin: 0 auto;
  padding: 1.5em;
  width: 100%;
  max-width: 640px;
}

/* 📦 Layout */
.container {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  gap: 24px;
}

/* 🧊 Cards */
.left,
.right {
  background: rgba(255, 255, 255, 0.02);
  padding: 24px;
  border-radius: 14px;
  flex: 1;

  /* Bordas finas semitransparentes */
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 🧍 Criaturas */
.creature {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* 🧩 Inputs */
select,
input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.4);
  color: #f0f0f0;
  outline: none;
}

select:focus,
input:focus {
  border-color: rgba(120, 180, 255, 0.6);
}

/* 🔘 Botões */
button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

button:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ➕ Adicionar */
.add {
  border-color: rgba(120, 220, 160, 0.4);
  color: #9ff0c4;
}

/* ❌ Remover */
.remove {
  border-color: rgba(240, 120, 120, 0.4);
  color: #ff9a9a;
}

/* 📊 Resultado */
.result {
  font-size: 1.4em;
  margin-top: 12px;
  line-height: 1.4;
}

.result span {
  display: inline-block;
  text-align: center;
  width: 1.5em;
  height: 1.5em;
  border-radius: 5px;
}

/* 🎯 Estados */
.good {
  color: #4caf50;
  text-align: center;
  height: 1.5em;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.warn {
  color: #ffc107;
  text-align: center;
  height: 1.5em;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bad {
  color: #f44336;
  text-align: center;
  height: 1.5em;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* 📜 Log */
.log {
  width: 100%;
  max-width: 1200px;
  background: rgba(0, 0, 0, 0.45);
  padding: 18px;
  border-radius: 14px;
  font-size: 0.9em;
  max-height: 320px;
  overflow-y: auto;

  /* Borda sutil */
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.log h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: #ccc;
  font-weight: 500;
}

.log pre {
  white-space: pre-wrap;
  margin: 0;
  line-height: 1.45;
}

/* 🧷 Botão flutuante autor */
.floating-author {
  position: fixed;
  bottom: 24px;
  right: 24px;
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;

  color: #f0f0f0;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;

  overflow: hidden;
  white-space: nowrap;

  transition:
    max-width 0.3s ease,
    background 0.2s ease,
    border-color 0.2s ease;

  max-width: 48px;
  /* fechado */
  z-index: 9999;
}

/* Ícone ? */
.floating-author .icon {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1;
}

/* Texto escondido inicialmente */
.floating-author .text {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Hover → expande */
.floating-author:hover {
  max-width: 240px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.floating-author:hover .text {
  opacity: 1;
}

.verdict-emoji {
  display: inline-block;
  border: none;
  padding: 0;
}

@keyframes emoji-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); }
}

.verdict-emoji.animate {
  animation: emoji-pop 0.35s ease-out;
}


/* Tablets e celulares */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
    width: 100%;
  }

  img {
    max-width: 70%;
  }

  .result {
    font-size: 1.2em;
  }
}

@media (max-width: 600px) {
  body {
    padding: 16px;
  }

  img {
    max-width: 100%;
    padding: 1em;
  }

  .left,
  .right {
    padding: 16px;
    max-height: none;
    /* evita comportamento estranho no iOS */
  }
}

/* Desktop: expande no hover */
.floating-author {
  max-width: 48px;
}

.floating-author:hover {
  max-width: 240px;
}

.floating-author .text {
  opacity: 0;
}

.floating-author:hover .text {
  opacity: 1;
}

/* 📱 Mobile: sempre expandido */
@media (max-width: 600px) {
  .floating-author {
    position: static;
    margin: 24px auto 0;
    max-width: 240px;
  }

  .floating-author .text {
    opacity: 1;
  }
}