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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0f11;
  color: #e8e8ea;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.container {
  max-width: 860px;
  margin: 0 auto;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

/* ── Tool tabs ── */
.tool-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #27272a;
  margin-bottom: 1.75rem;
}

.tab-btn {
  padding: 0.55rem 1.1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover { color: #bbb; }

.tab-btn.active {
  color: #e8e8ea;
  border-bottom-color: #6366f1;
}

/* ── Tool panels ── */
.tool-panel { display: none; }
.tool-panel.active { display: block; }

.subtitle {
  color: #888;
  margin-bottom: 1.5rem;
}

/* ── Controls panel ── */
.controls {
  margin-top: 1.5rem;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.divider {
  width: 1px;
  height: 40px;
  background: #2a2a2e;
  flex-shrink: 0;
}

.times {
  font-size: 1.2rem;
  color: #555;
  margin-top: 1.2rem;
}

/* ── Color label ── */
.color-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.color-label span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
}

/* ── Numeric label (used in overlay) ── */
.num-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.num-label span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
}

.num-label input[type="number"] {
  width: 80px;
  padding: 0.5rem 0.6rem;
  background: #09090b;
  border: 1px solid #333;
  border-radius: 7px;
  color: #e8e8ea;
  font-size: 1rem;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}

.num-label input[type="number"]:focus { border-color: #6366f1; }

/* ── Setting group (label + row of controls) ── */
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.setting-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #666;
}

.setting-row {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ── Generic upload button ── */
.upload-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: #27272a;
  border: 1px solid #333;
  border-radius: 7px;
  color: #ccc;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.upload-btn-label:hover { background: #333; }
.upload-btn-label input[type="file"] { display: none; }

/* ── Action buttons ── */
.action-btn {
  padding: 0.5rem 1rem;
  background: #27272a;
  color: #ccc;
  border: 1px solid #333;
  border-radius: 7px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.action-btn:hover:not(:disabled) { background: #333; }

.action-btn.primary {
  background: #6366f1;
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.action-btn.primary:hover:not(:disabled) { background: #4f52d8; }

.action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
