/* Reset e base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'VT323', sans-serif;
  background-image: url("../imagens/bg_fatec.png");
  background-color: #1a348d;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  overflow: hidden;
  padding-top: 8vh;
  padding-bottom: 6vh;
}

/* Menu */
.menu {
  position: fixed;
  bottom: 10vh;
  right: 10vw;
  display: flex;
  flex-direction: column;
  gap: 2vh;
  z-index: 100;
  transform: scale(1.1);
  transform-origin: bottom right;
  align-items: flex-end;
}

.menu-btn {
  font-family: 'Press Start 2P', sans-serif;
  background-image: url("../imagens/botao.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  color: white;
  font-size: clamp(12px, 1.4vw, 14px);
  border: none;
  padding: 1.2vh 2vw;
  display: flex;
  align-items: center;
  gap: 1vw;
  cursor: pointer;
  image-rendering: pixelated;
  width: clamp(180px, 20vw, 220px);
  height: clamp(40px, 7vh, 60px);
  justify-content: center;
  text-shadow: 2px 2px #000;
  transition: all 0.2s ease-in-out;
}

.menu-btn:hover {
  filter: brightness(1.2);
  transform: scale(1.03);
}

#btnJogar {
  width: clamp(200px, 26vw, 260px);
  height: clamp(60px, 10vh, 80px);
  font-size: clamp(12px, 1.5vw, 14px);
}

.icon {
  width: clamp(24px, 3vw, 30px);
  height: auto;
  image-rendering: pixelated;
}

/* Layout principal */
.content {
  display: flex;
  flex-direction: row;
  width: 80vw;
  max-width: 1000px;
  height: 90vh;
  transform: scale(1.1);
  position: relative;
  z-index: 1;
  padding: 5vw;
  margin-left: 7vw;
  top: -5vh;
}

/* Lado esquerdo com a imagem */
.lado-esquerdo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 3vw;
}

#imgBgCax {
  width: clamp(220px, 30vw, 360px);
  height: auto;
}

/* Lado direito */
.lado-direito {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3vh;
  padding-top: 6vh;
  padding-right: 6vw;
}

#balao-texto {
  width: clamp(220px, 30vw, 320px);
  height: clamp(120px, 24vh, 180px);
  background-image: url(../imagens/balao.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vw;
  color: black;
  font-size: clamp(16px, 2vw, 28px);
  font-weight: bold;
  text-align: center;
  margin-top: -7vh;
  margin-left: -10vw;
  padding-bottom: 9vh;
}

/* Popup de nome */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.popup-content {
  background: white;
  padding: 5vw;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  max-width: 90vw;
}

.popup-content input {
  padding: 10px;
  width: 80%;
  margin: 10px 0;
  font-size: 1.2em;
  font-family: 'VT323', monospace;
}

.popup-content button {
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  border: none;
      background-color: #1a348d;
  color: white;
  border-radius: 8px;
  transition: background 0.3s ease;
  font-family: 'Press Start 2P', monospace;
  margin-top: 10px;
}

.popup-content button:hover {
  background-color: #0e1d4f;
}

/* Créditos */
.creditos-box {
  position: absolute;
  right: 10vw;
  bottom: 16vh;
  background-color: #f5f5f5;
  border: 2px solid #ccc;
  border-radius: 5px;
  padding: 2vw;
  width: clamp(260px, 40vw, 400px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: left;
  z-index: 100000;
  transform: scale(1.2);
}

.emoji {
  width: clamp(24px, 5vw, 44px);
  height: auto;
  vertical-align: middle;
  margin-right: 8px;
  margin-top: 5px;
}

.titulo {
  font-family: 'VT323', monospace;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: bold;
  color: #222;
}

.nome {
  font-family: 'VT323', monospace;
  font-size: clamp(12px, 1.8vw, 16px);
  color: #222;
  padding: 10px 0;
}




 /* Tela de carregamento */
    #preloader {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: #1a348d; /* azul */
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 9999;
      transition: opacity 0.5s ease;
    }

    #preloader.fade-out {
      opacity: 0;
      pointer-events: none;
    }

    /* Evita rolagem enquanto carrega */
    body.loading {
      overflow: hidden;
    }

    /* Conteúdo principal invisível até o fim do preload */
    #content {
      display: none;
    }

    body.loaded #content {
      display: block;

    }

    #loading-gif {
  max-width: 80vw;
  width: 500px;
  height: auto;
}
