*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f0f13;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.widget {
  width: 340px;
  background: #1a1a24;
  border: 1px solid #2e2e42;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

h2 {
  color: #e2e2f0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.swatch-wrapper {
  position: relative;
  width: 100%;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

#colorInput {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

.swatch {
  width: 100%;
  height: 100%;
  background: #5b4cf5;
  border-radius: 12px;
  transition: background 0.1s;
}

.values {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.value-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #12121a;
  border: 1px solid #2e2e42;
  border-radius: 8px;
  padding: 10px 12px;
}

.label {
  font-size: 11px;
  font-weight: 700;
  color: #6a6a8a;
  letter-spacing: 0.8px;
  width: 32px;
  flex-shrink: 0;
}

.value {
  flex: 1;
  font-size: 13px;
  color: #c8c8e0;
  font-family: "Courier New", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  background: #2e2e42;
  color: #a0a0c0;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: #5b4cf5;
  color: #fff;
}

.copy-btn.copied {
  background: #4ade80;
  color: #0a2a14;
}
