/* Dark theme for tools pages */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #121212;
  color: #f5f5f5;
  margin: 0;
  padding: 1rem;
}

.tool-header {
  text-align: center;
  margin-bottom: 2rem;
}

.back-link {
  color: #61dafb;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

.tool-container {
  display: grid;
  gap: 1.5rem;
}

.input-section,
.output-section {
  background-color: #1e1e1e;
  padding: 1rem;
  border-radius: 8px;
}

#preview {
  max-width: 100%;
  height: auto;
  margin-top: 1rem;
}

button {
  background-color: #272727;
  color: #f5f5f5;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 1rem;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  background-color: #333333;
}

#svgResult {
  margin-top: 1rem;
  max-width: 100%;
}

@media (min-width: 700px) {
  .tool-container {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Advanced options panel */
.advanced-section {
  margin: 1rem 0 2rem;
}

details > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.5rem 0;
}

.options-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.5rem 0 1rem;
}

.options-grid {
  display: grid;
  gap: 1rem;
}

.options-grid fieldset {
  background-color: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 1rem;
}

.options-grid legend {
  padding: 0 0.25rem;
  font-weight: 600;
}

.options-grid label {
  display: block;
  margin: 0.35rem 0 0.25rem;
}

.options-grid input[type="number"],
.options-grid input[type="text"],
.options-grid select,
.options-json textarea {
  width: 100%;
  background: #121212;
  color: #f5f5f5;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 0.5rem;
}

.hint {
  display: inline-block;
  background: #333;
  color: #ddd;
  border-radius: 50%;
  width: 1rem;
  height: 1rem;
  line-height: 1rem;
  text-align: center;
  margin-left: 0.25rem;
  font-size: 0.75rem;
}

.error-msg {
  color: #ff9c9c;
  font-size: 0.8rem;
}

.note {
  color: #aaa;
}

.palette-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.pal-editor {
  display: grid;
  grid-template-columns: 2rem repeat(4, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.pal-colorbox {
  width: 100%;
  height: 1.75rem;
  border-radius: 3px;
  border: 1px solid #333;
}

.pal-row-remove {
  background: #552222;
}

.actions-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.options-json {
  margin-top: 1rem;
}

.debug-container-wrapper {
  margin-top: 1rem;
}

.debug-container {
  background: #0e0e0e;
  border: 1px solid #333;
  min-height: 120px;
  border-radius: 6px;
  padding: 0.5rem;
}

@media (min-width: 900px) {
  .options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
