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

body {
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  min-height: 100vh;
}

header {
  background: #16213e;
  border-bottom: 2px solid #0f3460;
  padding: 1.25rem 2rem 0;
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #e94560;
  margin-bottom: 1rem;
}

nav { display: flex; gap: 0; }

.tab {
  background: transparent;
  border: none;
  color: #8899aa;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.tab:hover { color: #c0c8d0; }
.tab.active { color: #e94560; border-bottom-color: #e94560; }

main { max-width: 860px; margin: 0 auto; padding: 2rem; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.intro {
  color: #8899aa;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field.grow { flex: 1; }

label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8899aa;
}

.sublabel {
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
  color: #556677;
}

input[type="text"], select, textarea {
  background: #0f1a2e;
  border: 1px solid #2a3a5e;
  color: #e0e0e0;
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
input[type="text"]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #e94560;
}

textarea {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.4;
  resize: vertical;
  tab-size: 4;
  white-space: pre;
  overflow-x: auto;
}

select {
  cursor: pointer;
  min-width: 5rem;
}

input[type="file"] {
  font-size: 0.9rem;
  color: #8899aa;
}
input[type="file"]::file-selector-button {
  background: #0f3460;
  color: #e0e0e0;
  border: 1px solid #2a3a5e;
  border-radius: 4px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  margin-right: 0.75rem;
  font-size: 0.85rem;
}

.checkbox-group {
  display: flex;
  gap: 1.25rem;
  padding-top: 0.2rem;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: #c0c8d0;
  cursor: pointer;
}
.check input[type="checkbox"] {
  accent-color: #e94560;
  width: 1rem;
  height: 1rem;
}

.hint {
  font-size: 0.8rem;
  color: #5588aa;
  padding-top: 0.5rem;
  font-style: italic;
}

button.primary {
  background: #e94560;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.7rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s, transform 0.1s;
}
button.primary:hover { background: #d63851; }
button.primary:active { transform: scale(0.98); }
button.primary:disabled { background: #4a4a6a; cursor: not-allowed; }

.status {
  margin-top: 1rem;
  font-size: 0.9rem;
  min-height: 1.5rem;
}
.status.error { color: #e94560; }
.status.success { color: #4ecdc4; }
.status.loading { color: #8899aa; }

.outputs {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 0.4rem 1rem;
}
