* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background-color: black;
  color: white;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}


body {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh; /* Ensures the body stretches to at least the height of the viewport */
}

.main {
  flex: 1; /* Fills available space */
  width: 100%;
  overflow-x: hidden; /* Hide horizontal overflow */
  display: flex; /* Ensures flexbox properties are used */
  flex-direction: column;
  align-items: center; /* Center horizontally */
  justify-content: center; /* Center vertically */
}


/* Media query for landscape orientation */
@media screen and (orientation: landscape) {
  body, html {
    overflow-y: auto; /* Allows vertical scrolling in landscape mode */
  }
}


/* Quiz Container Styles */
.quiz-container {
/*   background-color: black; */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  max-width: 100%;
   margin: 100px 0; /* Ensure there's some space around the container */
}

/* Other styles from your previous CSS */
.question {
  font-size: 1.5em;
  margin-bottom: 0;
  user-select: none; /* Disables text selection */
}

.hint {
  font-size: 1em;
  margin-top: 0;
  padding-top: 0;
  user-select: none; /* Disables text selection */
}

ul.options {
  list-style-type: none; /* Removes the bullet points */
  padding: 0;            /* Removes default padding */
  margin: 0;             /* Removes default margin */
}


.options {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
  justify-content: center;
  width: 100%;
  padding: 0 5px;
  box-sizing: border-box;
  margin: 0 0 0 0; /* top, right, bottom, left */
}

@media (min-width: 601px) {
  .options {
    grid-template-columns: repeat(
      4,
      1fr
    ); /* 1 row of 4 columns for larger screens */
    grid-gap: 20px; /* Adjust gap between buttons */
  }
}

.candy-button {
  position: relative;
  border: none;
  width: 150px; /* Fixed width */
  height: 150px; /* Fixed height */
  background-image: url("https://cdn.glitch.global/3d61b8db-5ea6-4c15-84c7-c6fcb3c38861/calabash-151425_640.png?v=1721069743486");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  color: white;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  text-align: center;
  box-sizing: border-box;
  background-color: transparent; /* Ensure transparent background */
  -webkit-tap-highlight-color: transparent; /* Prevent tap highlight color */
}

.candy-button:hover {
  transform: scale(1.1);
}

.candy-button:active {
  transform: translateY(1px);
}

.button-content-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%; /* Ensure it spans the width of the button */
  height: 100%; /* Ensure it spans the height of the button */
  padding: 20px 10px 10px 10px; /* Adjust padding to move text down */
  box-sizing: border-box;
}

.button-content {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* -webkit-line-clamp: 3; */
  line-height: 1.2em; /* Adjust line height as needed */
  max-height: calc(1.2em * 3); /* Ensure it fits 3 lines */
  width: 100%; /* Ensure text doesn't overflow the button */
  white-space: normal; /* Allow text to wrap */
  font-size: 1.6em; /* Base font size */
  transition: font-size 0.3s ease, transform 0.3s ease;
}

.candy-button.correct .button-content {
  color: green;
  text-shadow: 1px 1px 2px black, 0 0 1em white; /* Adjust values as needed */
}

.candy-button.incorrect .button-content {
  color: red;
  text-shadow: 1px 1px 2px black, 0 0 1em white; /* Adjust values as needed */
}

@media (max-width: 600px) {
  .candy-button {
    width: 150px;
    height: 150px;
  }

  .options {
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 10px;
  }

  .candy-button .button-content {
    font-size: 1.6em; /* Adjust font size for smaller screens */
    line-clamp: 3; /* Add this for future compatibility */
    -webkit-line-clamp: 3; /* Ensure it still shows 3 lines */
  }
}

