body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: #fffafc;
  width: 798px;
  height: 496px;
  overflow: hidden;
}

#dressup-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Layout */
.dressup-content {
  display: flex;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  overflow: hidden;
  gap: 10px;
}

.model-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 90%;
  max-height: 100%;
  width: 50%;
  overflow: hidden;
  padding: 10px;
}

.model-display {
  position: relative;
  width: 100%;
  flex-grow: 1;
  aspect-ratio: 3 / 4;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: #fdfdfd;
  border: 2px solid #ffc0cb;
  border-radius: 10px;
}

.model-display img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
}

.layer.tint {
  mix-blend-mode: multiply;
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
  background-color: transparent;
}

.model-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.model-controls button {
  padding: 8px 16px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  background-color: #ff95b5;
  color: white;
  cursor: pointer;
}

.model-controls button:hover {
  transform: scale(1.05);
}


.layer {
  pointer-events: none;
}

.item-panel {
  flex: 1;
  background: #fffafc;
  border-left: 2px dotted #ff95b5;
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 10px;
}

.tab-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.tab-bar {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
  border-bottom: 2px solid #ff95b5;
  padding-bottom: 4px;
}


.tab-button {
  background: #fff;
  border: 2px solid #ff95b5;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  position: relative;
  top: 2px;
}

.tab-button.active {
  background-color: #ff95b5;
  color: white;
  border-color: #ff95b5;
  z-index: 1;
  border-bottom: 2px solid #fffafc;
}

.thumbnail-box {
  border: 2px solid #ff95b5;
  padding: 6px;
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.thumbnail-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  height: auto;
}


.thumbnail-scroll img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border: 2px solid #ff95b5;
  border-radius: 6px;
  cursor: pointer;
  background-color: white;
  box-shadow: 0 0 2px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.thumbnail-scroll img:hover {
  transform: scale(1.05);
}

.thumbnail-scroll img.selected {
  border-color: #ff007a;
}

.thumbnail-scroll.dimmed {
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.tab-bar.dimmed {
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.color-picker {
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.color-picker input[type="color"] {
  width: 100px;
  height: 50px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: none;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.color-picker input[type="color"]:hover {
  transform: scale(1.1);
}

.color-history {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid #ccc;
  cursor: pointer;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s;
}

.color-swatch:hover {
  transform: scale(1.1);
  border-color: #ff95b5;
}


.selected-thumb {
  outline: 2px solid #FF5286;
  outline-offset: -2px;
}

.reset-thumb {
  opacity: 0.6;
  transition: 0.3s;
}
.reset-thumb:hover {
  opacity: 1;
}

/*This is the stuff needed to help keep your objects solid. Otherwise they'll be more opaque. Also pay mind to the z-index for stacking elements.*/
#modelBase {
  position: absolute;
  z-index: 6;
  opacity: 1;
  pointer-events: none;
}

#modelBaseTint {
  position: absolute;
  z-index: 7;
  opacity: 1;
  pointer-events: none;
}

#modelFaceBase {
  position: absolute;
  z-index: 8;
  opacity: 1;
  pointer-events: none;
}

#modelFaceTint {
  position: absolute;
  z-index: 9;
  opacity: 1;
  pointer-events: none;
}
#modelEyesBase {
  position: absolute;
  z-index: 12;
  opacity: 1;
  pointer-events: none;
}

#modelEyesTint {
  position: absolute;
  z-index: 13;
  opacity: 1;
  pointer-events: none;
}

#modelEyebrowsBase {
  position: absolute;
  z-index: 12;
  opacity: 1;
  pointer-events: none;
}

#modelEyebrowsTint {
  position: absolute;
  z-index: 13;
  opacity: 1;
  pointer-events: none;
}

#modelMouthBase {
  position: absolute;
  z-index: 12;
  opacity: 1;
  pointer-events: none;
}

#modelMouthTint {
  position: absolute;
  z-index: 13;
  opacity: 1;
  pointer-events: none;
}

#modelBangsBase {
  position: absolute;
  z-index: 14;
  opacity: 1;
  pointer-events: none;
}

#modelBangsTint {
  position: absolute;
  z-index: 15;
  opacity: 1;
  pointer-events: none;
}

#modelHairBase {
  position: absolute;
  z-index: 4;
  opacity: 1;
  pointer-events: none;
}

#modelHairTint {
  position: absolute;
  z-index: 5;
  opacity: 1;
  pointer-events: none;
}

#modelMarksBase {
  position: absolute;
  z-index: 10;
  opacity: 1;
  pointer-events: none;
}

#modelMarksTint {
  position: absolute;
  z-index: 11;
  opacity: 1;
  pointer-events: none;
}

