/* tecfe-v7-styles.css */
/* SEM acentos nos comentarios */

/* -- Reset e base -- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #E0F7E0;
  padding: 20px;
  min-height: 100vh;
}

/* -- Tela de ativacao -- */
#activationPage {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 500px;
  margin-top: 80px;
}

#activationPage h2 {
  margin-bottom: 20px;
  color: #333;
}

#activationPage .machine-id {
  font-family: monospace;
  font-size: 18px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px 16px;
  margin: 10px 0;
  user-select: all;
}

#activationPage input[type="text"] {
  font-size: 18px;
  font-family: monospace;
  text-align: center;
  padding: 8px 12px;
  width: 220px;
  border: 2px solid #ccc;
  border-radius: 6px;
  margin: 8px 0;
  text-transform: uppercase;
}

#activationPage .btn-row {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.btn-activate {
  background-color: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  padding: 10px 24px;
  cursor: pointer;
}
.btn-activate:hover { background-color: #43a047; }

.btn-demo {
  background-color: #ff9800;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  padding: 10px 24px;
  cursor: pointer;
}
.btn-demo:hover { background-color: #f57c00; }
.btn-demo:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* -- Logo SpsM -- */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: -6px;
  padding: 0px 20px;
}

.logo-img {
  height: 110px;
  width: auto;
}

/* -- Pagina de capa (formulario) -- */
#coverPage {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 1200px;
}

.instructions {
  font-size: 22px;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.5;
}

/* -- Formulario de identificacao -- */
.identification {
  margin-bottom: 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.identification-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.identification label {
  font-size: 18px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.identification input,
.identification select {
  padding: 5px;
  font-size: 16px;
  margin-left: 5px;
  width: 150px;
}

.identification .name-input { width: 250px; }
.identification .birthdate-input { width: 150px; }
.identification .cpf-input { width: 160px; }
.identification .crp-input { width: 140px; }

.identification .age-display {
  padding: 5px;
  font-size: 16px;
  width: 250px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
}

.identification .sex-input,
.identification .education-input {
  width: 150px;
}

/* -- Botoes principais -- */
#startButton {
  font-size: 32px;
  padding: 10px 20px;
  cursor: pointer;
  margin: 10px;
  border-radius: 8px;
  border: 2px solid #4CAF50;
  background: #fff;
  color: #4CAF50;
  transition: all 0.2s;
}
#startButton:hover {
  background: #4CAF50;
  color: #fff;
}


/* -- Pagina do teste -- */
#testPage {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* -- Cartas estimulo (4 fixas no topo) -- */
.stimulus-container {
  display: grid;
  grid-template-columns: repeat(4, 100px);
  gap: 10px;
  margin-bottom: 20px;
}

/* -- Cartas resposta (baralho) -- */
.response-container {
  display: grid;
  grid-template-columns: repeat(8, 100px);
  gap: 10px;
  margin-bottom: 20px;
  border: 1px solid #999;
  border-radius: 6px;
  padding: 8px;
}

/* -- Carta individual (SEM borda vermelha) -- */
.card {
  width: 90px;
  height: 135px;
  border: 2px solid #000;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  user-select: none;
  border-radius: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card-selected {
  border: 3px solid #ff6600;
  box-shadow: 0 0 12px rgba(255, 102, 0, 0.6);
}

.droppable {
  border: 2px dashed #000;
  cursor: pointer;
}

.droppable.over {
  background-color: #e0e0e0;
}

.card svg {
  width: 100%;
  height: 100%;
}

/* -- Feedback central -- */
#feedback {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  font-weight: bold;
  text-align: center;
  display: none;
  z-index: 1000;
  pointer-events: none;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

#feedback.correct { color: green; }
#feedback.incorrect { color: red; }
#feedback.success { color: green; }
#feedback.exhausted { color: blue; }
#feedback.parabens {
  color: #4CAF50;
  font-size: 60px;
}
#feedback.encerrado {
  color: #1565C0;
  font-size: 50px;
}

/* -- Trigger area (escondido) -- */
#btnTriggerArea {
  display: none;
}

/* -- Botao sair (canto inferior direito, quase invisivel) -- */
#exitButton {
  display: block;
  margin: 5px auto 0 auto;
  background-color: #ff4444;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  padding: 6px 20px;
  cursor: pointer;
  z-index: 9999;
  opacity: 0.7;
  z-index: 999999;
  opacity: 0.7;
  display: none;
}
#exitButton:hover {
  opacity: 1;
}

/* -- Fullscreen overlay (bloqueio visual) -- */
.fullscreen-active {
  position: fixed !important;
  top: 0; left: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9998;
  overflow: auto;
  background-color: #E0F7E0;
}


/* -- Responsivo celular -- */
@media (max-width: 768px) {
  #feedback {
    font-size: 36px !important;
    width: 80% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }
  #feedback.parabens, #feedback.encerrado {
    font-size: 28px !important;
  }
  .stimulus-container {
    grid-template-columns: repeat(4, 70px) !important;
    gap: 5px !important;
  }
  .response-container {
    grid-template-columns: repeat(4, 70px) !important;
    gap: 5px !important;
  }
  .card {
    width: 70px !important;
    height: 105px !important;
  }
  #testPage h1 {
    font-size: 16px !important;
  }
}

#testPage h1 {
  margin-top: 30px;
}
