* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #121213;
  color: #d7dadc;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.container {
  max-width: 700px;
  width: 100%;
  min-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #3a3a3c;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.subtitle {
  color: #818384;
  margin-top: 5px;
}

/* Paragraph Display */
.paragraph {
  background-color: #1a1a1b;
  border-radius: 8px;
  padding: 24px;
  font-size: 1.25rem;
  line-height: 1.8;
  margin-bottom: 20px;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  letter-spacing: 0.02em;
  cursor: text;
  outline: none;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.paragraph:focus {
  border-color: #538d4e;
}

.char {
  transition: color 0.05s;
}

.char.correct {
  color: #538d4e;
}

.char.incorrect {
  color: #b55;
  background-color: rgba(185, 85, 85, 0.3);
  border-radius: 2px;
}

.char.current {
  background-color: #565758;
  border-radius: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { background-color: #565758; }
  50% { background-color: transparent; }
}

.char.upcoming {
  color: #565758;
}

/* Stats */
.stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 15px;
  font-size: 1.1rem;
  color: #818384;
}

/* Results Section */
.results, .already-played {
  text-align: center;
  padding: 30px;
  background-color: #1a1a1b;
  border-radius: 8px;
  margin-top: 20px;
}

.results h2, .already-played h2 {
  margin-bottom: 25px;
  color: #538d4e;
}

.already-played h2 {
  color: #b59f3b;
}

.already-played p {
  color: #818384;
  margin-bottom: 20px;
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 25px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #d7dadc;
}

.stat-label {
  font-size: 0.9rem;
  color: #818384;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 5px;
}

/* Share Button */
.share-btn {
  background-color: #538d4e;
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.share-btn:hover {
  background-color: #6aaa64;
}

.share-message {
  margin-top: 15px;
  color: #538d4e;
  font-weight: 500;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding-bottom: 16px;
  text-align: center;
  opacity: 0.4;
  transition: opacity 0.2s;
  transform: scale(0.75);
}

.site-footer:hover {
  opacity: 0.8;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  body {
    padding: 15px;
  }

  h1 {
    font-size: 2rem;
  }

  .paragraph {
    font-size: 1.1rem;
    padding: 18px;
    line-height: 1.7;
  }

  .result-stats {
    gap: 25px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stats {
    gap: 20px;
    font-size: 1rem;
  }
}
