:root {
  --bg: #f8f9fa;
  --text: #333;
  --card-bg: #ffffff;
  --border: #ddd;
  --accent: #007bff;
  --muted: #666;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #e5e5e5;
    --card-bg: #1e1e1e;
    --border: #333;
    --accent: #4dabf7;
    --muted: #aaa;
  }
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  max-width: 800px;
  margin: 40px auto;
  padding: 25px;
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: background 0.4s, color 0.4s;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

textarea {
  width: 100%;
  height: 200px;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  resize: none;
  background: var(--card-bg);
  color: var(--text);
}

.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #339af0;
}

.stats {
  margin-top: 20px;
  padding: 15px;
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.stats div {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}

.stats div:last-child {
  border-bottom: none;
}

.instructions {
  margin-top: 25px;
  font-size: 15px;
  color: var(--muted);
}
