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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 1.5rem;
  background: #fafafa;
  color: #111;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

textarea {
  width: 100%;
  max-width: 640px;
  min-height: 120px;
  padding: 1rem;
  font-size: 1.125rem;
  font-family: inherit;
  border: 2px solid #ddd;
  border-radius: 8px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}

textarea:focus {
  border-color: #888;
}

.arrow {
  font-size: 1.5rem;
  margin: 1.25rem 0;
  color: #999;
}

.output-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
}

.output {
  width: 100%;
  min-height: 120px;
  padding: 1rem 3.5rem 1rem 1rem;
  font-size: 1.125rem;
  font-family: inherit;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.output:empty::before {
  content: "Title Case Output";
  color: #aaa;
}

.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  color: #666;
  font-size: 0.85rem;
  line-height: 1;
  transition:
    background 0.15s,
    color 0.15s;
}

.copy-btn:hover {
  background: #f0f0f0;
  color: #333;
}
