/* Cores e Elementos dos Orixás - CSS */

:root {
  --cor-primaria: #FFD700;
  --cor-secundaria: #4682B4;
  --cor-terciaria: #FF6347;
  --cor-detalhe: #32CD32;
  --cor-fundo: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --cor-texto: #2c3e50;
  --cor-carta: #ffffff;
  --cor-acerto: #28a745;
  --cor-erro: #dc3545;
  --cor-selecionado: #17a2b8;
  --sombra-carta: 0 4px 8px rgba(0,0,0,0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', Arial, sans-serif;
  background: var(--cor-fundo);
  min-height: 100vh;
  color: var(--cor-texto);
  padding: 20px;
}

.btn-voltar {
  position: fixed;
  top: 20px;
  left: 20px;
  background: var(--cor-primaria);
  color: var(--cor-texto);
  padding: 10px 15px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: var(--sombra-carta);
  transition: all 0.3s ease;
  z-index: 1000;
}

.btn-voltar:hover {
  background: #FFA500;
  transform: translateY(-2px);
}

header {
  text-align: center;
  margin-bottom: 30px;
  background: rgba(255,255,255,0.9);
  padding: 20px;
  border-radius: 20px;
  box-shadow: var(--sombra-carta);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--cor-primaria);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--cor-texto);
}

