.counter-box {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  font-family: Arial, sans-serif;
}

.counter-box h2 {
  text-align: center;
  margin-bottom: 15px;
  color: #333;
}

.counter-box label {
  font-size: 14px;
  font-weight: bold;
  display: block;
  margin-bottom: 6px;
}

.counter-box textarea {
  width: 98%;
  min-height: 160px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  font-size: 14px;
}

.counter-buttons {
  margin: 15px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.counter-buttons button {
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.counter-buttons .count-btn {
  background: #800000;
  color: #fff;
}

.counter-buttons .count-btn:hover {
  background: #a00000;
}

.counter-buttons .clear-btn {
  background: #444;
  color: #fff;
}

.counter-buttons .clear-btn:hover {
  background: #666;
}

.counter-results {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  text-align: center;
}

.counter-results .result {
  flex: 1;
  min-width: 120px;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fafafa;
}

.counter-results .result h3 {
  margin: 0;
  color: #800000;
}

.counter-results .result small {
  color: #555;
}

.counter-message {
  margin-top: 12px;
  font-size: 13px;
  color: #555;
  text-align: center;
}
