* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
}

.app {
  min-height: 100vh;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.subtitle {
  margin: 0 0 22px;
  color: #6b7280;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 1.05rem;
}

input:focus {
  outline: 3px solid #bfdbfe;
  border-color: #2563eb;
}

.result-line {
  margin-top: 9px;
  font-weight: 700;
  color: #111827;
}

.error {
  min-height: 18px;
  margin-top: 6px;
  color: #b91c1c;
  font-size: 0.88rem;
}

button {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

button:active {
  transform: scale(0.99);
}

.table-wrap {
  margin-top: 22px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  padding: 10px 8px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}

th {
  background: #f9fafb;
  font-weight: 800;
}

.empty {
  color: #6b7280;
  text-align: center;
}
