#game-container {
  max-width: 400px;
  text-align: center;
  font-family: Arial, sans-serif;
  margin: 20px auto;
  padding-bottom: 50px;
}

.rotate-180 {
  transform: rotate(180deg);
}

#score-container {
  margin-bottom: 30px;
  font-size: 40px;
}

#rotated-display {
  display: inline-block;
  color: #110066;
  font-family: AlQalamQuranMajeed, sans-serif;
  margin-bottom: 0;
  border-bottom: 2px solid transparent;
}

#letter-display-container {
  border-radius: 30px;
  border: 5px solid #eee;
}

#letter-display {
  font-family: AlQalamQuranMajeed, sans-serif;
  font-size: 150px;
  color: #110066;
}
.practice-lesson-3 #letter-display {
  font-size: 100px;
}
.wrong-letter-list {
  font-family: AlQalamQuranMajeed, sans-serif;
  font-size: 50px;
  color: #110066;
}

#score-label {
  font-size: 24px;
}

#action-buttons {
  margin: -15px 0 5px;
}

.score-button {
  padding: 10px 35px;
  font-size: 14px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  color: #333;
  border: 3px solid;
}

.score-button.nav {
  padding: 10px 15px;
}

#correct-button {
  background-color: #0a02;
  border-color: #0a04;
}

#wrong-button {
  background-color: #f002;
  border-color: #f004;
}

#back-button,
#forward-button {
  background-color: #ffc10722;
  border-color: #ffc10755;
}

#back-button[disabled],
#forward-button[disabled] {
  border-color: #ccc;
  background-color: #fff;
}

.start-button,
.control-button,
.back-button {
  display: inline-block;
  padding: 10px 20px;
  margin: 10px 5px;
  font-size: 18px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* .start-button:hover,
.control-button:hover,
.back-button:hover {
  background-color: #0056b3;
} */

.group-button {
  display: block;
  width: 100%;
  padding: 15px 20px;
  margin: 10px 0;
  font-size: 16px;
  background-color: #f8f9fa;
  color: #333;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.group-button:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.group-button.selected {
  background-color: #007bff;
  color: white;
  border-color: #0056b3;
}

#selected-group-info {
  margin-top: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 10px;
  border: 2px solid #007bff;
}

#selected-group-preview {
  font-family: AlQalamQuranMajeed, sans-serif;
  font-size: 22px;
  color: #666;
  margin: 10px 0;
}

.progress-bar-container {
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 10px;
  margin: 10px 0;
  overflow: hidden;
  height: 10px;
}

#progress-bar,
#progress-bar-2 {
  height: 100%;
  background-color: #4caf50;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 10px;
}

#position-indicator {
  margin-bottom: 0;
  font-size: 14px;
}

#progress-bar.old,
#progress-bar-2.old {
  background-color: #666;
}

/* #game-controls {
  margin-top: 20px;
} */

#text-animation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  z-index: 1;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.page__txt {
  margin: auto;
}

.txt {
  color: transparent;
  display: flex;
  font-family: monospace;
  font-weight: bold;
  font-size: clamp(3rem, 13vw, 10rem);
  text-transform: uppercase;
}

.animate .txt__character {
  animation: fall 2s linear 1 forwards;
  animation-delay: calc(var(--i) * 200ms);
}

@keyframes fall {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }

  50%,
  100% {
    color: hsl(calc(var(--i) * 25), 100%, 50%);
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 600px) {
  #game-container {
    width: 90%;
  }

  .group-button {
    font-size: 14px;
    padding: 12px 15px;
  }

  .start-button,
  .control-button,
  .back-button {
    font-size: 16px;
    padding: 8px 15px;
  }
}

.red-letter {
  color: red;
}

#rotated-display.wrong {
  border-color: red;
}

#letter-display.rotate-180.wrong {
  border-color: #f009;
}
.highlighted-letter {
  color: red;
  position: relative;
  z-index: 1;
}

.word-context,
#letter-display {
  display: inline-block;
  white-space: nowrap;
}

#image-container {
  position: relative;
  display: inline-block;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.row-overlay {
  background: rgba(0, 123, 255, 0.1);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: rgba(0, 123, 255, 0.8);
  border-radius: 4px;
}

.row-overlay.selected {
  background: rgba(40, 167, 69, 0.3);
  border-color: #28a745;
  color: #28a745;
}

/*

*/
.selection-mode-toggle {
  margin: 5px 0;
  text-align: center;
}

.mode-button {
  padding: 10px 20px;
  margin: 0 5px;
  font-size: 14px;
  font-weight: bold;
  border: 2px solid #28a745;
  background: white;
  color: #28a745;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.mode-button:hover {
  border-color: #28a745;
}

.mode-button.active {
  background: #28a745cc;
  color: white;
}

.row-overlay.in-range {
  background: rgba(255, 193, 7, 0.3);
  border-color: #ffc107;
  color: #ffc107;
}

/* Practice */
.practice-1 {
  padding: 36% 0 11%;
}

#row-overlays.practice-2 {
  grid-template-rows: repeat(11, 1fr);
  padding: 11% 0;
}

.practice-2 > .row-overlay {
  grid-row: span 2;
}

.practice-2 > .row-overlay:nth-child(2) {
  grid-row: span 1;
}

.practice-3 {
  padding: 11.5% 0;
}

.practice-4 {
  padding: 22.5% 0 11.5%;
}

.practice-5 {
  padding: 11.5% 0 9%;
}

.practice-6 {
  padding: 20% 0 11%;
}
