:root {
  --col1: #391d6f;
}
/* Asterisk wildcard selector to override default styles added by the browser */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
body {
  background-color: var(--col1);
  color: white;
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

}
body,
html {
  overflow-x: hidden;
}
#left {
  justify-content: center;
}

.row {
  justify-content: center;
}

.question p {
  color: white;
 font-size: 17px;
  width: 100%;
  text-align: center;
  border: 4px solid white;
  padding: 10px 20px;
  border-radius: 10px;
}
#rulesBtn,
#toggleSoundBtn,
#cancelBtn,
#exitBtn,
#restartBtn,
#homeBtn,
#startGameBtn,
#returnBtn404
{
  font-size: 15px;
  text-align: center;
  border: 1px solid white;
  box-shadow: 0 0 10px white;
  padding: 8px 12px;
  justify-content: space-between;
  border-radius: 10px;
  background: var(--col1);
  color: white;
  gap:20px;
}


#rulesBtn:hover,
#toggleSoundBtn:hover,
#cancelBtn:hover,
#exitBtn:hover,
#restartBtn:hover,
#homeBtn:hover,
#startGameBtn:hover,
#returnBtn404
  {
  background-color: white;
  color: var(--col1);
  border: 1px solid var(--col1);
  z-index: 10;
} 


.btn {
  color: white;
  font-size: 12px;
  width: 100%;
  text-align: center;
  border: 4px solid white;
  padding: 10px 20px;
  justify-content: space-between;
  border-radius: 10px;
}

.btn:hover {
  background-color: white;
  cursor: pointer;
  color: var(--col1);
   
}
.modal,
#overlay {
  display: none;
}
  
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.modal {
  position: fixed;
  left: 40%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  border: 1px solid black;
  border-radius: 10px;
  z-index: 1000;
  background-color: white;
  color: black;
  width: 600px;
  max-width: 80%;
  max-height: 80%;
}

.modal.active {
  transform: translate(-50%, -50%) scale(1);
}

.modal.active,
#overlay.active {
  display: block;
}

.modal-header {
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid;
}

.modal-header .title {
  font-size: 1.25rem;
  font-weight: bold;
}

.modal-header .closeButton {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  font-size: 1.25rem;
  font-weight: bolder;
}

.modal-body {
  padding: 10px 15px;
  font-size: large;
  color:var(--col1);
}

#overlay.active {
  opacity: 1;
  pointer-events: all;
}


button.correct {
  background-color: #28a745 !important; /* Green */
  color: white;
}

button.wrong {
  background-color: #dc3545 !important; /* Red */
  color: white;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.mainImage{
  border-radius: 100%; /* Always round */
  object-fit: cover; /* Keeps image nicely fitted */
  transition: all 0.3s ease-in-out;
  box-shadow: 0px 0px 15px white;
}

.imag {
  width: 150px;
  height: 150px;
  border-radius: 100%; /* Always round */
  object-fit: cover; /* Keeps image nicely fitted */
  transition: all 0.3s ease-in-out;
  box-shadow: 0px 0px 15px white;
}

 .imag:hover,
 .mainImage:hover {
  box-shadow: 0px 0px 20px white;
  transform: scale(1.1);
} 

.lifeline {
  max-width: 100px;
  max-height: 50px;
  min-width: 50px;
  min-height: 25px;
  
}
.lifeline:hover {
  box-shadow: 0px 0px 10px 5px white;
  border-radius: 50%;
  transform: scale(1.1);
  cursor: pointer;
  transition: all 0.5s ease-in-out;
}

.ladder {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--col1);
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 0 15px white;
  max-width: 230px;
  min-width: 75px;
}

.ladder li {
 
  padding: 2px;
  font-size: 14px;
  border-bottom: 1px solid #ccc;
  border-width: 1px;  
  border-radius: 2px;
  transition: background 0.3s;
  text-align: left;
}

.ladder li.active {
  background-color: gold;
  color: black;
}

.ladder li.passed {
  background-color: #28a745;
  color: white;
}

.modalOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modalBox {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  width: 80%;
  max-width: 450px;
  text-align: center;
  color: var(--col1);
}

.modalBtns {
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
  color: white;
  border-color: var(--col1);
}

/* Media query: tablets and larger (768px and up) */
@media screen and (min-width: 768px) {
  .question p {
    font-size: 20px;
  }
  .btn {
    font-size: 15px;
  }
  .ladder li {
    padding: 8px;
    margin: auto;
    text-align: center;
    font-size: 17px;
  }
  .imag {
    width: 230px;
    height: 230px;
  }

}
