/* Trilha 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-casa-normal: #f8f9fa;
  --cor-casa-orixa: #FFD700;
  --cor-casa-desafio: #FF6347;
  --cor-casa-bencao: #32CD32;
  --cor-casa-especial: #9b59b6;
  --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 350px;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.painel-trilha {
  background: rgba(255,255,255,0.95);
  padding: 20px;
  border-radius: 20px;
  box-shadow: var(--sombra-carta);
  overflow: auto;
}

.tabuleiro-trilha {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  min-height: 500px;
  padding: 20px;
}

.casa-trilha {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border: 2px solid transparent;
}

.casa-trilha:hover {
  transform: scale(1.1);
  box-shadow: var(--sombra-carta);
}

.casa-normal {
  background: var(--cor-casa-normal);
  color: var(--cor-texto);
}

.casa-orixa {
  background: var(--cor-casa-orixa);
  color: white;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.casa-desafio {
  background: var(--cor-casa-desafio);
  color: white;
  box-shadow: 0 0 15px rgba(255, 99, 71, 0.5);
}

.casa-bencao {
  background: var(--cor-casa-bencao);
  color: white;
  box-shadow: 0 0 15px rgba(50, 205, 50, 0.5);
}

.casa-especial {
  background: var(--cor-casa-especial);
  color: white;
  box-shadow: 0 0 15px rgba(155, 89, 182, 0.5);
}

.casa-inicio {
  background: linear-gradient(45deg, var(--cor-primaria), var(--cor-secundaria));
  color: white;
  font-size: 1rem;
}

.casa-fim {
  background: linear-gradient(45deg, var(--cor-detalhe), var(--cor-primaria));
  color: white;
  font-size: 1rem;
}

.jogador-posicao {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #FF1493;
  color: white;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border: 2px solid white;
  animation: pulso 1s infinite;
}

@keyframes pulso {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.numero-casa {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.6rem;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 1px 3px;
  border-radius: 3px;
}

.painel-controles {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.area-dado {
  background: rgba(255,255,255,0.95);
  padding: 20px;
  border-radius: 15px;
  box-shadow: var(--sombra-carta);
  text-align: center;
}

.dado {
  width: 80px;
  height: 80px;
  background: white;
  border: 3px solid var(--cor-secundaria);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dado:hover {
  transform: rotate(5deg) scale(1.1);
}

.dado.rolando {
  animation: rolarDado 1s ease-in-out;
}

@keyframes rolarDado {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(90deg); }
  50% { transform: rotate(180deg); }
  75% { transform: rotate(270deg); }
  100% { transform: rotate(360deg); }
}

.btn-rolar {
  background: var(--cor-secundaria);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  width: 100%;
}

.btn-rolar:hover {
  background: #3a7bc8;
  transform: translateY(-2px);
}

.btn-rolar:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.resultado-dado {
  margin-top: 10px;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--cor-terciaria);
}

.area-jogador {
  background: rgba(255,255,255,0.95);
  padding: 20px;
  border-radius: 15px;
  box-shadow: var(--sombra-carta);
  text-align: center;
}

.area-jogador h3 {
  color: var(--cor-secundaria);
  margin-bottom: 15px;
}

.avatar-jogador {
  font-size: 3rem;
  margin: 15px 0;
}

.info-jogador {
  text-align: left;
}

.info-jogador p {
  margin: 8px 0;
  padding: 5px 10px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--cor-detalhe);
}

.area-inventario {
  background: rgba(255,255,255,0.95);
  padding: 20px;
  border-radius: 15px;
  box-shadow: var(--sombra-carta);
}

.area-inventario h3 {
  color: var(--cor-secundaria);
  margin-bottom: 15px;
  text-align: center;
}

.inventario-bencaos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  min-height: 100px;
}

.bencao-item {
  background: var(--cor-detalhe);
  color: white;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: bold;
  animation: aparecer 0.5s ease-in-out;
}

@keyframes aparecer {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.controles-jogo {
  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;
}

/* 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.5rem;
  margin-bottom: 20px;
}

.modal-orixa-img {
  font-size: 4rem;
  margin: 20px 0;
}

.modal-opcoes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.opcao-evento {
  background: var(--cor-secundaria);
  color: white;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-weight: bold;
}

.opcao-evento:hover {
  background: #3a7bc8;
  transform: translateY(-2px);
}

.estatisticas-finais {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.estatistica-item {
  background: var(--cor-secundaria);
  color: white;
  padding: 15px;
  border-radius: 10px;
  font-weight: bold;
}

.recompensas-finais {
  background: var(--cor-detalhe);
  color: white;
  padding: 15px;
  border-radius: 10px;
  margin: 20px 0;
  font-weight: bold;
}

/* Responsividade */
@media (max-width: 1200px) {
  .container-jogo {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .painel-controles {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .area-dado,
  .area-jogador,
  .area-inventario {
    flex: 1;
    min-width: 250px;
  }
  
  .controles-jogo {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  .info-jogo {
    gap: 10px;
  }
  
  .info-jogo span {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
  
  .tabuleiro-trilha {
    grid-template-columns: repeat(8, 1fr);
  }
  
  .casa-trilha {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .painel-controles {
    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;
  }
  
  .tabuleiro-trilha {
    grid-template-columns: repeat(6, 1fr);
    padding: 10px;
  }
  
  .casa-trilha {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .modal-content {
    padding: 20px;
    margin: 10px;
  }
}