/* Studio Center Panel */
.studio-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

.studio-wrapper {
  flex-grow: 1;
  background: transparent;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  padding: 0;
}

.character-preview-container {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}


.studio-render-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.studio-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.doll-layers {
  height: 90%;
  aspect-ratio: 1 / 1; /* Character ratio */
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
  transform-origin: center 90%;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
  animation: characterBreath 4s ease-in-out infinite;
}

.doll-layers.no-breath {
  animation: none;
}

.doll-layers.no-breath.bounce-effect {
  animation: dressBounce 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.doll-layers.bounce-effect {
  animation: dressBounce 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.character-shadow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1; /* Below all doll layers */
  display: none !important; /* Temporarily hidden */
}

.shadow-left {
  left: 43.5%; /* Center 50.5%, width 14% */
  width: 14%;
  top: 89.2%;
  height: 2.5%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 75%);
}

.shadow-right {
  left: 61.5%; /* Center 68.5%, width 14% */
  width: 14%;
  top: 86.8%;
  height: 2.5%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0) 75%);
}

.doll-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.layer-body {
  z-index: 10;
}

.body-blink-overlay {
  opacity: 0;
  transition: opacity 0.05s ease-in-out;
}

.body-blink-overlay.blink-active {
  opacity: 1 !important;
}

.layer-socks {
  z-index: 15;
}

.layer-legs {
  z-index: 20;
}

.layer-shirt {
  z-index: 30;
}

.layer-shoes {
  z-index: 40;
}

.layer-dress {
  z-index: 25; /* Sits over legs, under coat maybe? */
}

.layer-hair {
  z-index: 50; /* Over body/clothes */
}

.layer-accessories {
  z-index: 60; /* Topmost elements like glasses, bags */
}

/* Camera Flash Screen Effect */
.flash-effect {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
}

.flash-active {
  animation: cameraFlash 0.6s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 8, 8, 0.65);
  backdrop-filter: blur(14px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* Studio Vignette & Frame Containers */
.studio-frame-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: auto;
  max-height: 100%;
  aspect-ratio: 941 / 1672;
  pointer-events: none;
  z-index: 4; /* Above doll layers, under toast */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}


