/* Reset básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #fffcea;
  color: #4b3b00;
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 12px;
}

a.btn-voltar {
  display: inline-block;
  margin-bottom: 12px;
  text-decoration: none;
  color: #6f4e00;
  font-weight: 700;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

a.btn-voltar:hover {
  color: #c68c00;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 6px;
}

header p {
  font-size: 1.1rem;
  color: #7a6100;
  margin-bottom: 15px;
}

.info-jogo {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
  font-size: 1.1rem;
  font-weight: 600;
  color: #9a7d00;
  margin-top: 5px;
}

.info-jogo span {
  background: #f4e2a3;
  padding: 6px 10px;
  border-radius: 12px;
  box-shadow: 1px 1px 3px rgba(180, 140, 0, 0.3);
}

/* Main layout */
main {
  max-width: 1200px;
  width: 100%;
}

/* Área do jogo e painel lateral lado a lado */
#jogo-danca .container-jogo {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Painel principal (palco, controles e resultado) */
.painel-principal {
  flex: 1 1 600px;
  background: #fff8d1;
  padding: 18px 20px;
  border-radius: 18px;
  box-shadow: 0 0 20px #cda800aa;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Palco da dança */
.area-palco h3 {
  font-size: 1.5rem;
  color: #6e5600;
  margin-bottom: 10px;
  text-align: center;
}

.palco-danca {
  position: relative;
  background: linear-gradient(180deg, #f7f3cf 0%, #e3d47a 100%);
  border-radius: 20px;
  height: 320px;
  box-shadow: inset 0 4px 6px #f5efb3aa;
  overflow: hidden;
}

/* Luzes do palco */
.luzes-palco {
  position: absolute;
  top: 15px;
  left: 10%;
  width: 80%;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 2;
}

.luz {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at center, #f7d53c 90%, transparent 100%);
  border-radius: 50%;
  filter: drop-shadow(0 0 6px #f7d53caa);
  animation: luz-pulsar 2.5s ease-in-out infinite;
}

.luz-2 {
  animation-delay: 0.5s;
}
.luz-3 {
  animation-delay: 1s;
}
.luz-4 {
  animation-delay: 1.5s;
}

@keyframes luz-pulsar {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Personagem dançando */
.personagem-dancando {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 5.8rem;
  filter: drop-shadow(1px 2px 1px #a28800bb);
  user-select: none;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.energia-danca {
  margin-top: 6px;
  width: 100px;
  height: 10px;
  background: #f4e2a3;
  border-radius: 8px;
  box-shadow: inset 0 0 5px #cba800aa;
  position: relative;
  overflow: hidden;
}

.energia-danca::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 60%; /* Exemplo: 60% de energia */
  background: linear-gradient(90deg, #ffce00, #f7d53c);
  border-radius: 8px;
  transition: width 0.3s ease;
}

/* Orixá guia no palco */
.orixa-guia {
  position: absolute;
  top: 12px;
  right: 18px;
  background: #f6f0b4cc;
  padding: 10px 14px;
  border-radius: 16px;
  box-shadow: 1px 1px 6px #d4b300cc;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  font-weight: 700;
  color: #6a5200;
  z-index: 4;
}

.orixa-avatar {
  font-size: 2.5rem;
}

/* Sequência de movimentos */
.sequencia-movimentos {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 90%;
  z-index: 3;
}

/* Controles do ritmo (barra e batida) */
.area-controles-danca {
  background: #fff5bd;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: inset 0 0 12px #c9b515aa;
  user-select: none;
}

.ritmo-atabaques h4,
.movimentos-disponiveis h4 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #7a6100;
  text-align: center;
}

.barra-ritmo {
  position: relative;
  height: 10px;
  background: #f5df5d;
  border-radius: 12px;
  box-shadow: inset 0 0 8px #d1b910;
  overflow: hidden;
}

.indicador-tempo {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 10px;
  background: #f4bc00;
  border-radius: 12px;
  animation: move-tempo 2s linear infinite;
}

@keyframes move-tempo {
  0% { left: 0; }
  100% { left: 100%; }
}

.marcadores-batida {
  position: absolute;
  top: 0;
  left: 0;
  height: 10px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
}

.marcadores-batida::before,
.marcadores-batida::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #f7d53c;
  border-radius: 50%;
  filter: drop-shadow(0 0 3px #f7d53cbb);
}

/* Movimentos disponíveis (botões) */
.botoes-movimentos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn-movimento {
  background: #f4e2a3;
  border: 2px solid #cbb031;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 1.9rem;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  box-shadow: 1px 1px 5px #b39300bb;
}

.btn-movimento:hover,
.btn-movimento:focus {
  background: #f7d53c;
  border-color: #f4bc00;
  outline: none;
}

/* Emoji do salto Sagrado ajustado */
.btn-movimento[data-movimento="salto"] {
  font-size: 1.8rem;
}

/* Área de resultado (feedback do movimento) */
.area-resultado-danca {
  background: #fff4a1;
  border-radius: 16px;
  padding: 16px 18px;
  text-align: center;
  box-shadow: inset 0 0 15px #dbb800bb;
  min-height: 80px;
  user-select: none;
  font-weight: 700;
  font-size: 1.2rem;
  color: #7f6100;
}

.feedback-movimento {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.feedback-placeholder {
  font-style: italic;
  color: #a38900cc;
}

/* Painel lateral */
.painel-lateral {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Seção seleção de orixás */
.selecao-orixa-danca {
  background: #fffcea;
  padding: 15px 18px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(230, 176, 0, 0.3);
  user-select: none;
}

.selecao-orixa-danca h4 {
  margin-bottom: 14px;
  color: #7a6100;
  font-size: 1.4rem;
  text-align: center;
}

/* Lista de orixás */
.lista-orixas-danca {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}

/* Item orixá */
.orixa-danca-item {
  background: #fff9c7;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: inset 0 0 8px #d4bb00cc;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background-color 0.3s ease;
  user-select: none;
}

.orixa-danca-item:hover,
.orixa-danca-item.active {
  background: #f7d53c;
  box-shadow: 0 0 15px #d6a400cc;
}

.orixa-emoji {
  font-size: 2.3rem;
  user-select: none;
}

.orixa-info {
  flex-grow: 1;
}

.orixa-nome {
  font-weight: 700;
  font-size: 1.25rem;
  color: #6a5200;
  user-select: none;
}

.orixa-estilo {
  font-size: 0.9rem;
  color: #7a6100cc;
  font-style: italic;
}

/* Dificuldade (estrelas) */
.dificuldade {
  font-size: 1.1rem;
  color: #c98a00;
  user-select: none;
}

/* Modos de jogo e controles - agora abaixo da seleção */
.modos-jogo,
.controles-jogo {
  background: #fffcea;
  padding: 15px 18px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(230, 176, 0, 0.3);
  user-select: none;
}

.modos-jogo h4,
.controles-jogo > button {
  color: #7a6100;
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 14px;
}

/* Modos de jogo */
.modos-jogo {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modo-jogo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  user-select: none;
  font-weight: 700;
  color: #7a6100;
  background: #fff8b3;
}

.modo-jogo:hover {
  background: #f7d53c;
  border-color: #cba800;
}

.modo-jogo.ativo {
  background: #f4bc00;
  border-color: #b38600;
  color: #fffdfa;
}

.modo-emoji {
  font-size: 1.7rem;
  user-select: none;
}

.modo-nome {
  flex-grow: 1;
  font-size: 1.2rem;
  user-select: none;
}

.modo-desc {
  font-size: 0.85rem;
  font-style: italic;
  color: #6a52008c;
}

/* Controles do jogo (botões) */
.controles-jogo {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.controles-jogo button {
  background: #f4e2a3;
  border: 2px solid #cbb031;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
  user-select: none;
  box-shadow: 1px 1px 5px #b39300bb;
  min-width: 90px;
}

.controles-jogo button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.controles-jogo button:hover:not(:disabled),
.controles-jogo button:focus:not(:disabled) {
  background: #f7d53c;
  border-color: #f4bc00;
  outline: none;
}

/* Progresso */
.progresso-danca {
  background: #fffbea;
  border-radius: 14px;
  padding: 15px 18px;
  box-shadow: inset 0 0 8px #d4bb00cc;
  color: #7a6100;
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 12px;
  user-select: none;
}

.progresso-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

/* Dicas */
.dicas-danca {
  background: #fffbea;
  border-radius: 14px;
  padding: 15px 18px;
  box-shadow: inset 0 0 8px #d4bb00cc;
  color: #7a6100;
  font-size: 1.05rem;
  margin-top: 12px;
  user-select: none;
}

.dica-item p {
  margin-bottom: 8px;
}

/* Modal básico */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000b;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 999;
}

.modal-content {
  background: #fffcea;
  padding: 20px 28px;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 0 20px #cda800cc;
  text-align: center;
  user-select: none;
  position: relative;
}

.modal-content h3 {
  margin-bottom: 18px;
  color: #7a6100;
}

.modal-content h4 {
  margin-bottom: 12px;
  color: #8b7100;
}

.modal-content p {
  margin-bottom: 12px;
  font-size: 1rem;
  color: #6e5900cc;
}

/* Botões do modal */
.btn-especial {
  background: #f4e2a3;
  border: 2px solid #cbb031;
  border-radius: 14px;
  padding: 10px 18px;
  cursor: pointer;
  color: #7a6100;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background 0.3s ease, border-color 0.3s ease;
  user-select: none;
  box-shadow: 1px 1px 6px #b49400cc;
  margin: 8px 6px 0 6px;
  min-width: 130px;
}

.btn-especial:hover,
.btn-especial:focus {
  background: #f7d53c;
  border-color: #cba800;
  outline: none;
}

/* Scroll para lista de Orixás */
.lista-orixas-danca::-webkit-scrollbar {
  width: 7px;
}

.lista-orixas-danca::-webkit-scrollbar-thumb {
  background: #d4bb00cc;
  border-radius: 10px;
}

/* Responsivo */
@media (max-width: 860px) {
  #jogo-danca .container-jogo {
    flex-direction: column;
    align-items: center;
  }

  .painel-principal {
    width: 100%;
  }

  .painel-lateral {
    width: 100%;
    max-width: 500px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 8px 10px;
  }

  header h1 {
    font-size: 1.6rem;
  }

  .info-jogo {
    font-size: 1rem;
    gap: 14px;
  }

  .painel-lateral {
    max-width: 100%;
  }

  .btn-movimento {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .controles-jogo button {
    min-width: 80px;
    font-size: 1rem;
    padding: 8px 12px;
  }
}
