/* note that 80% of css was made with Ai so i should design some more in the future*/
/* Reset browser default spacing */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    text-align: center;
}
#safeTimerDisplay{
    margin-left: 70%;
}
/* Title styling */
#title {
    margin-top: 30px;
    font-size: 2.5rem;
    color: #333;
}

/* Container for all mode buttons */
.button-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 25px;
}

/* Buttons */
.mode-button {
    padding: 15px 25px;
    font-size: 1.1rem;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: 0.2s ease;
}

/* Hover effect */
.mode-button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Quiz area container */
#quizArea {
    margin-top: 40px;
    font-size: 1.3rem;
}

/* Countdown + Question styling */
#countdown {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

#question {
    margin-bottom: 15px;
    white-space: pre;
}

/* Answer box styling */
#answerBox {
    padding: 10px;
    font-size: 1rem;
    width: 180px;
    border-radius: 6px;
    border: 2px solid #555;
}
#cancel{
    background-color: red;
    font-family: sans-serif;
    color: white;
}
#mistakesList{
    list-style-type: none;
    white-space: pre;
}
/* Make the whole quiz area responsive */
#quizArea {
    max-width: 95vw;      /* limits width to viewport */
    margin: 0 auto;       /* center horizontally */
    padding: 10px;
    box-sizing: border-box;
    overflow-x: auto;     /* horizontal scroll for long questions */
}

/* Make buttons scale nicely on small screens */
.mode-button {
            /* grow/shrink, almost half-width each */
    margin: 5px;
    min-width: 120px;     /* so they don’t shrink too small */
    box-sizing: border-box;
}

/* Stack buttons vertically on really small screens */
@media (max-width: 430px) {
    .mode-button {
        flex: 1 1 100%;
    }
    #mistakesList{
        font-size: 80%;
    }
}

/* Make question text wrap instead of overflowing */
#question {
    word-wrap: break-word;
    font-size: 1rem;      /* readable on phones */
}


/* Mistakes list scroll if too long */
#mistakesList {
    max-height: 200px;
    overflow-y: auto;
}

/* Countdown & labels scale */
#countdown, #label {
    font-size: 1.1rem;
}
#progressBar {
    width: 80%;
    height: 15px;
    background-color: #ddd;
    margin: 15px auto;
    border-radius: 10px;
    overflow: hidden;
}
#progressFill {
    width: 0%;
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s ease;
}
#progressText {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
}
#leaderboard {
  background: white;
  margin: 30px auto;
  padding: 20px;
  width: 300px;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

#leaderboard h2 {
  margin-bottom: 15px;
  color: #333;
}

#leaderboardList {
  list-style: none;
  padding: 0;
  font-size: 1.1rem;
}

#leaderboardList li {
  margin: 6px 0;
}

#backButton {
  margin-top: 15px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 1rem;
  cursor: pointer;
}

#backButton:hover {
  background-color: #0056b3;
}
