body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    background: transparent;
    /* overall page background */
}



.header {
    position: absolute;
    /* float on top */
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    /* give it a height */
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    z-index: 1000;
    /* make sure it’s above the canvas */
    pointer-events: none;
}

/* Logo */
.logo img {
    height: 50px;
    /* adjust as needed */
    display: block;
}

/* Navigation buttons */
.nav-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-buttons button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-buttons img {
    height: 60px;
    /* match your PNG size */
    display: block;
}

/* Icon buttons (right side) */
.icon-buttons {
    display: flex;
    gap: 12px;
}

.icon-buttons button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    pointer-events: all;
}

.icon-buttons img {
    height: 42px;
    /* match your PNG size */
    width: 42px;
    border-radius: 50%;
    display: block;
}

.game-over-panel {
    /* background: rgba(0, 0, 0, 0.6); */
    background: url(../../Assets/HUD/success_nobutton.png) no-repeat;
    background-size: 100% 100%;
    padding: 60px;
    border-radius: 10px;
    max-width: 500px;
    margin: 15px auto;
    font-size: 1.1rem;
    min-width: 500px;
    aspect-ratio: 2480 / 2701;
    position: relative;
}

.final-score {
    position: absolute;
    bottom: 75px;
    color: #000000 !important;
    left: 0;
    right: 0;
    text-align: center;

}

/* .character {
    position: absolute;
    bottom: 20px;
    left: 10%;
}

.character img {
    width: 25%;
} */

.level-btn {
    margin: 8px;
    padding: 12px 25px;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s;
    min-width: 130px;
    border: none;
    font-weight: bold;
}

.level-btn:hover {
    transform: scale(1.05);
}

.difficulty-buttons {
    border: none;
    background: none;
    display: none;
}

.difficulty-buttons img {
    max-width: 10vw;
    height: auto;
    left: 50%;
    right: 50%;
}

.easy-button {
    background: linear-gradient(to right, #56ab2f, #a8e063);
}

.medium-button {
    background: linear-gradient(to right, #f8b500, #fceabb);
}

.hard-button {
    background: linear-gradient(to right, #ff416c, #ff4b2b);
}

.score-display {
    font-size: 1rem;
    font-weight: bold;
    background: #3a7b73;
    padding: 8px 16px;
    background: url(../Assets/HUD/score.png) no-repeat; 
    background-size: 100% 100%;
    height: 50px;
    width: 120px;
    text-align: right;
    padding-top: 16px;
    float:left;
}

.timer-display {
    font-size: 1rem;
    font-weight: bold;
    background: #3a7b73;
    padding: 8px 16px;
    background: url(../Assets/HUD/clockcountdown.png) no-repeat;
    background-size: 100% 100%;
    height: 50px;
    width: 120px;
    text-align: right;
    padding-top: 16px;
    float:right;
}

.instructions-dialog {
    background: rgba(0, 0, 0, 0.6);
    background: url(../Assets/HUD/rectangle\(difficulty\).png) no-repeat;
    background-size: 100% 100%;
    padding: 60px;
    border-radius: 10px;
    max-width: 50%;      /* cap width at 40% of viewport */
    width: 50%;         /* allow shrink on smaller screens */
    margin: 0 auto;      /* center horizontally */
    text-align: center;  /* center text and children */
    overflow: hidden;    /* don’t let content spill outside */
}

.instructions-dialog .d-flex {
    flex-wrap: nowrap;  
}

#instructions-text {
    text-wrap: balance;
}

.game-dialogue-buttons {
    position: absolute;
    height: 8vh;   /* vh = % of viewport height */
    width: auto;
    background: none;
    border: none;
    cursor: pointer;
}

.game-over-buttons {
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    text-align: center;
    background: no-repeat;
    border: none;
    min-width: 100px;
    max-width: 100px;
}

.game-over-buttons img {
    width: 100px;
    /* margin-right: 10vw; */
}

#game-title {
    display: block; /* images are inline by default, block helps centering */
    width: 150px; /* fixed width, adjust as needed */
    height: auto; /* keep aspect ratio */
    margin-top: 1vh;
}


#ui-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    z-index: 10;
    pointer-events: none;
}

#difficulty-screen,
#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.55);
    z-index: 20;
    color: white;
    padding: 20px;
}

#game-over-screen {
    display: none;
}

#difficulty-game-title {
  position: fixed;            /* stays in the same place regardless of scroll */
  top: 20%;                   /* move to middle vertically */
  left: 50%;                  /* move to middle horizontally */
  transform: translate(-50%, -50%); /* center it exactly */
  
  width: 35vw;               /* fixed width */
  height: auto;              /* fixed height */
  
  display: flex;              /* optional, to center its content */
  align-items: center;
  justify-content: center;

  border-radius: 12px;         /* optional rounded corners */
  z-index: 9999;               /* keep on top */
}

