html,
body {
  font-family: Arial, sans-serif;
  background-image: url("../assets/background.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  padding: 0 1rem;
  box-sizing: border-box;
}

.content {
  padding: 1rem;
  flex-grow: 1;
  text-align: center;
}

h1 {
  color: #ffffff;
  font-family: "Arvo", serif;
  font-weight: 300;
  font-size: 2.5rem;
  text-align: center;
  margin-top: 20px;
  position: relative;
  z-index: 5;
}

.subtext {
  color: #ffffff;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem;
  text-align: center;
  font-size: 1.1rem;
}

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

body,
#game-area * {
  cursor: url("../assets/shovel.cur") 20 100, auto;
}

#game-area {
  width: 1000px;
  max-width: 100%;
  height: 400px;
  margin: 0 auto 20px;
  position: relative;
  overflow: hidden;
}

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

.interactive-element {
  width: 10vw;
  height: 10vw;
  min-width: 60px;
  min-height: 60px;
  max-width: 100px;
  max-height: 100px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  cursor: pointer;
  position: absolute;
  transition: transform 0.2s ease;
  z-index: 1;
  animation: patchFadeIn 0.8s ease-out;
}

.mud {
  background-image: url("../assets/mud.webp");
  background-size: 100% 100%;
  transition: filter 0.4s ease;
}

.mud:hover {
  filter: brightness(1.6);
}

.bone_normal {
  background-image: url("../assets/bone_normal.webp");
  background-size: 100% 100%;
}

.bone_broken {
  background-image: url("../assets/bone_broken.webp");
  background-size: 100% 100%;
}

.interactive-element:hover {
  transform: scale(1.1);
}

/* Popup Styles */
#animal-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: #624435;
  color: white;
  padding: 20px;
  border: 2px solid #333;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 90%;
  width: 400px;
  z-index: 10;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.popup-content {
  overflow-y: auto;
  max-height: 70vh;
}

#animal-popup.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

#animal-popup,
#animal-popup * {
  cursor: default !important;
}

#animal-popup #close-popup {
  cursor: pointer !important;
}

.animal-image {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

.animal-name,
.animal-last-seen {
  font-family: "Arvo", serif;
  text-align: center;
  margin-bottom: 1rem;
}

.animal-region,
.animal-description {
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
  margin: 1.5rem 0;
}

.animal-region::before {
  content: "🌍 ";
}

#close-popup {
  margin-top: 10px;
  padding: 8px 16px;
  font-size: 1rem;
  background-color: #444;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }

  .subtext {
    font-size: 0.9rem;
    padding: 0.5rem;
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  #game-area {
    height: 40vh;
  }

  #animal-popup {
    width: 80%;
    max-width: 400px;
  }

  .popup-content {
    font-size: 0.9rem;
  }

  .interactive-element {
    width: 14vw;
    height: 14vw;
  }
}
