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

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

/* Header */
.app-header h1 {
  margin: 0 0 4px;
  font-size: 2rem;
  font-weight: 700;
}

.subtitle {
  margin: 0 0 24px;
  color: #000000;
  font-size: 0.95rem;
}

/* Generic panel / card */
.panel {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 24px 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 24px;
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

/* Two-column layout for config */
#config-two-col {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap; /* stack on small screens */
}

#input-files-col,
#settings-panel {
  flex: 1 1 260px;
}

#input-files-col h3,
#settings-panel h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

/* Inputs + settings */
.config-item,
.setting-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.config-item label,
.setting-item label {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.config-item input,
.setting-item input,
.setting-item select {
  padding: 6px 8px;
  font-size: 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

/* Buttons */
.button-row {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease,
    box-shadow 0.15s ease;
}

.btn.primary {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.btn.primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn.secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn.secondary:hover {
  background: #d1d5db;
}

.btn.tertiary {
  background: #f3f4f6;
  color: #111827;
}

.btn.tertiary:hover {
  background: #e5e7eb;
}

/* Plots row */
#plots-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
}

.plot-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.plot-block img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

/* Stack plots on narrow screens */
@media (max-width: 800px) {
  #plots-row {
    flex-direction: column;
  }
}

/* Log / output area */
#output {
  font-family: Menlo, Consolas, "Courier New", monospace;
  font-size: 13px;
  background: #111827;
  color: #e5e7eb;
  white-space: pre-wrap;
  overflow-y: auto;
  min-height: 150px;
  max-height: 250px;
  border-radius: 8px;
  padding: 0.75rem;
  border: 1px solid #4b5563;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.6);
}

/* Make sure app stays readable on very small screens */
@media (max-width: 640px) {
  .app {
    padding: 16px 12px 32px;
  }
}
