html, body {
  font-family: Arial, sans-serif;
  margin: 0 auto;
  background: transparent;
  min-height: 100vh;
  height: 100%;
  width: 90vw;
  max-width: 900px;
  background-color: #0d1117;
}

.center-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.page-title {
  text-align: center;
  font-size: 1.5rem;
  margin: 50px 0;
  color: white;
}

.container {
  background: linear-gradient(0deg, #f0f0f0, #F9F9F9);
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  /* box-shadow: 0 10px 10px rgba(0,0,0,.3); */
  padding: 20px;
  margin: 1px;
  height: 100%;
  width: 100%;
  max-width: 1280px;
}

#chatbox {
  height: 80vh;
  max-height: 80vh;
  /* min-height: 30vh; */
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.5);
  background-color: white;
  font-size: 15px;
  font-family: sans-serif;
  text-align: left;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#chatbox:empty {
  display: none;
  padding: 0;
  margin-bottom: 0;
}

.chart-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  overflow: hidden; /* ensures chart doesn’t overflow */
}

.chart-container {
  width: 95%;
  max-width: 700px;
  height: 300px;
  margin: 10px auto 5px auto;
  border-radius: 15px;
  background-color: #f1f1f1;
  overflow: hidden; /* CRITICAL for rounded corners */
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.chat-message {
  max-width: 100%;
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bot-message {
  align-self: flex-start;
  background-color: #f1f1f1;
  color: #333;
}

.user-message {
  align-self: flex-end;
  background-color: #e6f2ff;
  color: #333;
}

.spinner-icon {
  font-size: 16px;
  margin-left: 5px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.input-wrapper {
  display: flex;
  position: relative;
  width: 100%;
  margin-bottom: 10px;
}

#user_input {
  height: 40px;
  width: 100%;
  margin: 10px 0px 0px 0px; /* top right bottom left */
  padding: 9px 60px 5px 5px; /* top right bottom left */
  border-color: rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  font-size: 15px;
  font-family: Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
  resize: none;
}

#send-btn {
  height: 40px;
  width: 40px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  position: absolute;
  right: 0px;
  font-size: 16px;
}

#send-btn:hover {
  background-color: #404040;
}

#send-btn:focus {
  outline: none;
}

button {
  margin-top: 10px;
  box-sizing: border-box;
  padding: 5px 15px;
  background-color: #666666;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 10px;
}

button:hover {
  background-color: #404040;
}

hr {
  border: none;
  height: 1px;
  background-color: #e0e0e0;
}

h2 {
  font-size: 1.4em;
}

h3 {
  font-size: 1.2em;
}

@media (max-width: 768px) {
  html, body {
    width: 80vw;
  }
  .center-wrapper {
    max-width: 80vw;
  }
  .container {
    max-width: 80vw;
  }
  #chatbox {
    max-width: 80vw;
  }
  .input-wrapper {
    max-width: 80vw;
  }
  #user_input {
    font-size: 12px;
    max-width: 80vw;
  }
}
