.color-preview {
  width: 100%;
  height: 120px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: background 0.2s;
  border: 2px solid var(--border);
}

#colorPreviewText {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  background: rgba(0,0,0,0.4);
  padding: 4px 12px;
  border-radius: 6px;
}

input[type="color"] {
  width: 100%;
  height: 50px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: none;
  border-radius: var(--radius);
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.color-formats {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.format-row label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 600;
}

.copy-row {
  display: flex;
  gap: 8px;
}

.copy-row input {
  flex: 1;
  font-family: 'Courier New', monospace;
}

.copy-row .btn {
  white-space: nowrap;
  padding: 8px 16px;
}

/* ================================
   MOBILE RESPONSIVE â€” Tool Page Fix
   ================================ */

/* Inherit from global */
input, textarea, select {
  font-size: 16px; /* prevents iOS auto-zoom */
  width: 100%;
  max-width: 100%;
}

/* Responsive tool UI */
@media (max-width: 540px) {
  .tool-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