.info-jogo {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.info-jogo span {
  background: var(--cor-secundaria);
  color: white;
  padding: 8px 15px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 0.9rem;
}

.container-jogo {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.painel-principal {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.area-orixa-atual {
  background: rgba(255,255,255,0.95);
  padding: 25px;
  border-radius: 20px;
  box-shadow: var(--sombra-carta);
  text-align: center;
}

.area-orixa-atual h3 {
  color: var(--cor-secundaria);
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.card-orixa {
  background: linear-gradient(135deg, var(--cor-primaria), #FFA500);
  padding: 30px;
  border-radius: 20px;
  color: white;
  box-shadow: var(--sombra-carta);
}

.orixa-emoji {
  font-size: 4rem;
  margin-bottom: 15px;
}

.orixa-nome {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.orixa-descricao {
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.4;
}

.area-selecao {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.secao-cores,
.secao-elementos {
  background: rgba(255,255,255,0.95);
  padding: 20px;
  border-radius: 15px;
  box-shadow: var(--sombra-carta);
}

.secao-cores h4,
.secao-elementos h4 {
  color: var(--cor-secundaria);
  margin-bottom: 15px;
  text-align: center;
  font-size: 1.1rem;
}

.opcoes-cores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.opcoes-elementos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.opcao-cor {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
  margin: 0 auto;
}

.opcao-cor:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.opcao-cor.selecionado {
  border-color: var(--cor-selecionado);
  transform: scale(1.15);
}

.opcao-cor.correto {
  border-color: var(--cor-acerto);
  animation: pulso-acerto 1s ease-in-out;
}

.opcao-cor.incorreto {
  border-color: var(--cor-erro);
  animation: balançar 0.5s ease-in-out;
}

.opcao-elemento {
  background: var(--cor-carta);
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-weight: bold;
}

.opcao-elemento:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: var(--sombra-carta);
}

.opcao-elemento.selecionado {
  background: var(--cor-selecionado);
  color: white;
  border-color: var(--cor-selecionado);
}

.opcao-elemento.correto {
  background: var(--cor-acerto);
  color: white;
  border-color: var(--cor-acerto);
}

.opcao-elemento.incorreto {
  background: var(--cor-erro);
  color: white;
  border-color: var(--cor-erro);
}

.elemento-emoji {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.elemento-nome {
  font-size: 0.9rem;
}

.area-confirmacao {
  text-align: center;
}

.btn-confirmar {
  background: var(--cor-detalhe);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.btn-confirmar:hover:not(:disabled) {
  background: #28a745;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.btn-confirmar:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.resultado-rodada {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resultado-acerto {
  background: var(--cor-acerto);
  color: white;
  padding: 15px 25px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 1.1rem;
  animation: aparecer 0.5s ease-in-out;
}

.resultado-erro {
  background: var(--cor-erro);
  color: white;
  padding: 15px 25px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 1.1rem;
  animation: balançar 0.5s ease-in-out;
}

.painel-lateral {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.progresso-nivel {
  background: rgba(255,255,255,0.95);
  padding: 20px;
  border-radius: 15px;
  box-shadow: var(--sombra-carta);
}

.progresso-nivel h4 {
  color: var(--cor-secundaria);
  margin-bottom: 15px;
  text-align: center;
}

.barra-progresso {
  width: 100%;
  height: 20px;
  background: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.barra-preenchida {
  height: 100%;
  background: linear-gradient(90deg, var(--cor-detalhe), var(--cor-primaria));
  width: 0%;
  transition: width 0.5s ease;
}

#progresso-texto {
  text-align: center;
  font-weight: bold;
  color: var(--cor-texto);
}

.historico-acertos {
  background: rgba(255,255,255,0.95);
  padding: 20px;
  border-radius: 15px;
  box-shadow: var(--sombra-carta);
}

.historico-acertos h4 {
  color: var(--cor-secundaria);
  margin-bottom: 15px;
  text-align: center;
}

.lista-acertos {
  max-height: 150px;
  overflow-y: auto;
}

.acerto-item {
  background: var(--cor-detalhe);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 5px;
  font-size: 0.9rem;
  font-weight: bold;
  animation: aparecer 0.3s ease-in-out;
}

.dicas-jogo {
  background: rgba(255,255,255,0.95);
  padding: 20px;
  border-radius: 15px;
  box-shadow: var(--sombra-carta);
}

.dicas-jogo h4 {
  color: var(--cor-secundaria);
  margin-bottom: 15px;
  text-align: center;
}

.dica-item {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 4px solid var(--cor-primaria);
}

.dica-item p {
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0;
}

.controles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-especial {
  background: var(--cor-terciaria);
  color: white;
  border: none;
  padding: 12px 15px;
  border-radius: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-especial:hover {
  background: #FF4500;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-especial:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Animações */
@keyframes aparecer {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes balançar {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes pulso-acerto {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Modal */
.modal {
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: aparecer 0.3s ease-in-out;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h3 {
  color: var(--cor-primaria);
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.modal-resultado-icon {
  font-size: 4rem;
  margin: 20px 0;
}

.modal-resultado-detalhes {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid var(--cor-primaria);
}

.modal-conhecimento {
  margin: 20px 0;
  padding: 15px;
  background: var(--cor-secundaria);
  color: white;
  border-radius: 10px;
  text-align: left;
  line-height: 1.6;
}

.modal-nivel-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.info-item {
  background: var(--cor-secundaria);
  color: white;
  padding: 15px;
  border-radius: 10px;
  font-weight: bold;
}

.modal-recompensas {
  background: var(--cor-detalhe);
  color: white;
  padding: 15px;
  border-radius: 10px;
  margin: 20px 0;
  font-weight: bold;
}

/* Cores específicas */
.cor-branco { background: #FFFFFF; border: 2px solid #ddd; }
.cor-azul { background: #4682B4; }
.cor-amarelo { background: #FFD700; }
.cor-vermelho { background: #DC143C; }
.cor-verde { background: #228B22; }
.cor-roxo { background: #9932CC; }
.cor-rosa { background: #FF69B4; }
.cor-laranja { background: #FF8C00; }
.cor-preto { background: #2F4F4F; }
.cor-dourado { background: linear-gradient(45deg, #FFD700, #FFA500); }
.cor-prateado { background: linear-gradient(45deg, #C0C0C0, #A9A9A9); }
.cor-coral { background: #FF7F50; }

/* Responsividade */
@media (max-width: 1024px) {
  .container-jogo {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .painel-lateral {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .progresso-nivel,
  .historico-acertos,
  .dicas-jogo,
  .controles {
    flex: 1;
    min-width: 250px;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  .info-jogo {
    gap: 10px;
  }
  
  .info-jogo span {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
  
  .area-selecao {
    grid-template-columns: 1fr;
  }
  
  .opcoes-cores {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .opcao-cor {
    width: 50px;
    height: 50px;
  }
  
  .painel-lateral {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  
  header {
    padding: 15px;
  }
  
  header h1 {
    font-size: 1.5rem;
  }
  
  .info-jogo span {
    font-size: 0.7rem;
    padding: 5px 10px;
  }
  
  .card-orixa {
    padding: 20px;
  }
  
  .orixa-emoji {
    font-size: 3rem;
  }
  
  .orixa-nome {
    font-size: 1.5rem;
  }
  
  .modal-content {
    padding: 20px;
    margin: 10px;
  }
}