/* Minimalistic 10-Finger Training App Styles */

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #333;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  background: white;
  border-radius: 8px;
  padding: 40px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
  transition: background-color 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.8rem;
  font-weight: 600;
  color: #2c3e50;
}

.stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 4px;
}

.stat div:last-child {
  font-size: 0.9rem;
  color: #6c757d;
}

.typing-area {
  margin: 30px 0;
}

#textInput {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  background: white;
  color: #495057;
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.3s ease,
    color 0.3s ease;
}

#textInput:focus {
  border-color: #007bff;
}

#textInput::placeholder {
  color: #adb5bd;
}

.word-display {
  margin: 30px 0;
  min-height: 50px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.word {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
}

.word.correct {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.word.incorrect {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.instructions {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  margin-top: 30px;
  border: 1px solid #e9ecef;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.instructions h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: #495057;
}

.instructions p {
  margin: 8px 0;
  font-size: 0.95rem;
  color: #6c757d;
}

.reset-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.2s ease;
  font-weight: 500;
}

.reset-btn:hover {
  background: #5a6268;
}

.accuracy-color {
  transition: color 0.2s ease;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #e9ecef;
  }

  .container {
    background: #2d3748;
    border-color: #4a5568;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }

  h1 {
    color: #f7fafc;
  }

  .stats {
    background: #1a202c;
    border-color: #4a5568;
  }

  .stat-number {
    color: #e2e8f0;
  }

  .stat div:last-child {
    color: #a0aec0;
  }

  #textInput {
    background: #1a202c;
    color: #e2e8f0;
    border-color: #4a5568;
  }

  #textInput:focus {
    border-color: #63b3ed;
  }

  #textInput::placeholder {
    color: #718096;
  }

  .word.correct {
    background: #2d5a27;
    color: #9ae6b4;
    border-color: #38a169;
  }

  .word.incorrect {
    background: #5a2d2d;
    color: #feb2b2;
    border-color: #e53e3e;
  }

  .instructions {
    background: #1a202c;
    border-color: #4a5568;
  }

  .instructions h3 {
    color: #e2e8f0;
  }

  .instructions p {
    color: #a0aec0;
  }

  .reset-btn {
    background: #4a5568;
    color: #e2e8f0;
  }

  .reset-btn:hover {
    background: #2d3748;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 20px;
  }

  .stats {
    flex-direction: column;
    gap: 16px;
  }

  h1 {
    font-size: 1.5rem;
  }
}
