#xplore-color-tools-root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111827;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

#xplore-color-tools-root * {
  box-sizing: border-box;
}

/* Grid for "all" tools page */
.xplore-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.xplore-tool-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.xplore-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  border-color: #d1d5db;
}

.xplore-tool-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.xplore-tool-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: #4b5563;
  line-height: 1.5;
}

/* Base styles for individual tools */
.xplore-tool-container {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.xplore-input-group {
  margin-bottom: 20px;
}
.xplore-input-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: #374151;
}
.xplore-input, .xplore-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.xplore-input:focus, .xplore-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.xplore-button {
  background: #111827;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.xplore-button:hover {
  background: #374151;
}

/* Color swatch displays */
.xplore-swatch {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Flex layouts */
.xplore-flex { display: flex; }
.xplore-flex-col { flex-direction: column; }
.xplore-items-center { align-items: center; }
.xplore-justify-center { justify-content: center; }
.xplore-gap-4 { gap: 1rem; }
.xplore-gap-6 { gap: 1.5rem; }

/* Result Box */
.xplore-result-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 16px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 1.1rem;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.xplore-copy-btn {
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.875rem;
  color: #374151;
}
.xplore-copy-btn:hover {
  background: #f3f4f6;
}

/* Color wheel wrapper */
.xplore-wheel-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
  margin: 0 auto;
}

/* Grid for palettes */
.xplore-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.xplore-palette-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.xplore-palette-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-bottom: 8px;
  cursor: pointer;
}
.xplore-palette-hex {
  font-size: 0.875rem;
  color: #4b5563;
  font-family: monospace;
}

/* Coloris Base */
.xplore-coloris-mount {
  position: relative;
}

.xplore-coloris-mount input[data-coloris] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.clr-picker {
  font-family: inherit;
  width: 100% !important;
  max-width: none;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  background: #ffffff;
}

.clr-polaroid:before {
  display: none;
}

.clr-polaroid .clr-gradient {
  width: calc(100% - 16px);
  height: 140px;
  margin: 8px;
  border-radius: 6px;
}

.clr-polaroid .clr-hue,
.clr-polaroid .clr-alpha {
  width: calc(100% - 24px);
  margin: 8px 12px;
  height: 10px;
  border-radius: 999px;
}

.clr-polaroid .clr-format {
  width: calc(100% - 16px);
  margin: 0 8px 8px;
}

.clr-segmented {
  border-color: #e5e7eb;
  border-radius: 6px;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.clr-segmented label {
  padding: 6px 0;
}

.clr-segmented input:checked + label {
  color: #ffffff;
  background: #2563eb;
}

input.clr-color {
  font-family: monospace;
  font-size: 0.875rem;
  color: #111827;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: none;
}

input.clr-color:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.clr-polaroid .clr-preview {
  margin: 8px 0 8px 8px;
}

.clr-polaroid .clr-swatches {
  width: calc(100% - 8px);
  margin: 0 4px;
}

.clr-swatches button {
  width: 22px;
  height: 22px;
}

.clr-marker,
.clr-hue div,
.clr-alpha div {
  box-shadow: 0 0 0 2px #ffffff, 0 1px 4px rgba(0, 0, 0, 0.15);
}
