/* historias-interativas.css */

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #fff8e7;
  color: #3a3a3a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

a.btn-voltar {
  align-self: flex-start;
  text-decoration: none;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #f39c12;
  font-weight: 700;
  transition: color 0.3s ease;
}

a.btn-voltar:hover {
  color: #d35400;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 1.5rem;
}

header h1 {
  font-size: 2.5rem;
  color: #f39c12;
  text-shadow: 1px 1px 3px #d35400;
  margin-bottom: 0.3rem;
}

header p {
  font-size: 1.2rem;
  color: #7f8c8d;
  margin-bottom: 1rem;
}

/* Info jogo (axé, capítulos etc) */
.info-jogo {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.info-jogo span {
  background: #f39c12;
  color: white;
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(243, 156, 18, 0.5);
  user-select: none;
}

/* Main container do jogo */
.container-jogo {
  display: flex;
  gap: 2rem;
  max-width: 1100px;
  width: 100%;
  background: #fff9f0;
  border-radius: 12px;
  box-shadow: 0 8px 15px rgba(243, 156, 18, 0.15);
  padding: 1.5rem;
}

/* Painel história principal */
.painel-historia {
  flex: 2;
  background: #fefefe;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 10px #f1c40f33;
}

/* Área narrativa */
.area-narrativa {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.titulo-historia {
  font-size: 1.8rem;
  font-weight: 700;
  color: #d35400;
  text-align: center;
  user-select: none;
}

.imagem-historia {
  font-size: 6rem;
  text-align: center;
  user-select: none;
  margin-bottom: 0.4rem;
  filter: drop-shadow(2px 4px 2px rgba(243, 156, 18, 0.5));
}

.texto-narrativa {
  font-size: 1.2rem;
  line-height: 1.5;
  min-height: 120px;
  color: #34495e;
  padding: 0 0.8rem;
  user-select: text;
  border-left: 4px solid #f39c12;
  background: #fffbea;
  border-radius: 6px;
}

/* Área de escolhas */
.area-escolhas {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px dashed #f39c12;
}

.area-escolhas h4 {
  font-weight: 700;
  color: #e67e22;
  margin-bottom: 0.8rem;
  user-select: none;
}

.opcoes-escolhas {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.btn-escolha {
  background: #f39c12;
  color: white;
  border: none;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.15s ease;
  box-shadow: 0 3px 6px rgba(243, 156, 18, 0.6);
  user-select: none;
}

.btn-escolha:hover,
.btn-escolha:focus {
  background: #d35400;
  outline: none;
  transform: scale(1.05);
}

/* Área resultado (pode ser usado futuramente) */
.area-resultado {
  margin-top: 1rem;
  min-height: 40px;
  font-style: italic;
  color: #888;
  user-select: none;
}

/* Painel lateral */
.painel-lateral {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: inset 0 0 12px #f1c40f44;
}

/* Listagem de histórias */
.selecao-historia h4,
.progresso-historia h4,
.dicas-historia h4,
.controles-historia h4 {
  font-weight: 700;
  color: #d35400;
  border-bottom: 2px solid #f39c12;
  padding-bottom: 0.3rem;
  user-select: none;
}

.lista-historias {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.historia-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  background: #fef9e7;
  transition: background 0.3s ease;
  box-shadow: 0 1px 4px #f1c40f99;
}

.historia-item:hover,
.historia-item:focus {
  background: #f39c12;
  color: white;
  outline: none;
}

.historia-emoji {
  font-size: 2.2rem;
  user-select: none;
}

.historia-info {
  flex-grow: 1;
}

.historia-titulo {
  font-weight: 700;
  font-size: 1.1rem;
  user-select: text;
}

.historia-orixa {
  font-style: italic;
  color: #b9770e;
  font-size: 0.9rem;
  user-select: text;
}

/* Progresso da história */
.progresso-historia {
  font-size: 1rem;
  color: #34495e;
  user-select: none;
}

.progresso-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

/* Dicas */
.dicas-historia {
  font-size: 0.95rem;
  color: #7f8c8d;
  user-select: none;
}

.dica-item {
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

/* Controles */
.controles-historia {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.btn-especial {
  background: #f39c12;
  border: none;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 8px #d35400aa;
  user-select: none;
  transition: background 0.3s ease, transform 0.15s ease;
}

.btn-especial:disabled {
  background: #f0c27b;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-especial:hover:not(:disabled),
.btn-especial:focus:not(:disabled) {
  background: #d35400;
  outline: none;
  transform: scale(1.05);
}

/* Modais (Final e Conquista) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-content {
  background: #fff8e7;
  border-radius: 16px;
  max-width: 400px;
  width: 100%;
  padding: 1.5rem 2rem;
  text-align: center;
  box-shadow: 0 8px 20px #f39c12bb;
  user-select: none;
}

.modal-final-emoji {
  font-size: 5rem;
  margin-bottom: 0.4rem;
}

.modal-final-titulo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #d35400;
  margin-bottom: 0.6rem;
}

.modal-final-texto {
  font-size: 1.1rem;
  color: #34495e;
  margin-bottom: 0.6rem;
}

.modal-recompensas,
.modal-licoes {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #f39c12;
}

.modal-botoes {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.modal-botoes .btn-especial {
  flex: 1 1 40%;
  max-width: 140px;
}

/* Modal Conquista */
.modal-conquista-emoji {
  font-size: 4rem;
  margin-bottom: 0.3rem;
  color: #f39c12;
}

.modal-conquista-nome {
  font-weight: 700;
  font-size: 1.3rem;
  color: #d35400;
  margin-bottom: 0.3rem;
}

.modal-conquista p {
  color: #34495e;
  margin-bottom: 1rem;
}

/* Scroll barras personalizadas */
.lista-historias::-webkit-scrollbar {
  width: 6px;
}

.lista-historias::-webkit-scrollbar-thumb {
  background: #f39c12;
  border-radius: 3px;
}

/* Responsividade */
@media (max-width: 900px) {
  .container-jogo {
    flex-direction: column;
  }
  
  .painel-lateral {
    max-height: none;
    padding-bottom: 0.5rem;
  }

  .info-jogo {
    justify-content: space-around;
  }

  header h1 {
    font-size: 2rem;
  }

  .imagem-historia {
    font-size: 5rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.5rem;
  }

  a.btn-voltar {
    font-size: 1rem;
  }

  header h1 {
    font-size: 1.6rem;
  }

  .titulo-historia {
    font-size: 1.4rem;
  }

  .texto-narrativa {
    font-size: 1rem;
    min-height: 100px;
  }

  .btn-escolha,
  .btn-especial {
    font-size: 0.9rem;
    padding: 0.6rem 0.9rem;
  }

  .imagem-historia {
    font-size: 4rem;
  }

  .painel-lateral {
    padding: 0.8rem 0.5rem;
  }
}
