@font-face {
  font-family: 'Fibberish';
  src: url('../fonts/fibberish.ttf') format('truetype'); 
}

@font-face {
  font-family: 'MinimalPixelv2';
  src: url('../fonts/C&CRedAlert.ttf') format('truetype'); 
}

body {
  color: #ffffff;
  font-family: sans-serif;
  font-family: 'MinimalPixelv2';
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
  background-image: url('../images/monster_tile.png');
  background-repeat: repeat;
  animation: scrollBackground 20s linear infinite;
  overflow: hidden;
}


@keyframes scrollBackground {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100% 100%;
  }
}

.swirl {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  transform: translate(-50%, -50%);
  image-rendering: pixelated;
  image-rendering: crisp-edges; 
}


h1 {
  font-family: 'Fibberish', sans-serif;
  letter-spacing: 0.2em;
  font-size: 100px;
  text-transform: uppercase;
  margin-bottom: -5px;  
  margin-top: -5px;
  color: white;
  text-shadow: 
  3px 3px 0 #ff4dbb, /* Top-left */
  -3px -3px 0 #ff4dbb, /* Bottom-right */
  3px -3px 0 #ff4dbb, /* Top-right */
  -3px 3px 0 #ff4dbb; /* Bottom-left */
}

.text-pink {
  color: #ff1eb6;
}

p {
  margin: 3px;
  font-size: 30px;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.flex-horizontal {
  display: flex;
  flex-direction: row; 
  gap: 10px;
  justify-content: center;
  margin-top: 5px;
}

button {
  font-family: 'MinimalPixelv2', sans-serif;
  font-size: 30px;
  cursor: pointer;
  transition: color 0.3s ease;
  border-width: 4px;
  border-style: solid;
  border-top-color: #8b9bb4;      
  border-left-color: #5a6988;     
  border-right-color: #3f4a6a;    
  border-bottom-color: #2e3a56;   
  background-color: #6a7c94;      
  color: #ffffff;
}


button:hover {
  color: #181425;
}

/*======trippy title======*/

#trippyTitle {
  display: inline-block;
  white-space: nowrap;
  letter-spacing: 0.15em;
}

h1 span {
  display: inline-block;
  margin: 0 3px;
  animation: floatWiggle 3s ease-in-out infinite;
}

@keyframes floatWiggle {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(-2px, 3px) rotate(-1deg); }
  50%  { transform: translate(2px, -2px) rotate(1deg); }
  75%  { transform: translate(-1px, 2px) rotate(-0.5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}


/*======tablet version UI======*/

/* Tablet-friendly adjustments */
@media (min-width: 600px) and (max-width: 1024px) {
  body {
    height: 100vh;
    overflow: hidden;
  }

  h1 {
    font-size: 60px; 
    letter-spacing: 0.1em;
  }

  #trippyTitle span {
    margin: 0 2px;
  }

  p {
    font-size: 20px; 
    margin: 2px;
  }

  .button-container {
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

  button, 
  .button-container img.pixelated {
    font-size: 24px;
    height: 60px; 
  }

  .swirl {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .center-container {
    width: 90vw;
    padding: 0 10px;
  }
}


/*======mobile version UI======*/
@media (max-width: 600px) {

  html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  body {
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    text-align: center;
    padding: 0;
    margin: 0;
  }

  h1 {
    font-size: 35px; 
    letter-spacing: 0.1em;
    text-shadow: 
      2px 2px 0 #ff4dbb,
      -2px -2px 0 #ff4dbb,
      2px -2px 0 #ff4dbb,
      -2px 2px 0 #ff4dbb;
  }

  #trippyTitle span {
    margin: 0 0.5px;
  }


  p {
    font-size: 18px;
    margin: 4px 0;
  }

  .button-container {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
  }


  img.pixelated {
    max-height: 80px;    
  }

  input, select {
    font-size: 1rem;
    width: 100%;
  }

  .button-container {
    width: 100%;
  }

  button {
    font-size: 1.6rem;
    padding: 10px 0;
    width: 200px;
  }

  #goBackBtn {
    font-size: 1.2rem;
    margin-top: 20px;
  }

  #startGameButton {
    display: none;
    font-size: 1rem;
    width: auto;
    padding: 8px;
  }

  #mergedMonsterImg {
    transform: scale(1.2);
    transform-origin: center center; 
    display: block;
    margin: 0 auto;
  }

  #monsterControls {
    width: 100%;
  }

  #monsterControls button {
    font-size: 16px;
    height: auto;
    padding: 10px 0;
    margin: 5px;
  }

  h2 {
    font-size: 20px;
  }

}


