body {
  background-color: #000;
  color: #fff;
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
}

.header {
  text-align: left;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #111;
}

.title {
  font-size: 32px;
  font-weight: bold;
}

.menu a {
  color: #fff;
  text-decoration: none;
  margin-left: 20px;
}

.menu a:hover {
  text-decoration: underline;
}

.container {
  display: flex;
  justify-content: flex-start;
  padding: 20px;
  height: calc(100vh - 100px); /* Adjust height minus header */
}

.drawing-section {
  width: 40%; /* Occupy 40% of the width */
  height: 75vh; /* 3/4 of the screen height */
}

.pixel-grid {
  width: 100%;
  aspect-ratio: 1; /* Keep it square */
  background-color: #fff;
  display: grid;
  grid-template-columns: repeat(80, 1fr); /* Each "pixel" is 1x1 px */
  grid-template-rows: repeat(80, 1fr);
  gap: 0px;
}

.pixel-grid div {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
}

.color-picker {
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.colors {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Display colors in 4 columns */
  gap: 0; /* No gaps between colors */
}

.color {
  width: 50px;
  height: 50px;
  cursor: pointer;
  border: none; /* No borders */
  outline: none; /* Ensure no outline is shown */
  position: relative;
}

.color.selected::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid #fff; /* White border around the selected color */
  z-index: 1;
}

.toilet-image {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1; /* Make the toilet image container take the remaining available space */
}

.toilet-image img {
  max-height: 75vh; /* Keep the same height as canvas */
  object-fit: contain;
}


.footer {
  text-align: center;
  padding: 10px;
  background-color: #111;
  color: #fff;
  width: 100%;
  margin-top: 20px;
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
  body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
  }

  .container {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 10px;
    margin-top: 20px; /* Add margin to avoid content going out of bounds */
  }

  .drawing-section {
    width: 90%;
    height: auto; /* Let height adjust based on content */
    margin-bottom: 20px; /* Add space between canvas and picker */
  }

  .color-picker {
    width: auto;
    margin-left: 0;
    margin-top: 20px;
  }

  .colors {
    grid-template-columns: repeat(4, 1fr); /* Keep the color grid intact */
  }

  .toilet-image {
    width: 90%;
    margin-top: 20px;
    margin-left: 0;
  }

  .toilet-image img {
    width: 100%;
    height: auto;
  }

  .footer {
    width: 100%;
    position: relative; /* Make sure it's positioned after content */
    bottom: 0;
    margin-top: 20px;
    text-align: center;
  }
}

