html {
    touch-action: manipulation;
}

@font-face {
    font-family: 'TNR';
    src: url('TNR.ttf') format('truetype');
}

body {
    font-family: 'TNR', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Change from height to min-height */
    background-color: #121212;
    color: #e0e0e0;
    text-align: center; /* Center align text */
}

a:visited {
    color:#fff;
}

a {
    color:#fff;
}

.screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.quiz-container {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    width: auto;
    max-width: 90vw;
    min-width: 300px;
    text-align: center;
}

button {
    font-family: 'TNR', Arial, sans-serif; /* Set font for buttons */
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    margin: 10px 0; /* Add margin to buttons */
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 200px; /* Set a fixed width for all buttons */
}

::placeholder {
    font-family: 'TNR', Arial, sans-serif; /* Set font for placeholders */
}

input,
select {
    font-family: 'TNR', Arial, sans-serif; /* Set font for text box user input */
}

/* New styles for the start screen */
.start-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    overflow: hidden; /* Disable vertical scrolling */
}

.start-title {
    font-size: 2em;
    margin-bottom: 20px;
}

.splash-text {
    font-size: 1.2em;
    margin-bottom: 20px; /* Adjust margin to reduce space */
}

#quiz-screen-container {
    max-width: 700px;
}

.quiz-container input,
.quiz-container select {
    display: block;
    width: 80%;
    margin: 10px auto;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.question {
    font-size: 2em;
    margin-bottom: 20px;
}

.context {
    font-size: 0.5em;
    margin-top: 10px;
}

#part-of-speech,
#game-mode {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

#part-of-speech label,
#game-mode label {
    display: inline-block;
    margin: 10px;
    cursor: pointer;
}

#part-of-speech input[type="radio"],
#game-mode input[type="radio"] {
    display: none;
}

#part-of-speech input[type="radio"] + span,
#game-mode input[type="radio"] + span {
    padding: 10px 20px;
    border: 2px solid #007bff;
    border-radius: 5px;
    background-color: #1e1e1e;
    color: #007bff;
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

#part-of-speech input[type="radio"]:checked + span,
#game-mode input[type="radio"]:checked + span {
    background-color: #007bff;
    color: #fff;
    border-color: #0056b3;
}

#part-of-speech input[type="radio"] + span:hover,
#game-mode input[type="radio"] + span:hover {
    background-color: #0056b3;
    color: #fff;
}

#gender,
#case,
#gender-etl,
#case-etl {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

#gender label,
#case label,
#gender-etl label,
#case-etl label {
    display: inline-block;
    margin: 0 10px;
    cursor: pointer;
}

#gender input[type="radio"],
#case input[type="radio"],
#gender-etl input[type="radio"],
#case-etl input[type="radio"] {
    display: none;
}

#gender input[type="radio"] + span,
#case input[type="radio"] + span,
#gender-etl input[type="radio"] + span,
#case-etl input[type="radio"] + span {
    padding: 10px 20px;
    border: 2px solid #007bff;
    border-radius: 5px;
    background-color: #1e1e1e;
    color: #007bff;
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
    text-align: center;
}

#gender input[type="radio"]:checked + span,
#case input[type="radio"]:checked + span,
#gender-etl input[type="radio"]:checked + span,
#case-etl input[type="radio"]:checked + span {
    background-color: #007bff;
    color: #fff;
    border-color: #0056b3;
}

#gender input[type="radio"] + span:hover,
#case input[type="radio"] + span:hover,
#gender-etl input[type="radio"] + span:hover,
#case-etl input[type="radio"] + span:hover {
    background-color: #0056b3;
    color: #fff;
}

.review-question {
    background-color: #2e2e2e;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    width: 100%;
}

.review-question p {
    margin: 5px 0;
}

#back-from-review-button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    margin-top: 20px;
    width: 200px; /* Ensure these buttons also have the same width */
}

#review-button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    margin-top: 10px;
    width: 200px; /* Ensure these buttons also have the same width */
}

/* Styles for displaying mistakes */
.mistakes {
    background-color: #3e3e3e;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.mistakes p {
    margin: 5px 0;
    color: #ff4d4d;
}

.review-question h3 {
    margin-bottom: 10px;
}

.review-question p {
    margin: 5px 0;
}

.review-question .mistakes p {
    font-size: 0.9em;
}

.review-question strong {
    color: #ffc107;
}

#back-from-leaderboard-button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    margin-top: 20px;
    width: 200px; /* Ensure these buttons also have the same width */
}

#player-name {
    font-family: 'TNR', Arial, sans-serif; /* Set font for input */
    padding: 10px;
    font-size: 1.2em;
    border: 2px solid #007bff;
    border-radius: 8px;
    background-color: #1e1e1e;
    color: #e0e0e0;
    width: 80%;
    margin: 20px auto;
    display: block;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s, box-shadow 0.3s;
}

#player-name:focus {
    border-color: #0056b3;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
}

/* New styles for the question number */
.question-number {
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* New styles for the lexicon screen */
#lexicon-content {
    max-width: 90vw;
    margin: 20px auto;
    text-align: left;
    overflow-y: auto;
    max-height: 70vh;
    padding: 20px;
    background-color: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#lexicon-content h3 {
    margin-top: 20px;
    color: #ffc107;
}

#lexicon-content p {
    margin: 5px 0;
}

#back-from-lexicon-button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    margin-top: 20px;
    width: 200px;
}

#end-quiz-button {
    padding: 5px 10px; /* Make the button smaller */
    font-size: 0.8em; /* Smaller font size */
    border: none;
    border-radius: 5px;
    background-color: #ff4d4d; /* Red background color */
    color: #fff;
    cursor: pointer;
    margin: 10px 0; /* Add margin to buttons */
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 150px; /* Set a smaller fixed width */
}

/* New styles for the settings container */
.settings-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.settings-container label {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.settings-container .checkbox-group {
    display: flex;
    justify-content: center;
    gap: 20px; /* Add space between checkboxes */
}

.settings-container input[type="checkbox"] {
    display: none;
}

.settings-container input[type="checkbox"] + span {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #007bff;
    border-radius: 5px;
    background-color: #1e1e1e;
    color: #007bff;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.settings-container input[type="checkbox"]:checked + span {
    background-color: #007bff;
    color: #fff;
    border-color: #0056b3;
}

.settings-container input[type="checkbox"] + span:hover {
    background-color: #0056b3;
    color: #fff;
}