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

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Prevent scrolling */
}

.main-layout {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60vw;
  height: 70vh;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.avatar-bg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.25; /* Optional: subtle background effect */
}

#avatar {
  position: relative;
  width: 400px;
  height: 450px;
  margin: 40px auto 20px auto;
  background: radial-gradient(circle at 60% 40%, #f9d6db 0%, #fff 80%);
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

#avatar img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  pointer-events: none;
}
#feet  { z-index: 1; }
#body  { z-index: 2; }
#eyes  { z-index: 3; }
#ears  { z-index: 4; }
#mouth { z-index: 5; }
#hands { z-index: 6; }
#face1 { z-index: 7; }
#face2 { z-index: 8; }
#face3 { z-index: 9; }

.foreground-content {
  position: relative;
  z-index: 2;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.foreground-content h1,
.foreground-content p {
  margin: 0;
  padding: 0.5em 0;
  text-align: center;
  color: #222;
  background: rgba(255,255,255,0.7); /* Optional: improve contrast */
  z-index: 3;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

select {
  margin: 8px 4px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #eee;
  background: #fafafa;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.toolbar-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin: 1em 0;
  z-index: 3;
}

.toolbar {
  display: flex;
  flex-direction: row;
  gap: 1em;
}

#randomizeBtn {
  width: 48px;
  height: 48px;
  margin-left: 1.5em;
  cursor: pointer;
  transition: transform 0.2s;
}

#randomizeBtn:hover {
  transform: scale(1.1) rotate(-10deg);
}

}

button[type="submit"] {
  background: #ff7fa3;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 10px 24px;
  font-size: 18px;
  margin-top: 16px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: background 0.2s;
}
button[type="submit"]:hover {
  background: #ff5c8a;
}
.option-label {
  margin-right: 8px;
  font-size: 16px;
  color: #444;
}
.option-thumb {
  width: 200px;
  height: 200px;
  margin: 0 4px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #fff;
  cursor: pointer;
  transition: border 0.2s, box-shadow 0.2s;
}
.option-thumb:hover, .option-thumb.selected {
  border: 2px solid #ff7fa3;
  box-shadow: 0 2px 8px rgba(255,127,163,0.12);
}
body {
  background: #fff;
  font-family: 'Inter', 'Arial', sans-serif;
  margin: 0;
  padding: 0;
}
h1 {
  text-align: center;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-top: 32px;
}
.subtitle {
  text-align: center;
  font-style: italic;
  color: #888;
  margin-bottom: 0;
}
.creator-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-top: 24px;
}

#avatar {
  position: relative;
  width: 320px;
  height: 360px;
  margin: 0 auto;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  box-shadow: none;
}
#avatar img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
@media (max-width: 700px) {
  .avatar-bg {
    width: 90vw;
    height: 50vh;
  }
  #avatar {
    width: 180px;
    height: 200px;
  }
  .toolbar-row {
    flex-direction: column;
    gap: 0.5em;
  }
}

}
#feet  { z-index: 1; }
#body  { z-index: 2; }
#eyes  { z-index: 3; }
#ears  { z-index: 4; }
#mouth { z-index: 5; }
#hands { z-index: 6; }
#face1 { z-index: 7; }
#face2 { z-index: 8; }
#face3 { z-index: 9; }
.toolbar {
  display: flex;
   flex-direction: row;
  gap: 1em;
}
.toolbar-icon {
  width: 48px;
  height: 48px;
  margin: 0 8px;
  opacity: 0.5;
  cursor: pointer;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: border 0.2s, opacity 0.2s;
}
.toolbar-icon.selected {
  border: 2px solid #ff7fa3;
  opacity: 1;
}
.options-panel {
  margin: 0 auto;
}
.option-thumb {
  width: 150px;
  height: 150px;
  margin: 0 4px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #fff;
  cursor: pointer;
  transition: border 0.2s, box-shadow 0.2s;
}
.option-thumb:hover, .option-thumb.selected {
  border: 2px solid #ff7fa3;
  box-shadow: 0 2px 8px rgba(255,127,163,0.12);
}

.option-row {
  display: flex;
  align-items: center;
  margin: 12px 0;
  justify-content: flex-start; /* so items align left */
  overflow-x: auto;            /* enables horizontal scroll */
  white-space: nowrap;         /* prevents wrapping */
  padding-bottom: 12px;        /* optional: space for scrollbar */
  gap: 12px;                   /* optional: space between thumbs */
  scrollbar-width: thin;       /* optional: thinner scrollbar on Firefox */
}
.option-row::-webkit-scrollbar {
  height: 8px;                 /* optional: thinner scrollbar on Chrome/Safari */
}
