
.small-btn {
  background: #333;
  color: #ccc;
  border: none;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  border-radius: 4px;
  cursor: pointer;
}
.small-btn:hover {
  background: #555;
  color: #fff;
}
#contrastBg {
  background: #111;
  border: 1px solid #444;
  padding: 0.4rem;
  color: #ddd;
  border-radius: 4px;
  width: 200px;
  margin-top: 0.5rem;
}
#checkContrast {
  margin-left: 0.5rem;
  background: #333;
  color: #ccc;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
}
#checkContrast:hover {
  background: #555;
}
.contrast-result {
  margin-top: 0.8rem;
  font-weight: bold;
  font-size: 1rem;
}
.blend-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.blend-container .shade-box {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  border: 1px solid #444;
  position: relative;
}
.blend-container .shade-box span {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  text-align: center;
  font-size: 0.65rem;
  color: #eee;
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 3px;
  border-radius: 3px;
}
#magnifierZoom {
  width: 120px;
}
.saved-color {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: #222;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  color: #ccc;
  flex-wrap: wrap;
  cursor: grab;
}
.saved-color.dragging {
  opacity: 0.6;
}
.saved-color .swatch {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid #333;
  flex-shrink: 0;
}
.saved-color .color-info {
  flex-grow: 1;
  font-size: 0.75rem;
  line-height: 1.4;
}
.saved-color .remove-btn,
.saved-color {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 0.9rem;
}
.saved-color .remove-btn:hover,
.saved-color {
  color: #fff;
}
#exportFormat {
  background: #111;
  color: #ccc;
  border: 1px solid #444;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
}
.palette-list {
  position: absolute;
  background: #111;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.5rem;
  width: 240px;
  max-height: 260px;
  margin-top: 0.2rem;
  z-index: 50;
}
.palette-list.hidden {
  display: none;
}
.palette-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem;
  cursor: pointer;
  border-radius: 4px;
  color: #ccc;
}
.palette-list li:hover {
  background: #222;
}
.palette-list-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem;
  cursor: pointer;
  border-radius: 4px;
  color: #ccc;
}
.palette-list-item:hover {
  background: #222;
}
.palette-swatch-bar {
  display: flex;
  gap: 2px;
  margin-right: 0.5rem;
}
.palette-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid #333;
}
.palette-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid #333;
}
.palette-label {
  flex-grow: 1;
  font-size: 0.85rem;
}
.palette-actions {
  position: relative;
}
.palette-dot-btn {
  background: none;
  border: none;
  color: #999;
  font-size: 1rem;
  cursor: pointer;
}
.palette-dot-btn:hover {
  color: #fff;
}
.palette-action-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: #111;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.3rem 0;
  display: none;
  z-index: 100;
  min-width: 120px;
}
.palette-action-menu button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #ccc;
  padding: 0.4rem 0.8rem;
  text-align: left;
  cursor: pointer;
  font-size: 0.85rem;
}
.palette-action-menu button:hover {
  background: #222;
  color: #fff;
}
.shade-save-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: none;
  border: none;
  color: #ccc;
  font-size: 0.9rem;
  cursor: pointer;
}
.shade-save-btn:hover {
  color: #fff;
}
.shade-box {
  position: relative;
}
.shade-label {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  text-align: center;
  font-size: 0.65rem;
  color: #eee;
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 3px;
  border-radius: 3px;
  cursor: pointer;
}
.pixel-coords {
  position: fixed;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #eee;
  pointer-events: none;
  z-index: 100;
  transform: translate(12px, 12px); /* small offset from cursor */
  display: none;
}


