body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
}

#container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 20px;
	justify-content: center;
}

#language-selector {
    width: 95%;
    text-align: right;
    padding-top: 1ex;
    margin-bottom: -2ex;
}

  #language-selector a {
    text-transform: uppercase;
    text-decoration: none;
    color: black;
    font-size: 80%;
    padding-left: 4ex;
    background-repeat: no-repeat;
    background-size: 3ex 2ex;
  }

  #language-selector a#lang-eng {
    background-image: url('./images/flag_en.png');
  }

  #language-selector a#lang-esp {
    background-image: url('./images/flag_es.png');
  }

#panda img {
    max-width: 150px; /* Adjust based on your image's size */
    margin-bottom: -14ex;
	position: relative;
	z-index: 2;
}

#main-content {
    max-width: 600px;
	margin: auto;
}

#game {
    background-color: #fff; /* Example background color */
    padding: 20px;
    margin-top: 20px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

h1, h3, #question, #score {
    text-align: center;
}

    #score {
        display: none; /* Start out invisible */
    }


#answers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 95%;
}

#answers button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.5s ease-in-out; /* Transition for fading effect */
    opacity: 1; /* Start with full opacity */
  }

  #answers button.correct {
    background-color: lightgreen;
  }

  #answers button.incorrect {
    background-color: red;
  }

  #answers button.invisible {
    opacity: 0;
  }
  

#lives {
    display: none;
    justify-content: center;
    margin-top: 10px;
}

.heart {
    width: 50px; /* Adjust size as necessary */
    margin-right: 5px;
}

#restartButton {
    display: none;
    padding: 10px;
    font-size: 16px;
    color: white;
    background-color: #4CAF50; /* Green */
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#settings-panel,
#timer-panel {
	background-color: #D2B48C;
    display: block;
	width: 30em;
	margin: 0 auto;
    border: 1px solid #ccc;
	border-radius: 5px;
    padding: 20px;
}

#timer-panel {
    background-color: #aaa;
    color: white;
    text-align: center;
    margin-bottom: 1ex;
    display: none; /* Start out invisible */
}

input[type="radio"] {
    margin: 5px 10px 5px 33%;
}

label {
    margin-right: 20px;
}

#custom-settings {
    border-top: 1px solid #ccc;
    padding-top: 10px;
    margin-top: 10px;
	border-radius: 5px;
	display: block;
}

#remember-settings {
    display: flex;           /* Use flexbox for alignment */
    justify-content: center; /* Center horizontally */
    align-items: center;     /* Center vertically */
    text-align: center;      /* Ensure text inside the label is centered */
    font-weight: bold;       /* Optional: Make the text bold */
    margin-bottom: 1ex;
}

    #remember-settings-info {
        display: none;
        width: 75%;
        margin: 0 auto 2ex;
        font-size: 75%;
        color: #333;
        font-style: italic;
        text-align: center;
    }
    

#timer-customization {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

#timer-customization label {
    font-size: 14px;
    margin-right: 5px;
}

#timer-customization input {
    width: 50px;
    padding: 5px;
    font-size: 14px;
    text-align: center;
}


.operation {
    margin-bottom: 20px;
}

.operation label {
    font-weight: bold;
    margin-right: 10px;
}

.range {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

input[type="number"] {
    width: 60px;
    padding: 5px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

input[type="checkbox"] {
    margin-right: 5px;
}

label {
    font-size: 14px;
    font-weight: bold;
    margin-right: 5px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.chip {
    padding: 8px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.chip.selected {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.chip:disabled {
    background-color: #ddd;
    cursor: not-allowed;
    color: #aaa;
}

button {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 16px;
}

.reset-warning,
.setting-annotation
{
	font-size:90%;
	font-style: italic;
	color: #333;
	text-align: center;
    margin-top: -0.5ex;
    padding-bottom: 1.5ex;
}


/*
 * MODAL WINDOWS (e.g., Game Over, Milestone Score)
 */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.game-over-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

#game-over-panda {
    width: 150px; /* Adjust size as necessary */
    margin-bottom: 20px;
}

#milestone-panda {
    width: 90%; /* Adjust the width as needed, or set to a fixed pixel value */
    max-width: 300px; /* Ensures the image is not too large on bigger screens */
    height: auto; /* Maintains the aspect ratio of the image */
    display: block; /* Makes sure the image is block-level for centering */
    margin: 0 auto; /* Centers the image horizontally */
    padding: 20px; /* Adds some space around the image */
}

/* Responsive styles for smaller screens (phones) */
@media (max-width: 768px) {
    #container {
        flex-direction: column;
        align-items: center;
        margin-top: 10px; /* Reduce margin for small screens */
    }

    #main-content {
        width: 90%; /* Expand content to fill more of the screen */
        margin: 0 auto;
    }

    #panda img {
        margin-left: -15em;
    }

    #settings-panel,
    #timer-panel {
        width: 90%; /* Reduce width for smaller screens */
        margin: 10px auto;
        padding: 10px; /* Decrease padding */
    }

    #game {
        padding: 10px; /* Reduce padding inside the game area */
        margin-top: 10px;
    }

    #answers {
        max-width: 95%;
    }

    #answers button {
        font-size: 14px; /* Decrease button font size */
        padding: 8px 16px; /* Reduce button padding */
        margin: 5px; /* Reduce spacing between buttons */
    }

    .chip {
        padding: 6px 10px; /* Smaller chips for compact layout */
        flex-basis: 16%; /* Force chips to break into rows of 5 */
        max-width: 20%;
        text-align: center;
        box-sizing: border-box;
    }

    #milestone-panda {
        max-width: 80%; /* Ensure image scales well on small screens */
    }

    .modal {
        padding: 10px; /* Add padding around the modal on small screens */
    }
}

/* Ultra-small screen adjustments (e.g., portrait phones) */
@media (max-width: 480px) {
    #answers {
        flex-direction: column; /* Stack answers vertically */
        gap: 5px; /* Add small spacing between buttons */
        max-width: 95%;
    }

    #game {
        width: 100%; /* Expand game area to full width */
    }

    #panda img {
        margin-left: -13.25em;
        margin-bottom: -12ex;
    }

    #settings-panel,
    #timer-panel {
        padding: 5px; /* Minimal padding for very small screens */
    }

    #restartButton {
        font-size: 14px; /* Smaller font for buttons */
        padding: 8px 10px;
    }

    .chip {
        flex-basis: 16%; /* Force chips to break into rows of 5 */
        max-width: 20%;
    }
}


