/* === brain.css === */

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #fffbe6, #ffeec9);
  margin: 0;
  padding: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #333;
}

header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 4px 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

h1 {
  margin: 0;
  font-size: 1.6rem;
  color: #f9844a;
  text-shadow: 1px 1px 4px #f9c74f;
}

main {
  padding-top: 80px;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  flex-grow: 1;
  padding-left: 1rem;
  padding-right: 1rem;
}

.hud {
  margin-top: 4px;
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
  font-size: 1.1rem;
}

.vidas {
  font-size: 1.3rem;
  color: red;
  user-select: none;
}

.axe-display {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(45deg, #f9844a, #f9c74f);
  color: white;
  padding: 6px 14px;
  border-radius: 30px;
  font-weight: bold;
  box-shadow: 0 0 8px #f9c74f;
}

.icon-axe {
  font-size: 1.5rem;
}

.botoes-header {
  margin-top: 6px;
}

#btn-voltar,
#btn-tutorial {
  background: #f94144;
  color: white;
  border: none;
  padding: 6px 14px;
  font-size: 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  margin-right: 6px;
  margin-top: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background 0.3s;
}

#btn-voltar:hover,
#btn-tutorial:hover {
  background: #f3722c;
}

#sumario {
  display: none;
  background: white;
  padding: 12px 18px;
  margin: 20px auto;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 360px;
  text-align: left;
}

#sumario.ativo {
  display: block;
}

#sumario h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #333;
}

#sumario ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sumario li {
  margin: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.cor-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

#desafio {
  font-size: 1.2rem;
  margin: 12px 0;
  font-weight: 600;
}

#timerBarContainer {
  width: 100%;
  max-width: 400px;
  height: 10px;
  background: #ddd;
  border-radius: 5px;
  margin: 10px auto;
  overflow: hidden;
  position: relative;
}

#timerBar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #f94144, #f9c74f);
  transition: width 0.1s linear;
}

#colorGrid {
  display: grid;
  grid-template-columns: repeat(5, 60px);
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.quadrado {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  text-shadow: 0 0 6px rgba(0,0,0,0.7);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 3px solid transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.quadrado:hover {
  transform: scale(1.1);
}

.quadrado.selecionado {
  border-color: #f9844a;
  box-shadow: 0 0 12px #f9844a;
  transform: scale(1.15);
}

#resultado {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 20px;
  min-height: 24px;
}

#verificarBtn {
  background: #90be6d;
  color: white;
  font-size: 1.1rem;
  padding: 10px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background 0.3s ease;
}

#verificarBtn:hover {
  background: #43aa8b;
}

@media (max-width: 600px) {
  #colorGrid {
    grid-template-columns: repeat(4, 60px);
    gap: 8px;
  }

  .hud {
    flex-direction: column;
    gap: 8px;
  }

  h1 {
    font-size: 1.6rem;
  }

  #sumario {
    margin: 12px;
  }
}
