body {
  font-family: 'Comic Sans MS', cursive;
  background: #fff0f5;
  text-align: center;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  box-sizing: border-box;
  overflow-x: hidden;
  padding-top: 20px;
}

#splash-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 500px;
    margin: auto;
}

#splash-image {
    max-width: 80%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(255,105,180,0.3);
}

#splash-page h1 {
    color: #ff69b4;
    margin-bottom: 10px;
    font-size: 32px;
}

#splash-page p {
    margin-bottom: 25px;
    font-size: 18px;
    color: #555;
}

#enter-app {
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 10px;
    border: none;
    background: #ff69b4;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}
 #enter-app:active {
     transform: scale(0.98);
 }

#main-content {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-sizing: border-box;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

#main-content h1 {
  color: #ff69b4;
  margin-bottom: 20px;
  font-size: 32px;
}

p {
    margin-bottom: 20px;
}

#main-content button { 
  padding: 15px 30px;
  font-size: 18px;
  margin: 15px 10px;
  border-radius: 10px;
  border: none;
  background: #ff69b4;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
  max-width: 90%;
  width: auto;
  box-sizing: border-box;
}
#main-content button:active {
     transform: scale(0.98);
 }
#main-content button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: scale(1);
}
/* Hide the actual file input visually */
#main-content input[type="file"] {
    opacity: 0;
    position: absolute;
    z-index: -1;
    width: 0.1px;
    height: 0.1px;
    overflow: hidden;
    pointer-events: none;
}


#output {
  max-width: 95%;
  height: auto;
  border-radius: 20px;
  margin-top: 25px;
  margin-bottom: 15px;
  box-shadow: 0 0 20px rgba(255,105,180,0.4);
  border: 5px dashed #ff69b4;
  padding: 5px;
  display: none;
  opacity: 0;
  transform-origin: center bottom;
  box-sizing: border-box;
}

@keyframes plushie-bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.plushie-appear-animation {
  animation: plushie-bounce-in 0.6s ease-out forwards;
  display: block;
}

.step {
  margin: 20px 0 10px 0;
  font-size: 18px;
  color: #d63384;
  opacity: 0;
}

/* Make step-1 clickable */
#step-1 {
    cursor: pointer;
    text-decoration: underline;
    color: #ff69b4; 
}

.step.bounce-in {
    animation: bounceIn 0.8s ease forwards;
}

@keyframes bounceIn {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  80% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sparkle {
    box-shadow: 0 0 8px #fff, 0 0 15px #ff69b4;
    animation: sparkle 1.5s ease-in-out infinite alternate;
}
@keyframes sparkle {
  from { box-shadow: 0 0 8px #fff, 0 0 15px #ff69b4; }
  to { box-shadow: 0 0 12px #fff, 0 0 25px #ff69b4; }
}

#nickname {
  font-size: 24px;
  font-weight: bold;
  color: #ff1493;
  margin-top: 15px;
  margin-bottom: 15px;
  display: none;
}
#plushie-details {
    margin-top: 10px;
    font-size: 16px;
    color: #333;
    display: none;
    text-align: left;
    max-width: 90%;
    box-sizing: border-box;
}
#plushie-details div {
    margin-bottom: 8px;
    word-wrap: break-word;
}
#plushie-details strong {
    color: #ff69b4;
}

#status {
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 16px;
    color: #555;
    min-height: 1.5em;
    word-wrap: break-word;
}

#share-preview {
    margin-top: 20px;
    display: none; 
    text-align: center;
    padding: 15px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(255,105,180,0.2);
    max-width: 95%;
    box-sizing: border-box;
    flex-direction: column; 
    align-items: center;
}

#share-preview p {
    margin-bottom: 10px;
    font-size: 18px;
    color: #ff1493;
    font-weight: bold;
}

#share-thumb {
    max-width: 150px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    border: 3px solid #ff69b4;
    margin-bottom: 15px;
    box-sizing: border-box;
}

 #share-buttons {
     display: flex;
     flex-wrap: wrap;
     justify-content: center;
     gap: 10px;
     margin-top: 10px;
 }
 #share-buttons .share-button {
     padding: 10px 15px;
     font-size: 14px;
     margin: 0; 
     border-radius: 6px;
     border: none;
     cursor: pointer;
     color: white;
     transition: background-color 0.3s ease, transform 0.1s ease;
     display: flex;
     align-items: center;
     box-sizing: border-box;
 }
#share-buttons .share-button img {
    margin-right: 8px;
    vertical-align: middle;
}

 #fb-share-btn { background-color: #4267B2; }
 #ig-share-btn { background: linear-gradient(to right, #feda75, #d62976, #962fbf); }
 #pin-share-btn { background-color: #e60023; }
 #copy-link { background-color: #555; }
 #download { background-color: #ff69b4; } 

/* --- Mobile Vertical Optimization --- */
@media (max-width: 600px) {
    body {
        padding-top: 10px;
    }
    #splash-page {
        padding: 15px;
    }
    #splash-page h1 {
        font-size: 26px;
    }
    #splash-page p {
        font-size: 15px;
        margin-bottom: 20px;
    }
    #enter-app {
         padding: 12px 20px;
         font-size: 16px;
    }

    #main-content {
        padding: 15px 8px;
    }
    #main-content h1 {
       font-size: 26px;
       margin-bottom: 15px;
    }
    p {
       font-size: 15px;
       margin-bottom: 15px;
    }
    .step {
        font-size: 16px;
        margin: 15px 0 8px 0;
    }

    #main-content button { 
        margin: 10px 0;
        padding: 12px 20px;
        font-size: 16px;
        max-width: 95%;
    }
    #step-1 { 
        padding: 12px 20px;
        margin: 15px auto 8px auto; 
    }


    #status {
        font-size: 15px;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    #output {
        margin-top: 20px;
        margin-bottom: 10px;
        max-width: 100%;
    }

    #nickname {
        font-size: 20px;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    #plushie-details {
        font-size: 14px;
        max-width: 95%;
        margin-top: 8px;
    }

    #share-preview {
        padding: 10px;
        margin-top: 15px;
        max-width: 100%;
    }

    #share-preview p {
        font-size: 16px;
        margin-bottom: 8px;
    }

    #share-thumb {
        max-width: 100px;
        margin-bottom: 10px;
    }

    #share-buttons {
        gap: 8px;
        margin-top: 8px;
    }
    #share-buttons .share-button {
        padding: 8px 12px;
        font-size: 12px;
    }
     #share-buttons .share-button img {
        width: 18px;
        height: 18px;
        margin-right: 5px;
    }
}

 /* Ensure elements don't push content wider than viewport */
 body > *, body > div > * {
     box-sizing: border-box;
 }