body {
  font-family: "Segoe UI", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background: #111;
  color: #fff;
}

.container {
  width: 90%;
  max-width: 600px;
  background: #1e1e1e;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 20px #000;
  text-align: center;
}

#text-display {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  user-select: none;
}

#text-display span.correct {
  color: #0f0;
}

#text-display span.incorrect {
  color: #f00;
  text-decoration: underline;
}

#text-input {
  width: 100%;
  height: 100px;
  padding: 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  margin-bottom: 1rem;
}
.level-selector-container {
  margin-top: 2rem;
  text-align: center;
}

.level-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 1rem;
  justify-content: center;
}

.level-button {
  padding: 10px;
  background: #333;
  color: #fff;
  border: 2px solid #00ccff;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.level-button:hover {
  background: #00ccff;
  transform: scale(1.1);
}

.level-button.locked {
  background: #777;
  cursor: not-allowed;
}

.progress-container {
  width: 100%;
  background: #333;
  height: 10px;
  border-radius: 5px;
  margin: 1rem 0;
  overflow: hidden;
}
.reset-btn {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #ff5555;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.reset-btn:hover {
  background: #ff2222;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #00ff99, #00ccff);
  transition: width 0.4s ease-in-out;
}

.flash {
  animation: flash 0.4s ease;
}

@keyframes flash {
  0% {
    background: #0f0;
    color: #000;
  }
  100% {
    background: none;
    color: #fff;
  }
}

.progress-bar {
  height: 100%;
  background: linear-gradient(to right, #00ff99, #00ccff);
  width: 0%;
  transition: width 0.5s ease;
}

button {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  background: #2196f3;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.stats {
  margin-top: 1rem;
  display: flex;
  justify-content: space-around;
}
