
:root {
  --bg: #0f1117;
  --panel: #171a23;
  --border: #2a2e3a;
  --text: #e6e8ef;
  --muted: #9aa0b0;
  --accent: #4f8cff;
  --accent-hover: #6ea0ff;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header {
  padding: 2rem 1.5rem 1rem;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0.02em;
}

.subtitle {
  color: var(--muted);
  max-width: 640px;
  margin: 0.5rem auto 0;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

.panel h2 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--text);
}

.input-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

textarea#inputText {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  background: #0c0e14;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.options-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

select, input[type=file] {
  background: #0c0e14;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem;
}

button {
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid var(--border);
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  background: #232735;
  color: var(--text);
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

button.primary:hover { background: var(--accent-hover); }

button.secondary { background: transparent; }

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#resultsSummary { color: var(--muted); font-size: 0.85rem; }

.table-wrapper {
  overflow: auto;
  max-height: 480px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.78rem;
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 0.6rem;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #1d2130;
  position: sticky;
  top: 0;
}

tr:hover td { background: #1a1e2a; }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}
