#menuWrapper {
    position: fixed;
    display: flex;
    flex-direction: row-reverse;
    top: 5px;
    right: 5px;
    z-index: 50; /* Ensures menu stays on top */
}

#nav-menu-place-holder{
    width: 55px;
}

#optionsMenu {
    border-radius: 5px;
    max-width: 100px;
    z-index: 10000; /* Higher than any other element */
    display: grid;
    gap: 6px;
    position: relative; /* Create stacking context */
    
}

.option-button {
    margin: 0;
    align-items: center;
    color: black;
    background-color: transparent;
    border: 2px solid transparent;
    width: auto;
    box-sizing: border-box;
    white-space: nowrap;
    z-index: 1;
    opacity: 0.9;

}

#options {
    position: relative;
    background: linear-gradient(to right, rgba(55, 55, 55, 0.7), rgba(70, 70, 70, 0.7));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: grid;
    gap: 3px;
    transition: opacity 0.5s ease-in-out;
    border-radius: 15px;
    z-index: 0;

    
    max-height: calc(100vh - 85px - 85px); /* or any height you want */
    overflow-y: auto;
    scrollbar-width: thin; /* Firefox */
    
}

#options.collapsed, #toolbar.collapsed {
    
    opacity: 0;
    height: 0;
    top: -500vh;
}


#toolbar.collapsed {
    display: none;
}

/* Menu images inside buttons */
.menuImg {
    max-width: 50px;
    height: auto;
    pointer-events: none;
}

#toolbar {
    position: fixed;
    right: 83px;
    top: 90px;
    z-index: 5;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: grid;
    gap: 10px;
    border-radius: 15px;
    background: linear-gradient(to right, rgba(40, 40, 40, 0.7), rgba(55, 55, 55, 0.7));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

}

.toolbar-option{
    display: grid;
    gap: 0px;
}

.toolbar-option input{
    margin: 5px;
    width: calc(100% - 10px);
    padding: 5px 0px ;
}



#toolbar label {
    display: block;
    margin: 5px 0;
}



#colorInputWrapper {
    position: relative;
    display: flex;
    justify-content: left;
    height: 50px;
}

input[type="color"] {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    margin: 0;
}

input[type="range"].reversed {
  direction: rtl; /* Reverses the visual direction */
}

#colorInputImage {
    position: absolute;
    z-index: 15;
    top: 0;
    left: 0;
    pointer-events: none;
    border-color: #000;
}

button:not(:disabled) {
    transition: background-color 0.3s ease;
}

.button-wrapper, .clue-checkboxes{
    direction: rtl;
    display: flex;
    flex-direction: row;
    align-items: end;
    justify-content: right;
    gap: 15px;
    margin: 15px;
}

.button-wrapper button{
    width: auto;
}



#game-nav {
    padding-left: 10px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 85px;
  min-width: 350px;
  margin: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: auto;

    background: linear-gradient(to right, rgba(30, 30, 30, 0.7), rgba(70, 70, 70, 0.7));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'Segoe UI', sans-serif;

  box-sizing: border-box;
}
#game-nav *, #toolbar *{
    z-index: 10;
    text-shadow: 1px 1px 3px #000; /* Proper shadow syntax */

}
#game-nav h1 {

    opacity: 0.9;
  font-size: 1rem;
  letter-spacing: 1px;
  font-weight: 600;
  margin: 0;
  width: 100%;
}
#game-nav #timer-div{
    display: flex;
    width: 100%;
    box-sizing: border-box;

}
#game-nav .timer {
  font-size: 0.8rem;
  color: #ccc;
  margin: 0;
  color: #b0e0e6;

}

#icon{
    opacity: 0.9;
    width: 3.2rem;
    margin-left: 0.1rem;
    margin-right: 0.5rem;
}

@keyframes slideIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#game-nav {
  animation: slideIn 0.6s ease-out;
}



#map-section, #help-section, #notes-section{
    width: 100vw;
    position: fixed;
    top: 90px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    background-color: #333;
    border-radius: 5px;
    padding: 1rem 1rem 3rem;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#map-container {
    position: relative;
}

#map-h3 {
    margin: 0px;
}

#map {
    z-index: 12;
    display: block;

    width: 100vw;
    max-width: 700px;
    height: 70vh;
}

#map-section.collapsed, #notes-section.collapsed, #help-section.collapsed{
  left: 500vw;
}

#location {
    display: grid;
    gap: 5px;
    position: absolute;
    z-index: 15;
    font-weight: bold;
    top: 10px;
    right: 10px;
    color: #222;
    font-size: 1.2rem;
    padding: 0px;
    margin: 0px;
    text-shadow:
        1px 1px 3px rgba(0, 0, 0, 0.2),
        2px 2px 5px rgba(0, 0, 0, 0.1);
}
#location p{
    padding: 0;
    margin: 0;
}

/* Base for dark mode containers */
#notes-section, #help-section {
  padding: 1rem;
  background: #1e1e1e;
  border-radius: 12px;
  margin: 1rem 0;
  max-width: 600px;
  color: #f0f0f0;
    overflow: hidden;

}

/* 📝 Notepad Styling */
#notepad {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;


  width: 100%;
  height: 60vh;
  margin-top: 0.5rem;
  padding: 1rem;
  background-color: #000;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  font-size: 1.6rem;
    font-family: 'Times New Roman', Times, serif;

  
}

/* ❓ FAQ Container */
.faq {
  width: 100%;
  max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;


}


/* Each FAQ item */
.faq-item {
  margin-bottom: 1rem;
  border-bottom: 1px solid #333;
  border-radius: 10px;

}


.faq-item button{
 margin: 0;
}

/* FAQ question button */
.faq-question {
  background: #2a2a2a;
  color: #f5f5f5;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: 8px;
}


/* Hidden answer */
.faq-answer {
  display: none;
  padding: 1.5rem 1rem;
  font-size: 0.95rem;
  color: #ccc;
  background: #252525;
  border-radius: 8px;
  margin-top: 0.5rem;
}

.faq-icon{
    width: 20px;
    vertical-align: middle;
    margin-right: 8px;
    display: inline-block;
    margin: 0px 10px 5px 10px;
}

/* Show answer */
.faq-item.active .faq-answer {
  display: block;
}

body:has(#help-section:not(.collapsed)),
body:has(#map-section:not(.collapsed)),
body:has(#notes-section:not(.collapsed)) {
  overflow: hidden;
}
