:root {
  --bg-dark: #121212;
  --bg-card: #1e1e1e;
  --text-light: #f5f5f5;
  --accent-gold: #ffcc00;
  --danger-red: #e74c3c;
  --font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  background: var(--bg-card);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--accent-gold);
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--accent-gold);
}

button {
  background: var(--accent-gold);
  color: #000;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #e6b800;
}

main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

aside#patch-list {
  width: 250px;
  background: var(--bg-card);
  padding: 1rem;
  border-right: 1px solid #333;
  overflow-y: auto;
}

#patch-list input,
#patch-list select,
#patchEntryForm input,
#patchEntryForm select,
#patchEntryForm textarea {
  width: 100%;
  padding: 0.4rem;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  background: #2a2a2a;
  border: 1px solid #444;
  color: var(--text-light);
  border-radius: 4px;
}

#saved-patches {
  list-style: none;
  padding: 0;
  margin: 0;
}

#saved-patches li {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid #333;
  cursor: pointer;
}

#saved-patches li:hover {
  background: #2c2c2c;
}

section#patch-form {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

form label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

fieldset {
  border: 1px solid #444;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  background: #1a1a1a;
}

legend {
  font-size: 1rem;
  color: var(--accent-gold);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

#output-summary {
  background: #1d1d1d;
  border-left: 4px solid var(--accent-gold);
  margin-top: 2rem;
  padding: 1rem;
  border-radius: 6px;
  font-family: monospace;
  white-space: pre-wrap;
}

#delete-patch {
  background: var(--danger-red);
  color: #fff;
}

#delete-patch:hover {
  background: #c0392b;
}

@media (max-width: 768px) {
  main {
    flex-direction: column;
  }

  aside#patch-list {
    width: 100%;
    order: 2;
  }

  section#patch-form {
    order: 1;
  }

  .category-header {
    font-weight: bold;
    color: var(--accent-gold);
    padding: 0.3rem 0.2rem;
    margin-top: 0.5rem;
    border-top: 1px solid #333;
  }

  .category-list {
    list-style: none;
    padding-left: 1rem;
    margin: 0;
  }

  .category-list li {
    padding: 0.3rem 0.4rem;
    cursor: pointer;
    border-bottom: 1px solid #333;
  }

  .category-list li:hover {
    background-color: #2a2a2a;
  }

  .platform-group {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .platform-select select {
    width: 200px;
  }

  .etsy-checkbox {
    padding-bottom: 3px;
  }

#output-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-left: 4px solid var(--accent-gold);
  background-color: #1d1d1d;
  border-radius: 6px;
  padding: 1rem;
  gap: 2rem;
  max-width: 100%;
  margin-top: 2rem;
}

#summary-content {
  flex: 1;
  white-space: pre-wrap;
  font-family: 'Courier New', Courier, monospace;
}

#summary-image {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

#summary-image img {
  width: 200px;
  height: 200px;
  border-radius: 6px;
  border: 1px solid #444;
  object-fit: cover;
}

}
