*{
  box-sizing: border-box;  
}

body{
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    background-color: #f4f4dc;
    margin: 0;
    color: #ccc;
    line-height: 0.3rem;
    font-weight: bold;
}

.textoIniciar{
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem auto; 
  text-decoration: none;
  font-size: xx-large;
  width: fit-content;
  color: #ccc;
}

.textoIniciar:hover{
  color: #0bca44;
}

p{
  display: flex;
  justify-content: center;
  font-size: larger;
}

.campo__tutorial{
  background-color: #333;
  width: 100%;
  height: 100vh;
}



.naoclicavel{
  pointer-events: none;
}


.mensagem{
  position: fixed;
  text-align: center;
  align-self: center;
  line-height: normal;
  width: 50%;
  top: 50%;
  background-color: rgba(40, 34, 22, 0.972);
  padding: 35px;
  border-radius: 10px;
  pointer-events: auto;
  font-size: larger;
}


.player__area {
  display: flex;
  justify-content: center;
  width: 100vw;
  height: auto;
  padding: 0.5rem 0;
}


.info.planilha {
  display: flex;
  flex-direction: row;
  border: 1px solid rgba(138, 137, 137, 0.574);
}

.linha-celula {
  display: flex;
  flex-direction: column;
}

.celula {
  background-color: rgba(156, 156, 156, 0.428);
  text-align: center;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.celula span.numero {
  font-weight: bold;
  font-size: 1.1rem;
  width: fit-content;
  align-self: center;
  color: #0bca44;
}




.player {
  width: 95vw;
  height: 7rem;
  background-color: rgba(0, 0, 0, 0.679);
  border-radius: 10px;
  display: flex;
  box-sizing: border-box;
  flex-direction: row;
  justify-content: center;
  border: 4px solid #0bca44;
}

.player.p2 {
  border-color: #ee6808;
}

.player__info {
  text-align: center;
  padding: 0.2rem 0.3rem;
  margin: 0.2rem;
  font-size: 0.9rem;
}

.player__info__vida, .player__info__muro{
  display: flex;
}

.info {
  display: flex;
  flex-wrap: wrap;
}


.campo {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-image: url('/assets/img/background.png');
  background-size: cover;
  background-position: center;
}
  
  
.campo__jogo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100vw;
  flex-grow: 1;
  padding: 0.5rem 0;
}

  .campo__jogo.inicio{
    height: 100%;
    min-height: 100vh;
    width: 100%;
    line-height: 2rem;
    font-size: 0.8rem;
    padding: 1rem;
    justify-content:left;
    background-color: #333333f5;
  }

  .campo-tutorial{
    position: absolute;
    height: 100vh;
    width: 100vw;
    line-height: 2rem;
    font-size: 0.8rem;
    padding: 1rem;
    background-color: #333;
  }

  .campo__cartas {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }


  .campo__jogo__jogador {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    padding: 0.5rem;
  }
  
  
  
  .campo__jogo__jogador__carta {
    height: 25vh;
    background-color: #222;
    border: black 0.25rem solid;
    border-radius: 10px;
    transition: all 0.2s ease;
  }

  .campo__jogo__jogador__carta.img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .campo__jogo__jogador__carta.selecionaveis {
    transition: transform 0.2s ease, border 0.2s ease;
  }

  
  .campo__jogo__jogador__carta.selecionaveis:hover {
    border: green 0.25rem solid;
    cursor: pointer;
    transform: translateY(-2rem) scale(1.3);
    transition: transform 0.2s ease, border 0.2s ease;
  }


  
  .campo__jogo__jogador__carta.selecionaveis.desabilitada:hover::after {
    content: "Descartar";
    position: absolute;
    top: 10%;
    left:50%;
    transform: translate(-50%,-50%);
    background-color: rgba(50, 50, 50, 0.8);
    color: white;
    border: rgb(143, 24, 3) 0.25rem solid;
    border-radius: 8px;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
  }


  /* Títulos */
.titulo{
  align-self: center;
  padding: 1rem;
}

