body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background-color: #f0f2f5;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
        .header {
      background-color: #111;
      color: #fff;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 30px;
      font-size: 16px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .header .logo {
      font-weight: bold;
      font-size: 18px;
    }

    .header .nav {
      display: flex;
      align-items: center;
      gap: 20px;
    }

    .header .nav a {
      color: #fff;
      text-decoration: none;
      font-weight: 500;
    }

    .header .nav a:hover {
      text-decoration: underline;
    }
    .wrapper {
      display: flex;
      justify-content: center;
      align-items: flex-start;
      gap: 30px;
      max-width: 1400px;
      margin: 40px auto;
      padding: 0 20px;
    }
    @media (max-width: 1000px) {
      .wrapper {
        flex-direction: column;
        align-items: center;
      }
      
   .header {
        flex-direction: column;
        gap: 8px;
        padding: 10px 20px;
        text-align: center;
      }
    }

/* Chat Container */
.chat-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 800px;
  margin: 20px auto;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
}

.chat-box {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: #f9fbfd;
  border-bottom: 1px solid #eee;
}

.chat-msg {
  max-width: 80%;
  padding: 12px 18px;
  border-radius: 20px;
  line-height: 1.6;
  word-wrap: break-word;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bot-msg {
  align-self: flex-start;
  background-color: #e6f2ff;
  color: #004085;
  border-bottom-left-radius: 4px;
}

.user-msg {
  align-self: flex-end;
  background-color: #007bff;
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-msg i {
  font-style: italic;
  color: #555; /* Adjust for better visibility on different backgrounds */
}

.bot-msg strong {
  color: #0056b3; /* Darker blue for emphasis */
}

/* Input area */
.chat-container input[type="text"] {
  padding: 15px 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin: 15px 20px 10px;
  font-size: 1em;
  width: calc(100% - 140px); /* Adjust based on button width and padding */
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.3s ease;
}

.chat-container input[type="text"]:focus {
  border-color: #007bff;
}

.chat-container button {
  padding: 15px 25px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  margin-right: 20px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.chat-container button:hover {
  background-color: #218838;
  transform: translateY(-1px);
}

.chat-container button:active {
  transform: translateY(0);
}

/* Loading Spinner */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #666;
  display: none; /* Hidden by default */
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1.1em;
}

/* Disclaimer */
.disclaimer {
  background-color: #fff3cd;
  color: #856404;
  padding: 15px 20px;
  font-size: 0.9em;
  text-align: center;
  border-top: 1px solid #ffeeba;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Chart styling */
.chat-container canvas {
  width: 95% !important; /* Important to override default Chart.js canvas sizing */
  max-height: 400px;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  background-color: #ffffff; /* Ensure chart background is white */
}

/* Footer */
.footer {
  background-color: #343a40;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  margin-top: auto; /* Pushes footer to the bottom */
}

.footer a {
  color: #007bff;
  text-decoration: none;
  margin: 0 8px;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #cce0ff;
}

/* Combined input and button for better layout */
.chat-container {
  display: flex;
  flex-direction: column;
  /* ... existing styles ... */
}

.chat-input-area {
  display: flex;
  padding: 15px 20px;
  border-top: 1px solid #eee;
  gap: 10px;
}

/* Add this to your HTML inside .chat-container, replacing existing input and button */
/*
<div class="chat-input-area">
  <input type="text" id="user-input" placeholder="Type prices like 150,152,149,153,155" />
  <button onclick="processInput()">Send</button>
</div>
*/