/* Basic Tags */
body {
  font-family: serif;
  background-color: #111;
  margin: 0;
  height: 100vh;
  overflow: hidden; /* Prevent scrolling */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Parisienne Font */
@font-face {
  font-family: 'Parisienne';
  src: url('fonts/Parisienne-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Scene backgrounds */
.image-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
.image-container img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

/* Dialogue */
#dialogue-box {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 20vh;
  background: black;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 1000;
  transition: opacity 0.5s ease;
  position: fixed;
}
#dialogue-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1em;
  box-sizing: border-box;
}
#dialogue-text {
  font-size: 1.2rem;
  max-width: 90%;
  opacity: 1;
  transition: opacity 0.5s ease;
}
#next-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: white;
  border: none;
  cursor: pointer;
}
#speaker {
  position: absolute;
  top: 0;
  left: 0;
  background: white;
  color: black;
  padding: 0.2em 0.6em;
  font-weight: bold;
  border-bottom-right-radius: 0.5em;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 0;
  font-size: 1rem;
  user-select: none;
  font-family: 'Parisienne', cursive;
}

/* Inventory */
#inventory-coin {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  cursor: pointer;
  animation: float 3s ease-in-out infinite;
  opacity: 0; /* hidden by default until dialogue ends */
  transition: opacity 0.5s ease;
}
#inventory-coin:hover {
  animation: spin 1s linear infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}
@keyframes spin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}
#inventory-menu {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 75vw;
  height: 75vh;
  background: black;
  color: white;
  padding: 20px;
  box-sizing: border-box;
  z-index: 1000;
  text-align: center;
  overflow-y: auto !important;
}

#close-inventory {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  color: black;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
}
.inventory-items {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}
.inventory-slot {
  text-align: center;
}

/* Tooltip */
.custom-tooltip {
  position: absolute;
  display: none;
  background: url("images/tooltip.png") no-repeat center center;
  background-size: cover;
  padding: 20px;
  color: #000;
  font-weight: bold;
  text-align: center;
  z-index: 9999;
  pointer-events: none;
}