/* Base Styles */
body {
  font-family: "Arial", sans-serif;
  text-align: center;
  background: linear-gradient(
    135deg,
    #6fffd6,
    #71a0ff,
    #ba5fff,
    #f9718e,
    #ffc25f
  );
  background-size: 400% 400%;
  animation: gradientBG 10s ease infinite;
  color: rgb(23, 21, 21);
  margin: 0;
  padding: 20px 0;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Containers */
#pet-creation,
#chat-interface,
#status,
#controls {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
  width: 90%;
  max-width: 400px;
  backdrop-filter: blur(10px);
}

/* Ensure the chat interface starts below all content */
#chat-interface {
  clear: both;
  margin-top: 30px;
}

/* Inputs & Selects */
input,
select {
  width: 90%;
  padding: 12px;
  border: none;
  border-radius: 25px;
  margin: 10px 0;
  font-size: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.3);
  color: black;
  outline: none;
  transition: 0.3s;
}

input:focus,
select:focus {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0px 0px 8px rgba(255, 255, 255, 0.8);
}

/* Buttons */
button {
  padding: 12px 20px;
  border-radius: 20px;
  border: none;
  background-color: rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
  margin: 10px;
}

button:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

/* Pet Display */
#pet-display {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 50px auto 10px;
  animation: petMove 3s infinite alternate ease-in-out;
}

@keyframes petMove {
  0% {
    transform: translateY(10px);
  }
  100% {
    transform: translateY(-10px);
  }
}

#pet-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Speech Bubble */
#speech-bubble {
  display: none;
  position: absolute;
  top: -39px;
  background: white;
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  color: black;
  font-weight: bold;
}

/* Custom File Upload */
.custom-file-upload {
  display: inline-block;
  padding: 10px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.3);
  color: rgb(16, 16, 16);
  border-radius: 10px;
  font-weight: bold;
}

.hidden-file-input {
  display: none;
}

/* Chat Box & Chat Output */
#chat-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

#user-input {
  width: calc(100% - 60px);
  padding: 12px;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.3);
  color: black;
  outline: none;
  transition: 0.3s;
}

#user-input:focus {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0px 0px 8px rgba(255, 255, 255, 0.8);
}

#send-button {
  padding: 12px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  color: black;
  cursor: pointer;
  font-size: 18px;
  transition: 0.3s;
}

#send-button:hover {
  background: rgba(255, 255, 255, 0.5);
}

#chat-output {
  max-height: 250px;
  overflow-y: auto;
  text-align: left;
  padding: 10px;
  margin-bottom: 10px;
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
}

/* Share URL text */
#share-url {
  font-size: 14px;
  word-break: break-all;
}

/* Pet Stats */
.stat {
  display: flex;
  align-items: center;
  margin: 10px 0;
  font-weight: bold;
}

.stat label {
  width: 100px;
  text-align: left;
  margin-right: 10px;
}

.progress-bar {
  flex: 1;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  overflow: hidden;
  margin-right: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  border-radius: 10px;
  transition: width 0.3s ease;
}

#energy-bar {
  background: linear-gradient(90deg, #FF9800, #FFC107);
}
