/* Typing test specific styles */

.typing-test-container {
  margin: 2rem auto;
  max-width: 800px;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.typing-test-header {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

#text-display {
  background-color: #ecf0f1;
  border-radius: 6px;
  padding: 1.2rem;
  min-height: 120px;
  font-size: 1.3rem;
  line-height: 1.5;
  user-select: none;
  overflow-wrap: break-word;
  outline: none;
  cursor: text;
  border: 2px solid #3498db;
}

#text-display span {
  white-space: pre-wrap;
}

#text-display span.current {
  background-color: #3498db;
  color: white;
  border-radius: 3px;
}

#text-display span.correct {
  color: #2ecc71;
}

#text-display span.incorrect {
  color: #e74c3c;
  text-decoration: underline wavy red;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
  font-weight: 600;
  color: #2c3e50;
}

.stats div {
  font-size: 1.2rem;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.controls button {
  padding: 0.7rem 1.3rem;
  border-radius: 5px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.controls button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#stop-btn {
  background-color: #e74c3c;
  color: white;
}

#stop-btn:hover:not(:disabled) {
  background-color: #c0392b;
}

#restart-btn {
  background-color: #2ecc71;
  color: white;
}

#restart-btn:hover:not(:disabled) {
  background-color: #27ae60;
}

/* Summary modal overlay */

#summary-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 62, 80, 0.9);
  color: white;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
  text-align: center;
}

#summary-overlay > div {
  background: #34495e;
  padding: 2rem 3rem;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  max-width: 400px;
  width: 90%;
}

#summary-overlay h2 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

#summary-overlay p {
  font-size: 1.2rem;
  margin: 0.7rem 0;
}

#summary-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: white;
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

#time-select {
  padding: 0.5rem 0.8rem;
  border-radius: 5px;
  border: 2px solid #3498db;
  background-color: white;
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 1rem;
  cursor: pointer;
}
#time-select:focus,
.controls button:focus,
#summary-close:focus {
  outline: 3px solid #2980b9;
  outline-offset: 2px;
}
#text-display:focus {
  caret-color: #3498db;
}
#text-display span.incorrect {
  text-decoration: underline wavy red 2px;
}
#text-display:hover {
  border-color: #2980b9;
}