.next {
  display: none;
  position: absolute; /* Position it absolutely within the container */
  bottom: 50%; /* Adjust this value to place it just above the progress bar */
  left: 50%;
  transform: translateX(-50%); /* Center horizontally */
  width: 100px;
  padding: 10px;
  font-size: 1.5em;
  font-weight: bold; /* Make the text thicker */

  border: none;
  border-radius: 15px;
  background-color: purple;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.next:hover {
  background-color: #00a676;
  transform: translate(-50%, -2px); /* Ensure centering stays consistent on hover */
}

.next:active {
  background-color: #c0392b;
  transform: translate(-50%, 1px); /* Ensure centering stays consistent on active */
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  padding-top: 60px;
}

.modal-content {
  background-color: black;
  color: yellow;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888888;
  width: 80%;
  max-width: 300px;
  text-align: center;
}

.modal button {
  margin-top: 20px;
  width: 100%;
  max-width: 240px;
  padding: 10px;
  font-size: 1em;
  border: none;
  border-radius: 15px;
  background-color: #d63031;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal button:hover {
  background-color: #ff7675;
  transform: translateY(-2px);
}

.modal button:active {
  background-color: #c0392b;
  transform: translateY(1px);
}

.menu {
  position: fixed;
  top: 10px;
  left: 10px;
  width: auto;
  border-radius: 5px; /* Optional: Add rounded corners */
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  max-height: 40px; /* Collapsed height */
  background-color: transparent; /* Ensure background is fully transparent */
}

.menu.expanded {
  max-height: 200px; /* Expanded height, adjust as needed */
}

.menu-toggle {
  background-color: transparent; /* Slightly transparent background */
  padding: 10px 20px;
  cursor: pointer;
  text-align: left;
  font-size: 18px;
  border-bottom: 1px solid rgba(68, 68, 68, 0.8); /* Slightly transparent border */
  color: #fff;
}

.menu-item {
  padding: 10px 20px;
  cursor: pointer;
  background-color: rgba(68, 68, 68, 0.8); /* Slightly transparent background */
  border-bottom: 1px solid rgba(85, 85, 85, 0.8); /* Slightly transparent border */
  text-align: left; /* Align text to the left */
  color: #fff;
}

.menu-item:hover {
  background-color: rgba(85, 85, 85, 0.8); /* Slightly transparent background on hover */
}


/* Vocab Modal Styles */
.vocab {
  display: none;
  position: fixed;
  z-index: 2;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  padding-top: 60px; /* Adjust or remove this if it interferes with vertical positioning */
  padding-left: 200px; /* Adjust this value as needed, or use responsive styles */
  padding-right: 200px; /* Ensures symmetry and prevents content touching the edges */
}

@media (max-width: 768px) {
  .vocab {
    padding: 20px; 
  }
}


#vocabContentBag {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%; /* If you want it to take full height of its parent */
  flex-direction: column; /* Stacks children vertically */
}

.vocab-content {
  position: relative;
  overflow-y: auto; /* Enable scrolling */
  max-height: 90vh; /* Limit the modal height */
  background-color: black;
  padding: 20px;
  border: 1px solid #888;
  width: 100%; /* This can be adjusted as needed */
  box-sizing: border-box; /* Ensures padding and border are included in the width */
 
  overflow-y: auto; /* Allows vertical scrolling if content exceeds max-height */
}


.vocab-content textarea {
  width: 100%; /* Ensures the textarea matches the width of its container */
  box-sizing: border-box; /* Prevents the element's padding and border from expanding its size */
  max-width: 100%; /* Prevents the textarea from exceeding the width of its container */
  height: auto; /* Adjust height based on content or set a specific height */
  padding: 8px; /* Adequate padding for text inside textarea */
  margin-top: 10px; /* Space between the textarea and any elements above it */
}

.close {
  position: sticky;
  top: 0;
  right: 0;
  color: #aaa;
  float: right;
  font-size: 40px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.button-container {
  display: flex;
  justify-content: flex-start; /* Align buttons to the left */
  gap: 10px; /* Space between buttons */
  margin-top: 10px; /* Space above the buttons */
}

#saveLinkButton, #resetButton {
  display: inline-block;
}
h3 {
    margin-top: 0; /* Remove or reduce the space above the h3 */
}

#messageBox {
    text-align: center;
    font-size: 20px;
    color: yellow;
    margin: 0; /* This removes all margins */
    padding: 0;
    margin-bottom: 0; /* Ensure no space below the message */
}


#message {
    text-align: center;
}

#progress-container {
    width: 100%;
    background-color: #e0e0e0;
    height: 20px;
    border-radius: 10px;
    margin: 10px 0;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: #4caf50;
    border-radius: 10px;
    transition: width 0.3s;
}

