* {
 
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* CONTAINER */
.typing-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 25px;
  background: #0f172a;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(56, 43, 43, 0.4);
  color: #e2e8f0;
}

/* TEXT DISPLAY */
.text-display {
  background: #020617;
  padding: 18px;
  border-radius: 12px;

  font-size: 18px;
  line-height: 1.8;

  border: 1px solid #1e293b;

  /* IMPORTANT */
  overflow: hidden;
  position: relative;

  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* inner moving track */
.text-track {
  display: inline-block;
  position: relative;
  transition: transform 0.15s ease-out;
}

/* TYPING COLORS */
.text-display span.correct {
  color: #22c55e;
}

.text-display span.incorrect {
  color: #ef4444;
  text-decoration: underline;
}

.text-display span.active {
  border-bottom: 2px solid #38bdf8;
}

/* INPUT */
#typingInput {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #e2e8f0;
  font-size: 16px;
  outline: none;
  resize: none;
  transition: 0.2s ease;
}

#typingInput:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56,189,248,0.3);
}

/* STATS BOX */
.stats-box {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  gap: 10px;
}

.stat {
  flex: 1;
  text-align: center;
  background: #020617;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid #1e293b;
}

.stat div {
  font-size: 26px;
  font-weight: bold;
  color: #38bdf8;
}

.stat span {
  font-size: 13px;
  color: #94a3b8;
}

/* TIMER */
.timer {
  text-align: center;
  font-size: 32px;
  font-weight: bold;
  margin: 15px 0;
  color: #facc15;
}

/* BUTTONS */
.button {
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  margin: 10px 5px;
  transition: 0.2s ease;
}

.equalBtn {
  background: #22c55e;
  color: white;
}

.equalBtn:hover {
  background: #16a34a;
}

.operator {
  background: #ef4444;
  color: white;
}

.operator:hover {
  background: #dc2626;
}

/* RESULT BOX */
.result-box {
  display: none; /* hidden initially */
  margin-top: 20px;
  padding: 15px;
  background: #020617;
  border-radius: 12px;
  border: 1px solid #1e293b;
  text-align: center;
  font-size: 16px;
  color: #e2e8f0;
}



/* RESPONSIVE */
@media (max-width: 768px) {
  .typing-container {
    padding: 15px;
  }

  .stats-box {
    flex-direction: column;
  }

  .stat {
    margin-bottom: 10px;
  }

  .timer {
    font-size: 26px;
  }
}