/* Improved Professional UI */
body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
  color: #fff;
  display: flex;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
  width: 280px;
  background: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(10px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 4px 0px 10px rgba(0, 0, 0, 0.5);
}

.sidebar h2 {
  color: #ffffff;
  font-size: 22px;
  margin-bottom: 20px;
}

.new-chat {
  background: linear-gradient(135deg, #0078ff, #ff0078);
  color: white;
  padding: 12px;
  font-weight: bold;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  margin-top: 20px;
  width: 100%;
}

.new-chat:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 0, 120, 0.3);
}

/* Chat Container */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

/* Chat Header */
.chat-header {
  font-size: 26px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  margin-bottom: 20px;
}

/* Chat Box */
.chat-box {
  flex: 1;
  width: 65%;
  max-height: 60vh;
  overflow-y: auto;
  padding: 20px;
  border-radius: 15px;
  background: rgba(30, 30, 30, 0.6);
  box-shadow: 0px 4px 15px rgba(255, 255, 255, 0.1);
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease-in-out;
}

.chat-box::-webkit-scrollbar {
  width: 5px;
}

.chat-box::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 5px;
}

/* Chat Messages */
.message {
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 12px;
  max-width: 75%;
  word-wrap: break-word;
  font-size: 16px;
  transition: all 0.3s ease-in-out;
}

.user-message {
  background: linear-gradient(135deg, #0078ff, #00d4ff);
  color: #fff;
  align-self: flex-end;
  box-shadow: 0px 4px 10px rgba(0, 120, 255, 0.3);
}

.bot-message {
  background: rgba(50, 50, 50, 0.9);
  color: #fff;
  align-self: flex-start;
  box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.1);
}

/* Chat Input Area */
.chat-input {
  display: flex;
  width: 65%;
  background: rgba(30, 30, 30, 0.9);
  border-radius: 30px;
  padding: 10px;
  align-items: center;
  box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease-in-out;
}

.chat-input input {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  background: rgba(50, 50, 50, 0.8);
  color: white;
  outline: none;
  transition: all 0.3s ease-in-out;
}

.chat-input input:focus {
  background: rgba(70, 70, 70, 0.9);
}

.chat-input button {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: white;
  margin-left: 10px;
  transition: all 0.3s ease-in-out;
}

.chat-input button:hover {
  color: #00d4ff;
  transform: scale(1.1);
}

/* Chart Container Styling */
.chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(30, 30, 30, 0.9);
  border-radius: 15px;
  padding: 15px;
  margin-top: 15px;
  width: 65%;
  box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.1);
}

.chart-container canvas {
  width: 100% !important;
  height: auto !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .chat-box,
  .chat-input,
  .chart-container {
    width: 85%;
  }
}

@media (max-width: 768px) {
  .chat-box,
  .chat-input,
  .chart-container {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .sidebar {
    display: none;
  }
  .chat-box,
  .chat-input,
  .chart-container {
    width: 100%;
  }
}

.chat-history {
  list-style: none;
  padding: 10px;
  overflow-y: auto;
  max-height: 200px;
}

.chat-history li {
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
}

.chat-history li:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}
.chat-header {
  font-size: 26px;
  font-weight: bold;
  background: linear-gradient(90deg, #ff0078, #0078ff);
  -webkit-background-clip: text;
  color: transparent;
  display: inline-block;
}
