:root {
  --bg: #0b1020;
  --card: #111831;
  --text: #e8ebf5;
  --muted: #a7b0cc;
  --border: rgba(255,255,255,0.14);
  --border-strong: rgba(255,255,255,0.22);
  --primary: #6d5efc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 700px at 20% 0%, #1a2450 0%, var(--bg) 45%, #070a14 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

.wrap {
  max-width: 1100px;
  margin: 48px auto;
  padding: 0 18px 60px;
}

.hero h1 {
  font-size: 40px;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-top: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.inputs textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 12px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  outline: none;
  line-height: 1.4;
}

.inputs textarea::placeholder {
  color: rgba(255,255,255,0.45);
}

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

.btn {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.btn.primary {
  background: var(--primary);
  color: white;
  border-color: rgba(255,255,255,0.15);
}

.btn.secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.result {
  color: var(--muted);
  line-height: 1.5;
}

/* ✅ TABLE FIXES */
.result table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 10px;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  table-layout: fixed;
  min-width: 860px; /* forces scroll when many columns */
}

.result th, .result td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 12px;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
  white-space: normal;
}

.result tr:last-child td { border-bottom: 0; }
.result th:last-child, .result td:last-child { border-right: 0; }

.result th {
  background: rgba(255,255,255,0.08);
  text-align: left;
  font-weight: 800;
}

.result td:first-child,
.result th:first-child {
  width: 170px;
  background: rgba(255,255,255,0.05);
  font-weight: 800;
}

/* zebra rows for readability */
.result tbody tr:nth-child(even) td {
  background: rgba(255,255,255,0.02);
}

/* makes wide tables usable on small screens */
.result {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.footer {
  margin-top: 20px;
  color: var(--muted);
}
