.modal-hidden {
  display: none !important;
}

#modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: linear-gradient(to bottom, #faedb9, #f9e18a);
  border: 5px solid #7d4d00;
  border-radius: 15px;
  width: 80%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 25px;
  position: relative;
  box-shadow: 0 8px 0 #7d4d00, 0 0 20px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #7d4d00;
  cursor: pointer;
}

.modal-section h2,
.modal-section h3 {
  color: #7d4d00;
  margin-top: 42px;
  border-bottom: 3px solid #7d4d00;
  padding-bottom: 10px;
}

.mobile-game-overlay {
  display: none;
}

#mobile-buttons {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 10;
}

.button-group {
  position: absolute;
  bottom: 0;
  display: flex;
  gap: 4px;
  pointer-events: auto;
}

.mobile-button {
  width: 12vmin;
  height: 12vmin;
  min-width: 50px;
  min-height: 50px;
  max-width: 120px;
  max-height: 120px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 3px solid #a0220a;
}

.left-buttons {
  left: 4vw;
  bottom: 4vh;
}

.right-buttons {
  right: 4vw;
  bottom: 4vh;
}

.mobile-button img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

#moveLeftButton img {
  transform: scaleX(-1);
}

/* ----------------- */
/* RESPONIVE STYLES */
/* --------------- */

/* Desktop - Hide mobile buttons */
@media (min-width: 992px) {
  #mobile-buttons {
    display: none !important;
  }
}

/* Tablets and Mobile - Show mobile controls when needed */
@media (max-width: 1024px) {
  #mobile-buttons:not(.d_none) {
    display: flex !important;
    pointer-events: auto !important;
  }

  .mobile-button {
    width: 70px;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 3px solid #a0220a;
  }

  .left-buttons {
    left: 10px;
    bottom: 10px;
  }

  .right-buttons {
    right: 10px;
    bottom: 10px;
  }
}

/* Mobile Landscape Fullscreen */
@media screen and (max-width: 1024px) and (orientation: landscape) {
  #mobile-buttons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
  }

  #jumpButton {
    position: relative;
    right: -10px;
    bottom: 70px;
  }

  #throwButton {
    position: relative;
    right: -50px;
  }

  .left-buttons {
    position: absolute;
    left: 15px;
    bottom: 35px;
    pointer-events: auto;
  }

  .right-buttons {
    position: absolute;
    right: 15px;
    bottom: 35px;
    pointer-events: auto;
  }

  .mobile-button {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid #a0220a;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  }

  .mobile-button img {
    width: 25px;
    height: 25px;
  }

  .mobile-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
  }

  .mobile-game-overlay.d_none {
    display: none !important;
  }

  .mobile-game-overlay h2 {
    color: #ffcc00;
    font-size: 1.8rem;
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  }

  .mobile-game-overlay p {
    color: #ffcc00;
    font-size: 18px;
    line-height: 1.4;
    margin: 15px 0;
    max-width: 90%;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  }
}