#difficulty-dialogue-img {
  position: fixed;            /* stays in the same place regardless of scroll */
  top: 85%;                   /* move to middle vertically */
  left: 50%;                  /* move to middle horizontally */
  transform: translate(-50%, -50%); /* center it exactly */
  
  width: 35vw;               /* fixed width */
  height: auto;              /* fixed height */
  
  display: flex;              /* optional, to center its content */
  align-items: center;
  justify-content: center;

  border-radius: 12px;         /* optional rounded corners */
  z-index: 9999;               /* keep on top */
}

#difficulty-preview {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: 60vh;
  display: none;               /* hidden until hover */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#restart-button {
    width: 50%;
    margin-top: auto;
    margin-bottom: auto;
    margin-left: 100px;
    margin-right: auto;
}

#minihub-button {
    width: 50%;
    margin: 0 auto;
}

#next-button {
    width: 50%;
    margin-top: auto;
    margin-bottom: auto;
    margin-left: auto;
    margin-right: 100px;
}

#score-value,
#timer-value {
    text-shadow: none !important;
    color: #000;
}

#preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(121, 169, 169, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

#preloader-image {
    width: 300px;
    margin-bottom: 30px;
    animation: pulse 1.5s infinite;
}

#preloader-text {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

#loading-bar {
    width: 300px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

#loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    transition: width 0.3s;
}

#overworld-dialogue {
    background: rgba(0, 0, 0, 0.55);
    position: fixed;            /* overlay whole screen */
    width: 100%;
    height: 100%;
    display: none;              /* hidden until JS shows it */
    padding: 20px;
    /* flex-direction: column;
    justify-content: flex-end; */
    align-items: center;
    text-align: center; /* centers inline elements like <img> */
    z-index: 20;              /* make sure it sits above everything */
}

#minihub-dialogue {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;

    flex-direction: column;        /* stack image + buttons */
    justify-content: center;       /* center vertically */
    align-items: center;           /* center horizontally */

    background: rgba(0, 0, 0, 0.55); /* semi-transparent overlay */
    z-index: 20;
}

#minihub-dialogue-img {
    position: absolute;
    width: 50%;
    left: 25%;
}

.minihub-dialogue-buttons {
    position: absolute;
    height: 1vh;   /* vh = % of viewport height */
    width: auto;
    background: none;
    border: none;
    cursor: pointer;
}

#minihub-jom-button {
    height: 5%;
    width: auto;
    left: 66%;
    bottom: 45%;
}

.dialogue-box {
    position: relative;       /* makes buttons relative to this box */
    width: 50%;               /* matches your image width */
}

#overworld-dialogue {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.55);
    z-index: 20;
}

#overworld-dialogue-img {
    width: 100%;              /* fill the box width */
    display: block;
}

.overworld-dialogue-buttons {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
}

#overworld-close-button {
    top: 0%;
    right: 0%;
    width: 10%;
    height: auto;
}

#overworld-close-button img {
    width: 100%;
    height: auto;
    object-fit: contain; /* keep aspect ratio */
}

#overworld-jom-button {
    bottom: 15%;
    right: 6%;
    width: 10%;
    height: auto;
}

#overworld-jom-button img {
    width: 100%;
    height: auto;
    object-fit: contain; /* keep aspect ratio */
}

#info-dialogue {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.55);
    z-index: 20;
}

#info-dialogue-img {
    position: absolute;
    width: 50%;
    left: 25%;
}

.info-dialogue-buttons {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
}

#info-close-button {
    top: 7%;
    right: 22%;
    width: 10%;
    height: auto;
}

#info-close-button img {
    width: 80%;
    height: auto;
    object-fit: contain; /* keep aspect ratio */
}

#info-jom-button {
    bottom: 15%;
    right: 45%;
    width: 10%;
    height: auto;
}

#info-jom-button img {
    width: 100%;
    height: auto;
    object-fit: contain; /* keep aspect ratio */
}

#game-dialogue {
    background: rgba(0, 0, 0, 0.55);
    position: fixed;            /* overlay whole screen */
    width: 100%;
    height: 100%;
    display: none;              /* hidden until JS shows it */
    padding: 20px;
    /* flex-direction: column;
    justify-content: flex-end; */
    align-items: center;
    text-align: center; /* centers inline elements like <img> */
    z-index: 20;              /* make sure it sits above everything */
}

#game-dialogue-img {
    position: absolute;
    width: 50%;
    left: 25%;
}

#game-continue-arrow {
    height: 5%;
    width: auto;
    left: 68%;
    top: 49%;
}

#game-jom-button {
    height: 5%;
    width: auto;
    left: 66%;
    top: 49%;
}