/* === Base Reset === */
body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 1rem;
}

/* === Section Containers === */
.tool-section {
  background-color: #1c1c1c;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.tool-section h2 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 1rem;
  border-bottom: 1px solid #444;
  padding-bottom: 0.25rem;
}

/* === Controls & Inputs === */
.control-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.control-group label {
  color: #bbb;
  font-weight: 500;
}

input[type="text"],
input[type="number"],
select {
  background-color: #252525;
  color: #fff;
  border: 1px solid #444;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.95rem;
}

input[type="color"] {
  width: 50px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"] {
  width: 160px;
}

/* === Buttons === */
button,
.copy-btn {
  background-color: #3a3a3a;
  border: 1px solid #555;
  color: #eee;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover,
.copy-btn:hover {
  background-color: #555;
}

/* === Output Formats === */
.output-formats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.format-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* === Color Preview === */
.color-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

#previewBox {
  width: 60px;
  height: 60px;
  border: 1px solid #555;
  border-radius: 4px;
  background-color: #fff;
}

#colorNameLabel {
  font-size: 0.9rem;
  color: #aaa;
}

/* === Mini Strip === */
.mini-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mini-strip div {
  width: 20px;
  height: 20px;
  border-radius: 2px;
  border: 1px solid #333;
}

/* === Gradient Section === */
.gradient-preview {
  height: 40px;
  border-radius: 4px;
  margin-bottom: 1rem;
  border: 1px solid #333;
}

.gradient-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1rem;
}

.gradient-swatches .swatch {
  width: 30px;
  height: 30px;
  border: 1px solid #444;
  border-radius: 3px;
  cursor: pointer;
}

.gradient-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.gradient-export {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  align-items: center;
}

/* === Blend Colors === */
.blend-preview {
  width: 60px;
  height: 60px;
  border: 1px solid #444;
  border-radius: 4px;
  margin-top: 0.5rem;
  cursor: pointer;
}

.blend-output {
  font-size: 0.95rem;
  color: #ccc;
}

/* === Accessibility === */
.accessibility-section p {
  margin: 0.3rem 0;
  font-size: 0.95rem;
}

/* === Similar Colors Section === */
.color-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-top: 1rem;
  border-bottom: 1px solid #333;
}

.color-toggles label {
  color: #aaa;
  font-size: 0.9rem;
}

.color-section-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1rem;
}

.section-harmony,
.section-gray,
.section-white,
.section-black,
.section-mix,
.section-saturation,
.section-hue,
.section-alpha,
.section-warm,
.section-cool,
.section-pastel,
.section-neon {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* === Blocks === */
.harmony-block,
.similar-block {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  border: 1px solid #444;
  cursor: pointer;
}

/* === How to Use === */
.how-to-use ul {
  list-style: disc;
  padding-left: 1.25rem;
}
.how-to-use li {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: #bbb;
}


.color-section {
  display: block;
}
.color-section h3 {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: #aaa;
  font-weight: 600;
  padding-left: 4px;
  border-left: 3px solid #444;
}
.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.color-box {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  border: 1px solid #333;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.color-box:hover {
  transform: scale(1.1);
  border-color: #666;
}

.color-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.color-toggles label {
  color: #ccc;
  user-select: none;
}
.color-section-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.color-section.hidden {
  display: none;
}

.alpha-box {
  background-image: linear-gradient(45deg, #444 25%, transparent 25%, transparent 75%, #444 75%),
                    linear-gradient(45deg, #444 25%, transparent 25%, transparent 75%, #444 75%);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
  position: relative;
}
.alpha-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: inherit;
  border-radius: 4px;
  z-index: 1;
}