.titulo-inicio{
  text-align: center;
}

  .carta{
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
  }


  .txtBox{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem 2rem;
    background-color: #4b2e1a;
    color: #d8b28e;
    font-size: 2.2rem;
    font-weight: bold;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
    border: 2px solid #8b5a2b;
    font-family: 'Georgia', serif;
    z-index: 999;
    text-align: center;
  }


  .castle-bar-wrapper{
    justify-self: center;
    width: 120px;          
    height: 16px;         
    background-color: #ccc;
    border: 2px solid #333;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
  }
  .castle-bar{
    width: 50%;
    height: 100%;
    background-color: #3498db;
    transition: width 0.3s ease-in-out;
  }


  #enemyCastleBar{
    background-color: #e74c3c;
  }

  #enemyWallBar{
    background-color: #e74c3c;
  }


  .botao-dicas{
    display: flex;
    align-self: center;
    justify-content: center;
    padding: 1rem;
  }



  @keyframes jogarCarta{
    0%{
      transform: translate(0, -2rem) scale(1.3);
      z-index: 10;
    }
    30%{
      transform: translate(0, -7.5rem) scale(1.50);
      z-index: 10;
    }
    70%{
      transform: translate(0, -7.5rem) scale(1.50);
      z-index: 10;
    }
    100%{
      transform: translate(0, 0) scale(1);
      z-index: 1;
    }
  }


@keyframes jogarBot {
  0%{
    transform: translate(0, 0) scale(1);
    z-index: 10;
  }
  30%{
    transform: translate(0, 7.5rem) scale(1.50);
    z-index: 10;
  }
  70%{
    transform: translate(0, 7.5rem) scale(1.50);
    z-index: 10;
  }
  100%{
    transform: translate(0, 0) scale(1);
    z-index: 1;
  }
}

.descartavel.p1{
  opacity: 0.6;
}

  .animar-carta{
    animation: jogarCarta 2s ease-in-out;
  }

  .animar-carta.descartada::after{
    content: "Descartada";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background-color: rgb(0, 0, 0);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    z-index: 20;
    pointer-events: none;
  }


  .animar-carta-bot{
    animation: jogarBot 2s ease-in-out;
  }

  .animar-carta-bot.descartada::after{
    content: "Descartada";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background-color: rgb(0, 0, 0);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    z-index: 10;
    pointer-events: none;
  }
  


  .invisivel{
    display: none;
  }

  .tela-final {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    font-size: small;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  }
  
  .button {
    margin-top: 2rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    background-color: #28a745;
    color: white;
    cursor: pointer;
  }
  
  .button.tutorial{
    margin-top: 0;
  }

  .naoclicavelBotao{
    pointer-events: none;
    background-color: #222;
  }


  @keyframes brilho-sutil {
    0% {
      box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
    }
    50% {
      box-shadow: 0 0 16px rgba(0, 255, 0, 0.6);
    }
    100% {
      box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
    }
  }


  @keyframes brilho-contorno{
    0% {
      transform: scale(1);
      color: #0bca44;
    }
    50% {
      transform: scale(1.7);
      color: rgba(217, 198, 250, 0.8);
    }
    100% {
      transform: scale(1);
      color: #0bca44;
    }
  }
  
  .brilho-animado{
    animation: brilho-contorno 1s linear;
  }

  @keyframes dark-contorno{
    0% {
      transform: scale(1);
      color: #0bca44;
    }
    50% {
      transform: scale(1.6);
      color: rgba(209, 24, 24, 0.8);
    }
    100% {
      transform: scale(1);
      color: #0bca44;
    }
  }

  .dark-animado{
    animation: dark-contorno 1s linear
  }

  @keyframes dark-contorno-recurso{
    0% {
      transform: scale(1);
      color: #0bca44;
    }
    50% {
      transform: scale(1.1);
      color: rgba(221, 52, 52, 0.8);
    }
    100% {
      transform: scale(1);
      color: #0bca44;
    }
  }



  .dark-animado-recurso{
    animation: dark-contorno-recurso 1s linear
  }