@import url("https://fonts.googleapis.com/css2?family=Tagesschrift&display=swap");

/*  Variáveis globais  */
:root {
  --primary-color: #d9c4a3;
  --secondary-color: #f3e3c9;
  --text-color: #0a0a0a;
  --font-main: "Tagesschrift", system-ui;
}

/*  Estilos Base */
body {
  font-family: var(--font-main);
  background-color: var(--primary-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
}

/*  Layout de telas */
.screen {
  max-width: 500px;
  width: 100vh;
  padding: 0px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.4rem;
}

.logo {
  width: 80%;
  margin-bottom: 1rem;
}

/* Botões */
.btn {
  font-family: var(--font-main);
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  color: var(--text-color);
}

.btn:hover {
  transform: scale(1.05);
  transform: translateY(-5px);
}

.btn-menu {
  background-color: var(--primary-color);
  border: 4px solid var(--text-color);
  width: 80%;
  padding: 10px;
  margin: 10px auto;
  display: block;
  font-size: 1.4rem;
}

.btn-game {
  background-color: var(--text-color);
  color: var(--primary-color);
  padding: 15px;
  margin: 10px auto;
}

.btn-action {
  background-color: var(--text-color);
  border: 3px solid var(--primary-color);
  color: var(--secondary-color);
  width: 40%;
  height: 80px;
  padding: 5px 10px;
  gap: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}

.btn-upgrade {
  background-color: var(--secondary-color);
  border: 3px solid var(--text-color);
  width: 100%;
  margin: 10px 0;
}

.btn-upgrade:hover {
  transform: scale(1.02);
}

.btn-upgrade:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-upgrade:disabled:hover {
  transform: none;
}

.btn-small {
  margin-top: 30px;
  font-size: 0.85rem;
  padding: 8px;
  background-color: var(--text-color);
  color: var(--secondary-color);
}

.btn-image {
  width: 50px;
  height: 50px;
  margin-right: 5px;
  vertical-align: middle;
}

.btn-exit {
  font-family: var(--font-main);
  background-color: var(--text-color);
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
  font-size: 0.85rem;
  padding: 4px;
  margin: 4px;
  cursor: pointer;
}

/* Splash */
#splash-screen {
  height: 100%;
  cursor: pointer;
}
.text-pc,
.text-mobile {
  animation: pulse 2s infinite;
}

.text-mobile {
  display: none;
}

/* Menu */
.menu-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
}

/* História  / Créditos / Sobre / Instruções */
.story-content,
.story-content,
.credits-content,
.about-content,
.instructions-content,
.game-over-content {
  background-color: var(--primary-color);
  padding: 20px;
  border: 3px solid var(--text-color);
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 1.1rem;
  text-align: justify;
}

.score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 15px;
}

.score span {
  margin-right: 10px;
  font-weight: bold;
}

.star {
  width: 25px;
}

/* Jogo */
#game-screen {
  border: 3px solid var(--text-color);
  padding: 10px;
  gap: 10px;
  margin: 5px;
}

.exit-bar {
  display: flex;
  justify-content: end;
  background-color: var(--text-color);
  margin-bottom: 4px;
  margin-top: -5px;
  width: 100%;
}
.status-container {
  border: 3px solid var(--text-color);
  margin-bottom: 5px;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-items: center;
  justify-content: space-around;
  background-color: var(--text-color);
  border: 3px solid var(--primary-color);
  padding: 5px;
}

.status-item {
  display: flex;
  align-items: center;
  color: var(--secondary-color);
}

.status-item img {
  height: 25px;
  margin-right: 5px;
}

.status-item span {
  font-size: 1.4rem;
}

.game-area {
  background-color: var(--text-color);
  padding: 5px;
  margin-bottom: 7px;
  height: 100%;
}

.monster-name {
  font-size: 1.25rem;
  margin-bottom: 40px;
  background-color: var(--text-color);
  color: var(--secondary-color);
  border: 2px solid var(--primary-color);
  padding: 5px 10px;
}

.room-container {
  position: relative;
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  background-size: cover;
  background-position: center;
  border: 3px solid var(--primary-color);
}

.room-element {
  position: absolute;
  width: 175px;
  height: 175px;
  bottom: 10px;
}

.room-element img {
  display: flex;
  height: 175px;
  position: absolute;
  bottom: 0;
  object-fit: contain;
}

.room-element.boss {
  position: absolute;
  width: 185px;
  height: 185px;
  bottom: 10px;
}

