* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  color: #1f2937;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

main {
  width: 100%;
  max-width: 960px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.12);
  padding: 2rem;
}

h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.1;
}

form {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

label {
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 220px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.95rem;
  resize: vertical;
}

button {
  width: fit-content;
  padding: 0.95rem 1.5rem;
  border: none;
  border-radius: 9999px;
  background: #2563eb;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

button:hover {
  background: #1d4ed8;
}

.result h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

thead th {
  text-align: left;
  border-bottom: 2px solid #e5e7eb;
  padding: 0.85rem 0.75rem;
  background: #f9fafb;
}

tbody td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
  white-space: pre-wrap;
}

tbody tr:nth-child(even) {
  background: #f8fafc;
}