#modelHatsBase {
  position: absolute;
  z-index: 26;
  opacity: 1;
  pointer-events: none;
}

#modelHatsTint {
  position: absolute;
  z-index: 27;
  opacity: 1;
  pointer-events: none;
}

#modelJacketsBase {
  position: absolute;
  z-index: 24;
  opacity: 1;
  pointer-events: none;
}

#modelJacketsTint {
  position: absolute;
  z-index: 25;
  opacity: 1;
  pointer-events: none;
}

#modelTopsBase {
  position: absolute;
  z-index: 20;
  opacity: 1;
  pointer-events: none;
}

#modelTopsTint {
  position: absolute;
  z-index: 21;
  opacity: 1;
  pointer-events: none;
}

#modelBottomsBase {
  position: absolute;
  z-index: 18;
  opacity: 1;
  pointer-events: none;
}

#modelBottomsTint {
  position: absolute;
  z-index: 19;
  opacity: 1;
  pointer-events: none;
}

#modelOverallsBase {
  position: absolute;
  z-index: 22;
  opacity: 1;
  pointer-events: none;
}

#modelOverallsTint {
  position: absolute;
  z-index: 23;
  opacity: 1;
  pointer-events: none;
}

#modelShoesBase {
  position: absolute;
  z-index: 16;
  opacity: 1;
  pointer-events: none;
}

#modelShoesTint {
  position: absolute;
  z-index: 17;
  opacity: 1;
  pointer-events: none;
}

#modelCapesBase {
  position: absolute;
  z-index: 2;
  opacity: 1;
  pointer-events: none;
}

#modelCapesTint {
  position: absolute;
  z-index: 3;
  opacity: 1;
  pointer-events: none;
}

#modelAccessBase {
  position: absolute;
  z-index: 28;
  opacity: 1;
  pointer-events: none;
}

#modelAccessTint {
  position: absolute;
  z-index: 29;
  opacity: 1;
  pointer-events: none;
}

#modelBackground {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  position: absolute;
  display: block;
  z-index: 1;
}



/* Mobile development. May still be a bit jittery but it works on my machine. (I bs'd some % to make it work)*/
@media (max-width: 760px) {
	body {
		width: 100vw;
		height: 100vh;
		overflow-y: auto;
	  }
	  
	  #dressup-container {
	  flex-direction: column;
	  width: 100%;
	  height: auto;
	  overflow-y: visible;
	  }
	  
	  .dressup-content {
	  flex-direction: column;
	  align-items: center;
	  height: auto;
	  display: flex;
	  gap: 10px;
	}

	  .model-section {
		width: 80%;
		padding: 10px;
		max-width: 400px;
	  }

	  .model-display {
		width: 50%;
		max-width: 300px;
		margin: 0 auto;
	  }

	  .model-controls {
		justify-content: center;
		margin-top: 8px;
	  }

	.item-panel {
	  flex: 1;
	  background: #fffafc;
	  border-left: 2px dotted #ff95b5;
	  display: flex;
	  flex-direction: column;
	  padding: 5px;
	  gap: 5px;
	}

	.tab-group {
	  display: flex;
	  flex-direction: column;
	  flex: 1 1 0;
	  min-height: 150px;
	  overflow: hidden;
	}

	.tab-bar {
	  display: flex;
	  gap: 4px;
	  justify-content: center;
	  flex-wrap: wrap;
	  border-bottom: 2px solid #ff95b5;
	  padding-bottom: 4px;
	  width: 80%;
	}

	.color-picker {
	  padding: 3px;
	  text-align: center;
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	  gap: 8px;
	  min-height: 250px;
	}

	.color-picker input[type="color"] {
	  width: 25px;
	  height: 25px;
	  border: none;
	  border-radius: 4px;
	  cursor: pointer;
	  background: none;
	  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
	  transition: transform 0.2s ease;
	}

	.thumbnail-box {
	  border: 2px solid #ff95b5;
	  padding: 5px;
	  background-color: #ffffff;
	  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
	  flex: 1;
	  width: 80%;
	  min-height: 75px;
	  overflow: hidden;
	  display: flex;
	  flex-direction: column;
	}

	.thumbnail-scroll {
	  flex: 1;
	  overflow-y: auto;
	  padding: 4px;
	  display: flex;
	  flex-wrap: wrap;
	  gap: 8px;
	  justify-content: center;
	  height: auto;
	  max-height: 75px;
	}


	.thumbnail-scroll img {
	  width: 50px;
	  height: 50px;
	  object-fit: cover;
	  border: 2px solid #ff95b5;
	  border-radius: 6px;
	  cursor: pointer;
	  background-color: white;
	  box-shadow: 0 0 2px rgba(0,0,0,0.1);
	  transition: transform 0.2s ease;
	}
}