/* Base Layout */
.image-color-picker-page {
  max-width: 950px;
  margin: auto;
  padding: 2rem 1.5rem;
  color: #eee;
  background: #111;
  font-family: 'Segoe UI', sans-serif;
}
.image-color-picker-page h1,
.image-color-picker-page h2,
.image-color-picker-page h3 {
  color: #fff;
  margin-bottom: 0.5em;
}
.image-color-picker-page h1 i,
.image-color-picker-page h2 i,
.image-color-picker-page h3 i {
  margin-right: 0.4em;
}
/* Upload Section */
.upload-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}
.upload-label {
  display: inline-block;
  padding: 0.75em 1.25em;
  background: #222;
  border: 1px dashed #444;
  cursor: pointer;
  color: #ccc;
  font-weight: bold;
  transition: background 0.2s;
}
.upload-label:hover {
  background: #2c2c2c;
}
#imageInput {
  display: none;
}
.drop-zone {
  padding: 1.5em;
  border: 2px dashed #444;
  color: #888;
  background: #1a1a1a;
  border-radius: 8px;
  font-size: 0.95rem;
}
/* Canvas Display */
.canvas-wrapper {
  position: relative;
  background: #111;
  border: 2px solid #333;
  margin-bottom: 1rem;
}
canvas#imageCanvas {
  max-width: 100%;
  display: block;
  background: #111;
}
canvas.color-preview {
  position: absolute;
  pointer-events: none;
  border: 1px solid #888;
  display: none;
  border-radius: 6px;
  box-shadow: 0 0 8px #000;
  z-index: 10;
}
#resetViewBtn {
  display: inline-block;
  background: #222;
  color: #ccc;
  border: 1px solid #444;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  position: absolute;
  right: 0;
}
#pixelCoords {
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 1rem;
}
/* Picked Color Output */
.picked-color-output {
  margin-bottom: 2px;
  text-align: center;
}
.color-box {
  width: 48px;
  height: 48px;
  border: 1px solid #555;
  margin-bottom: 1rem;
}
.color-values div {
  margin-bottom: 0.5rem;
}
.copy-btn {
  background: #333;
  color: #ccc;
  margin-left: 0.5em;
  border: none;
  cursor: pointer;
  padding: 0.25em 0.5em;
  border-radius: 4px;
}
.copy-btn:hover {
  background: #444;
}
/* Palette Output */
.palette-section {
  margin-bottom: 1rem;
}
.palette-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0.75rem;
  background: #1b1b1b;
  padding: 0.5rem;
  border-radius: 6px;
  max-height: 160px;
  overflow-y: auto;
}
.palette-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2px;

  border: 1px solid #333;
  padding: 2px 10px;
  border-radius: 6px
}
#paletteName {
  padding: 0.4rem 0.6rem;
  background: #222;
  border: 1px solid #444;
  color: #ccc;
  border-radius: 4px;
  flex: 1;
}
.custom-palette-dropdown {
  position: relative;
}
.dropdown-toggle {
  padding: 0.5rem 0.8rem;
  background: #222;
  border: 1px solid #444;
  color: #ccc;
  border-radius: 4px;
  cursor: pointer;
}
/* Saved Colors */
.saved-colors-section {
  text-align: left;
  width: calc(50% - 4px);
  display: inline-grid;
  border: 1px solid #444;
  padding: 2px;
  height: 400px;
  border-radius: 5px;
}
@media (max-width: 800px) {
  .saved-colors-section {
    width: 100%;
    margin-bottom: 5px;
    height: auto;
  }
}
.saved-colors-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  background: #181818;
  border-radius: 6px;
  padding: 0.5rem;
}
.export-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.export-controls select,
.export-controls button {
  background: #222;
  color: #ccc;
  border: 1px solid #444;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
}
.export-controls select {
  min-width: 140px;
}
/* Advanced Tools */
.advanced-tools {
  background: #191919;
  border: 1px solid #333;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.copy-section-btn {
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  background: #2a2a2a;
  color: #ccc;
  border: none;
  border-radius: 4px;
}
.magnifier-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.magnifier-controls input[type="range"] {
  width: 120px;
}
/* Toast */
.toast {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: #222;
  color: #eee;
  padding: 0.75rem 1.2rem;
  border-radius: 6px;
  border: 1px solid #444;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  pointer-events: auto;
}
/* How to Use */
.tool-section.how-to-use {
  background: #161616;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 1rem 1.25rem;
}
.tool-section.how-to-use ul {
  padding-left: 1.25rem;
  margin: 0;
}
.tool-section.how-to-use li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}






.upload-wrapper {
  position: relative;
  border: 2px dashed #444;
  background: #1a1a1a;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}
.upload-wrapper:hover {
  background: #222;
  border-color: #666;
}
.upload-combo {
  display: block;
  color: #ccc;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
}
.upload-combo i {
  margin-right: 0.5em;
  font-size: 1.2em;
}
#imageInput {
  display: none;
}
