body {
    background-color: #000;
    font-family: Consolas, Menlo, Helvetica, Arial, sans-serif;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: #fff;
}
  
.banner {
  background-color: #a0a0a0a6;
  color: white;
  text-align: center;
  padding: 10px 0;
  font-size: 12px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}

.banner span {
    display: inline-block;
    line-height: 1.6;
}


.banner a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0 5px;
}

.banner a:hover {
  text-decoration: underline;
}

.title {
  text-transform: uppercase;
  margin-bottom: 1em;
  font-size: 1.5em;
}

#translation-container, #sentence-container {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  text-align: justify;
  max-width: 90%;
}


#sentence {
  font-size: clamp(1.5em, min(2vw, 4vh), 3em);
  direction: rtl;
  line-height: 1.6;
  text-align: center;
  max-width: 80%;
  margin: 0 auto;
  white-space: normal;
  word-wrap: break-word;
}

#speakText {
  padding: 10px;
  color: #fff;
  background-color: #000;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

#translation {
  font-size: clamp(1em, min(2vw, 4vh), 1.5em);
  color: #a0a0a0;
  direction: ltr;
  line-height: 1.6;
  text-align: center;
  max-width: 90%;
  margin: 0 auto;
  white-space: normal;
  word-wrap: break-word;
}

#userInput {
  font-size: 1.5em;
  padding: 10px;
  text-align: right;
  direction: rtl;
  position: relative;
  z-index: -2;
}

.hidden-input {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: relative;
  z-index: -2;
}

#typingArea {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: transparent;
  z-index: -2;
}

.keyboard {
  display: flex;
  flex-direction: column;
  gap: .5em;
  align-items: center;
  width: 100%;
  height: fit-content;
  max-width: 800px;
  margin: 0 auto;
}

.keyboard-row {
  display: flex;
  gap: .5em;
  justify-content: center;
}

.keyboard-row:nth-child(1) { margin-left: clamp(-12em, -8vw, -6em); }
.keyboard-row:nth-child(2) { margin-left: clamp(1em, 3vw, 2em); }
.keyboard-row:nth-child(3) { margin-left: clamp(1.5em, 4vw, 3em); }
.keyboard-row:nth-child(4) { margin-left: clamp(2em, 6vw, 5em); }
.keyboard-row:nth-child(5) { margin-left: clamp(1em, 3vw, 2em); }

.key, .key_0, .key_1, .key_2, .key_3 {
  border-color: #fff;
  border-radius: 5px;
  padding: clamp(6px, 2vw, 10px);
  text-align: center;
  font-size: clamp(1em, 2vw, 1.5em);
  width: clamp(1.5em, 4vw, 2em);
  transition: background-color .2s;
}

.key { background-color: #000; }
.key_0 { background-color: #3b3b3ba6; }
.key_1 { background-color: #646464a6; }
.key_2 { background-color: #a0a0a0a6; }
.key_3 {
  background-color: #000;
  padding: clamp(12px, 4vw, 24px);
  width: clamp(6em, 15vw, 8em);
}

@media (max-width: 600px) {
  .keyboard {
    max-width: 90%;
  }
  .keyboard-row {
    gap: .3em;
  }
  .key {
    font-size: 1em;
    padding: 5px;
    width: 1.5em;
  }
}

.highlighted-key, .key.active {
  background-color: #c48a0d;
  color: #fff;
  box-shadow: 0 0 10px rgba(196, 138, 13, 0.8);
  transition: box-shadow .3s ease-in-out;
}

.key.active {
  background-color: #dbccb5;
}

#sentence span.correct { color: #c48a0d; }
#sentence span.incorrect { color: #a81039; }

.correct-word, .incorrect-word {
  border-radius: 4px;
  padding: 2px;
}
.correct-word { background-color: #1cc40d8e; }
.incorrect-word { background-color: #a810399c; }


#wpm {
  font-size: 2em;
  color: #fff;
  margin-top: .5em;
}

#wpm-stats {
  position: fixed;
  bottom: 30px;
  display: flex; /* Use flexbox layout */
  flex-wrap: wrap; /* Allow elements to wrap to the next row when necessary */
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
  border-radius: 5px;
  color: #a5a5a5;
}


#nextButton {
  display: flex; 
  color: white; /* white */
  background: #c48a0d; /* primary-500 */
  font-size: 24px;
  opacity: 1; 
  border: none; 
  border-radius: 12px; 
  gap: 2px; 
}

#nextButton:hover {
  transform: scale(1.2);
}

#nextButton:disabled {
  background-color: #5e5e5e; /* Grey out the button */
  cursor: not-allowed; /* Change cursor to indicate the button is not clickable */
  opacity: 0.6; /* Make the button semi-transparent */
}


.selector-container {
  align-items: center;
  justify-content: center;
  text-align: justify;
  position: fixed;
  top: 80px;
  width: 100%;
  display: flex; /* Use flexbox layout */
  flex-wrap: wrap; /* Allow elements to wrap to the next row when necessary */
  gap: 10px;
  z-index: 200;
}

.radio {
  display: inline-flex;
  flex-direction: column; /* Stack label above the radio group */
  align-items: center;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: #c48a0d83;
  padding: 5px;
  margin-bottom: 18px;
}

.radio-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
  color: #a5a5a5;
}

.radio-group {
  display: flex;
  gap: 2px;
}

.radio__input {
  display: none;
}

.radio__label {
  padding: 4px 8px;
  font-size: 14px;
  color: #000;
  background: #c48a0d;
  cursor: pointer;
  transition: box-shadow .1s ease-in-out;
}

.radio__label:not(:last-of-type) {  
  border-right: 1px solid #000000;
}

.radio__input:checked + .radio__label {
  background: #dbccb5;
}

#progress-container {
  width: 25%;
  height: 20px;
  background-color: #444;
  border-radius: 5px;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(10, 1fr); /* Create 10 even columns (adjust as needed) */
  gap: 1px; /* Space between the segments (creates a "gap" effect) */
}

#progress-bar {
  height: 100%;
  width: 100%;
  background-color: #c48a0d;
  grid-column: span 0; /* This will be dynamically updated */
  border-radius: 5px;
  transition: grid-column 0.5s ease-in-out; /* Smooth transition for retro effect */
}

#progress-bar > div {
  background-color: #333; /* The retro background color of each segment */
  border: 1px solid #222; /* Add border for the pixelated effect */
}