:root{
  --bg: #f6f8fb;
  --card: #ffffff;
  --accent: #4e7dfc;
  --muted: #64748b;
  --danger: #e11d48;
  --radius: 10px;
  --gap: 1rem;
}

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

body {
  font-family: system-ui, Segoe UI, Roboto, Arial;
  margin: 0;
  background: var(--bg);
  color: #06202a;
  line-height: 1.45;
}

.wrap {
  max-width: 520px;
  margin: 4rem auto;
  padding: 1rem;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 6px 18px rgba(6,32,42,0.06);
}

h1 { 
  text-align: center; 
  margin-bottom: 1rem
}

label { 
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600
}

input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #dbe6ff;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: var(--gap);
}

.buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: var(--gap);
  flex-wrap: wrap;
}

button {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  border: 0;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 600;
}

button#clear {
  background: #f3f4f6;
  color: #06202a;
  border: 1px solid #e6e9f2;
}

button:active {
  transform: translateY(1px)}

.error {
  color: var(--danger);
  min-height: 1.2rem;
  margin-bottom: 0.5rem;
}

.result {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: #f8fbff;
  border-radius: 6px;
  border: 1px solid #e6f0ff;
  min-height: 2rem;
  font-weight: 600;
}

.help {
  font-size: 0.85rem; 
  color: var(--muted);
  margin-top: 0.5rem;
}

@media(max-width:420px) {
  .buttons {
    flex-direction: column
  }

  button {
    width: 100%;
  }
}