* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  background: linear-gradient(135deg, #fff8dc, #c8e6c9);
  color: #2e4a1f;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2vh 4vw;
}

header {
  width: 100%;
  background: #ffd54f;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 5px #0003;
  border-radius: 0.5rem;
  margin-bottom: 2vh;
}

header h1 {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  color: #4e342e;
}

#axeCount {
  margin-top: 0.5rem;
  font-weight: bold;
  color: #1b5e20;
  font-size: clamp(1rem, 4vw, 1.3rem);
}

main {
  width: 100%;
  max-width: 800px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2vw;
  width: 100%;
  margin-bottom: 2vh;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 2vh;
  align-items: center;
}

.img-card {
  width: clamp(80px, 18vw, 120px);
  height: auto;
  border-radius: 1rem;
  border: 3px solid transparent;
  box-shadow: 0 4px 8px #00000022;
  cursor: pointer;
  transition: transform 0.2s;
  object-fit: cover;
}

.img-card.selecionado {
  border-color: #43a047;
  transform: scale(1.05);
}

.img-card.acertou {
  border-color: #66bb6a;
  filter: grayscale(0.2);
  pointer-events: none;
}

.img-card.errou {
  border-color: #e53935;
  animation: shake 0.4s;
}

.nome-card {
  background: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  box-shadow: 0 3px 6px #00000022;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.2s;
  text-align: center;
  min-width: 8rem;
}

.nome-card.selecionado {
  border-color: #43a047;
  transform: scale(1.05);
}

.nome-card.acertou {
  border-color: #66bb6a;
  background: #dcedc8;
  pointer-events: none;
}

.nome-card.errou {
  border-color: #e53935;
  background: #ffcdd2;
  animation: shake 0.4s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

#feedback {
  margin: 1rem 0;
  font-size: 1.1rem;
  font-weight: bold;
  color: #388e3c;
  text-align: center;
}

#btnProxima {
  padding: 0.8rem 1.5rem;
  background: #66bb6a;
  border: none;
  color: white;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  display: none;
  transition: transform 0.3s;
}

#btnProxima:hover {
  transform: scale(1.05);
}

.btn-voltar {
  margin-top: 1.5rem;
  background: #fbc02d;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  color: #4e3b00;
  text-decoration: none;
  font-weight: bold;
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    gap: 4vh;
  }

  .column {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nome-card {
    margin: 0.5rem;
  }
}