.monster-name {
  position: absolute;
  top: 10px;
}

.objects-elemets {
  position: relative;
  height: 100%;
}

.action-layer {
  z-index: 100;
  height: 300px;
  width: 100%;
  background-size: cover;
  background-position: center;
}

.log-area {
  background-color: var(--text-color);
  color: var(--secondary-color);
  padding: 5px;
  border: 3px solid var(--primary-color);
  min-height: 62px;
  font-size: 1.25rem;
  text-align: center;
  line-height: 1.2;
}
/*  Ações */
.orientation {
  font-size: 1.25rem;
  margin-bottom: 20px;
  margin-top: 10px;
  height: 20px;
  color: var(--secondary-color);
}

.action-buttons,
.explore-buttons,
.trap-buttons,
.chest-buttons,
.safe-room-buttons,
.continue-buttons {
  display: flex;
  justify-content: space-around;
  margin-bottom: 15px;
  padding: 5px;
}

.action-buttons {
  align-items: center;
  justify-content: space-around;
  gap: 5px;
}

.continue-buttons {
  justify-content: center;
}

.action-area {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  background-color: var(--text-color);
}

.action-container {
  margin-top: 10px;
  height: 120px;
}

/* Modal de Fortalecimento */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background-color: var(--primary-color);
  border: 5px solid var(--text-color);
  padding: 20px;
  max-width: 500px;
  width: 90%;
}

/* Modal apagar dados */
#erase-modal .modal-content,
#exit-modal .modal-content {
  background-color: var(--primary-color);
  border: 5px solid var(--text-color);
  padding: 20px;
  max-width: 500px;
  width: 80%;
  line-height: 1.5;
}

#erase-modal p {
  margin-bottom: 50px;
}

#ok-buttons {
  display: flex;
  flex-direction: column;
}
.yes-no-buttons {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
}
.btn-yes {
  background-color: var(--text-color);
  border: 3px solid var(--text-color);
  color: var(--secondary-color);
  padding: 5px 30px;
}
.btn-no,
.btn-ok {
  background-color: var(--primary-color);
  border: 3px solid var(--text-color);
  padding: 5px 30px;
}

/*  Animações */
.zoomIn {
  animation: zoomIn 0.5s ease;
}

.zoomOut {
  animation: zoomOut 1s ease;
}

.gone {
  animation: gone 2.5s ease;
}

.disappear {
  animation: disappear 2.5s ease;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 0.9;
  }
}

@keyframes zoomIn {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.25);
  }
  50% {
    transform: scale(1.5);
  }
  75% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes zoomOut {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(0.95);
  }
  50% {
    transform: scale(0.8);
  }
  75% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes gone {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

@keyframes disappear {
  100% {
    opacity: 0;
  }
}

/* Responsividade */
@media (max-width: 500px) {
  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 1.2rem;
  }
  .btn {
    font-size: 0.85rem;
    padding: 5px;
  }
  .btn-menu {
    font-size: 1.3rem;
  }
  .btn-game {
    font-size: 1.2rem;
    padding: 10px 20px;
  }
  .btn-small {
    font-size: 0.8rem;
  }
  .text-mobile {
    display: block;
  }
  .text-pc {
    display: none;
  }
  .action-buttons .btn-action {
    font-size: 0.7rem;
  }
  .room-container {
    height: 225px;
  }
  .room-element img {
    height: 135px;
  }
  .room-element {
    width: 135px;
    height: 135px;
  }
  .room-element.boss {
    width: 145px;
    height: 145px;
  }
  .action-layer {
    height: 225px;
  }
  .story-content,
  .credits-content,
  .about-content,
  .game-over-content,
  .instructions-content {
    padding: 10px;
    font-size: 1.1rem;
  }
  .status-item,
  .log-area {
    padding: 7px;
    font-size: 1.1rem;
    line-height: 1.5rem;
  }
  .instructions-content {
    font-size: 1rem;
  }
  .btn-yes,
  .btn-no,
  .btn-ok {
    padding: 5px 20px;
  }
}

/* Responsividade */
@media (max-width: 380px) {
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1rem;
  }
  .story-content,
  .credits-content,
  .about-content,
  .game-over-content,
  .instructions-content {
    padding: 10px;
    font-size: 0.875rem;
  }
  .instructions-content {
    padding: 10px;
    font-size: 0.9rem;
  }
}
