body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #fffdfd;
  color: #fff;
}

.right-pane {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fcfafa;
}

.chat-wrapper {
  width: 95%;
  max-width: 700px;
  background: rgba(255,215,0,0.05);
  border: 2px solid #ffd700;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 0 30px #ffd700aa;
}

#chat {
  height: 70vh;
  overflow-y: auto;
  padding: 1rem;
  /* background: rgba(241, 241, 241, 0.842); */
  background: rgba(248, 244, 244, 0.979);
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid #ffd70033;
  scroll-behavior: smooth; /* for smooth scrolling */
}

/* .msg {
  margin: 0.5rem 0;
  padding: 0.75rem;
  border-radius: 10px;
  max-width: 85%;
} */

.msg {
  padding: 1.2rem 1.5rem;
  border-radius: 12px;
  margin: 0.75rem 0;
  max-width: 95%;
  font-size: 1.05rem;
  line-height: 1.8;
  white-space: normal !important;
  word-wrap: break-word;
}

/* .msg {
  max-width: 95%;      
  margin: 0.4rem auto 0.4rem 0; 
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
} */

/* Specific fix for GPT/user text structure */
.msg * {
  line-height: 1.75 !important;
}

/* Spacing between paragraphs */
.msg p {
  margin-bottom: 1rem;
}

/* Bullet lists */
.msg ul {
  margin: 1rem 0;
  padding-left: 1.6rem;
  list-style-type: disc;
}

.msg li {
  margin-bottom: 0.5rem;
  line-height: 0.5;
}

/* Hyperlink clarity */
.msg a {
  color: #0077cc;
  text-decoration: none;
}

.msg a:hover {
  text-decoration: underline;
}



/* .user {
  background: #f8da32ce;
  align-self: flex-end;
  text-align: right;
  color: #000;
} */

.user {
  background: #f8da32ce;
  /* align-self: flex-end; */
  text-align: right;
  color: #000;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.gpt {
  background-color: #f0f0f0;
  color: #000;
  /* align-self: flex-start; */
}

.input-area {
  display: flex;
  gap: 0.75rem;
}



input[type="text"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 1rem;
  background: #111111ef;
  color: #fff;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

button {
  padding: 0.75rem 1.5rem;
  background: #ffd700;
  color: #000;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #e6c200;
}


@keyframes blink {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

.hidden {
  display: none;
}


.typing {
  font-style: italic;
  margin-bottom: 0.5rem;
  color: #ffd700;
  font-size: 0.9rem;
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 0.5rem;
  height: 24px;
}

.typing .dot {
  width: 8px;
  height: 8px;
  background-color: #ffd700;
  border-radius: 50%;
  animation: blink 1s infinite;
  animation: bounce 1.4s infinite;

}

.typing .dot:nth-child(1) { animation-delay: 0s; }
.typing .dot:nth-child(2) { animation-delay: 0.2s; }
.typing .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1.4); opacity: 1; }
}

.hidden {
  display: none;
}

#voiceBtn {
  font-size: 1.1rem;
  padding: 0.7rem;
  background: #fff;
  color: #000;
  border: 1px solid #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* #voiceBtn:hover {
  background: #f2f2f2;
} */

/* #voiceBtn:active {
  background: #d0f0d0;
} */

#voiceBtn.listening {
  background: #b1f2b1 !important;
  color: #000;
  box-shadow: 0 0 8px #56d856;
}

/* #voiceBtn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.3);
} */

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #e6cc3cef;
  color: #000;
}

/* Center the container */
/* .right-pane {
  width: 100%;
  padding; center;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #fcfafa;
} */

.right-pane {
  display: flex;
  justify-content: center;
  align-items: center; /* This centers vertically */
  height: 100vh; /* Important to allow vertical centering */
  background: #fcfafa;
}


/* Container that holds both refresh button and chat */
.chat-container {
  position: relative;
  width: 95%;
  max-width: 700px;
  padding-right: 20px;
}

/* The chat UI box */
/* .chat-wrapper {
  width: 100%;
  background: rgba(255,215,0,0.05);
  border: 2px solid #ffd700;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 0 30px #ffd700aa;
} */

/* Refresh button positioned above top-right of chat-wrapper */
#refreshChat {
  position: absolute;
  top: -18px;
  right: 0;
  background: #fff;
  border: 2px solid #ffd700;
  border-radius: 50%;
  padding: 8px;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.2s;
}

#refreshChat:hover {
  background: #fff8c4;
}

#refreshChat i {
  font-size: 16px;
}


