/* -------------------- Base -------------------- */

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, sans-serif;
  background: linear-gradient(
    135deg,
    #f3e8ff 0%,
    #fce7f3 50%,
    #e0f2fe 100%
  );
  color: #111827;
}

/* -------------------- Header / Text -------------------- */

h1 {
  font-size: 36px;
  text-align: center;
  margin-bottom: 8px;
  color: #111827;
}

#instructions {
  font-size: 14px;
  text-align: center;
  color: #6b7280;
  margin-top: 0;
}

/* -------------------- Grid Wrapper (NEW) -------------------- */

.grid-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
}

.grid-body {
  display: flex;
  align-items: center;
}

/* -------------------- Column Labels -------------------- */

#columnLabels {
  display: grid;
  justify-content: center;
  margin-bottom: 6px;
  font-size: 12px;
  color: #6b7280;
}

#columnLabels div {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -------------------- Row Labels -------------------- */

#rowLabels {
  display: grid;
  margin-right: 6px;
  font-size: 12px;
  color: #6b7280;
}

#rowLabels div {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -------------------- Grid -------------------- */

#grid {
  display: grid;
  gap: 0;
}

.pixel {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  box-sizing: border-box;
}

/* -------------------- Controls Layout -------------------- */

.controls {
  max-width: 1280px;
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .controls {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* -------------------- Card Style -------------------- */

.group {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 16px;
}

.group-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
  text-align: left;
}

.group-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* -------------------- Buttons -------------------- */

button {
  padding: 6px 12px;
  margin-bottom: 10px;
  border-radius: 0px;
  border: 1px solid #d1d5db;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
   display: flex;
  align-items: center;
  gap: 6px;
}

button:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

button:focus {
  outline: none;
  border-color: #FF4A00;
  box-shadow: 0 0 0 1px #FF4A00;
}

button.active,
.pcr-button.active {
  background-color: #111827;
  color: white;
  border-color: #111827;
}

/* -------------------- Primary Button -------------------- */

button.primary {
  background: #FF4A00;
  color: white;
  border: none;
}

button.primary:hover {
  background: #E64200;
}

/* -------------------- Pickr Styling -------------------- */

.pcr-button {
  border-radius: 0px;
}

/* -------------------- Disabled -------------------- */

.pcr-disabled {
  opacity: 0.4 !important;
  pointer-events: none;
}

/* -------------------- Hide Coordinates (Toggle) -------------------- */

.hidden-labels {
  display: none !important;
}

.color-palette {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 0px;
  border: 1px solid #ddd;
  cursor: pointer;
}

#imageCanvas {
  border: 1px solid #ddd;
  margin-top: 20px;
}

#imageCanvas {
  border: 1px solid #ddd;
  image-rendering: pixelated;
  width: 320px;
  height: 320px;
}

.converter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  gap: 20px;
}

#downloadPixel {
  display: none;
}

#imageGrid{
display:grid;
gap:0;
margin-top:20px;
}

.imagePixel{
width:20px;
height:20px;
border:1px solid #eee;
}

/* -------------------- link styling -------------------- */
a {
  text-decoration: none;
}

