* {
  font-family: Arial, sans-serif;
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f5f7;
}

.app {
  max-width: 720px;
  width: 100%;
  margin: 40px auto;
  background: white;
  padding: 28px;
  border-radius: 12px;
}

h1 {
  margin-top: 0;
}

.intro {
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

textarea {
  width: 100%;
  padding: 12px;
  resize: vertical;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

button {
  padding: 10px 16px;
  cursor: pointer;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.stats div {
  background: #f6f7f8;
  padding: 14px;
  border-radius: 8px;
}

.stats strong,
.stats span {
  display: block;
}

.result-section {
  margin-top: 24px;
}

#result {
  min-height: 120px;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f6f7f8;
  padding: 14px;
  border-radius: 8px;
}

#statusMessage {
  min-height: 20px;
}

@media (max-width: 480px) {
  body {
    padding: 0 12px;
  }

  .app {
    margin: 16px auto;
    padding: 20px;
  }

  .actions {
    flex-wrap: wrap;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
