/* Reset básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  background: linear-gradient(to bottom, #a1c88e, #e0f7d4);
  color: #2e4a1f;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  text-align: center;
  margin-bottom: 1rem;
}

.axé-info {
  font-size: 1.2rem;
  margin-top: 0.5rem;
  font-weight: bold;
}

main {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 900px;
}

.terrario-container,
.loja-container,
.inventario-container {
  background: #d0e7be;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 8px rgba(46, 74, 31, 0.3);
  flex: 1 1 280px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h2 {
  margin-bottom: 0.8rem;
  color: #356a1e;
}

/* Terrário grid */
#terrario {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  grid-gap: 10px;
}

.celula-terra {
  width: 80px;
  height: 80px;
  background: #8fbc8f;
  border: 2px solid #4b7a20;
  border-radius: 8px;
  position: relative;
  cursor: pointer;
  box-shadow: inset 2px 2px 5px #6a8a24;
  display: flex;
  justify-content: center;
  align-items: center;
}

.celula-bloqueada {
  background: #ccc;
  border-color: #999;
  cursor: not-allowed;
  box-shadow: none;
}

.planta {
  font-size: 2.5rem;
  user-select: none;
  pointer-events: none;
}

/* Barra de crescimento */
.barra-crescimento {
  position: absolute;
  bottom: 4px;
  left: 8px;
  right: 8px;
  height: 8px;
  background: #3e6b11;
  border-radius: 4px;
  overflow: hidden;
}

.barra-crescimento-inner {
  height: 100%;
  background: #a6d608;
  width: 0%;
  transition: width 0.3s linear;
}

/* Loja de sementes */
.loja-sementes {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.semente {
  background: #f4f7e7;
  border: 2px solid #789c3e;
  border-radius: 10px;
  width: 130px;
  padding: 10px;
  box-shadow: 0 3px 6px #9ccf4f;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.semente:focus,
.semente:hover {
  background-color: #d4f26a;
  outline: none;
}

.semente .nome {
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-align: center;
}

.semente .custo {
  font-size: 0.9rem;
  color: #557700;
  margin-bottom: 0.3rem;
}

.semente .descricao {
  font-size: 0.8rem;
  color: #3a5a00;
  text-align: center;
}

/* Botão expandir */
.btn {
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background-color: #6b8e23;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 3px 5px #4e6a10;
  transition: background-color 0.3s ease;
}

.btn:disabled {
  background-color: #a1b88a;
  cursor: not-allowed;
}

.btn:hover:not(:disabled) {
  background-color: #547a13;
}

/* Inventário */
.inventario {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.inventario .semente-inventario {
  background: #cde2b1;
  border-radius: 8px;
  padding: 8px;
  box-shadow: inset 1px 1px 3px #a4bb78;
  cursor: pointer;
  user-select: none;
  flex: 1 1 100px;
  max-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.inventario .semente-inventario .nome {
  font-weight: bold;
  margin-bottom: 0.3rem;
  text-align: center;
}

.mensagem {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: #a6d608dd;
  color: #2e4a1f;
  padding: 0.7rem 1.2rem;
  border-radius: 20px;
  font-weight: bold;
  box-shadow: 0 2px 8px #6a8a24cc;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  max-width: 300px;
  text-align: center;
  z-index: 1000;
}

.mensagem.show {
  opacity: 1;
}
header {
  position: relative;
  text-align: center;
  margin-bottom: 1rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

header h1 {
  flex: 1;
  font-size: 1.8rem;
  color: #356a1e;
}

.btn-voltar {
  position: absolute;
  left: 10px;
  background-color: #6b8e23;
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  box-shadow: 0 3px 5px #4e6a10;
  transition: background-color 0.3s ease;
}

.btn-voltar:hover,
.btn-voltar:focus {
  background-color: #547a13;
  outline: none;
}
