body {
    height: 100%;
    margin: 0;            /* Remove default body margin */
    padding: 0;
    display: flex;      /* Enable flexbox for body */

}


html {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;      /* Prevent scrollbars on the body */
}


body {
  font-family: 'Roboto', sans-serif;
  background-color: #121212;
  color: #e8e8e8;
  margin: 0;
  padding: 0;
  display: flex;
  height: 100%;
  backdrop-filter: blur(5px);
}

.sidebar {
    width: 280px;
    background-color: rgba(30, 30, 30, 0.8);
    padding: 20px;
    overflow-y: auto; 
    height: 100%; 
    border-right: 1px solid transparent;
    box-sizing: border-box;
    position: fixed;  
    left: -280px; 
    transition: left 0.3s ease-in-out;
    z-index: 11;
}

.sidebar h2 {
  text-align: center;
  margin-top: 10px;
}

.sidebar.open {
    left: 0px; 
}

.sidebar select { /* Target select within the sidebar */
  position: absolute; /* or relative */
  bottom: 20px;
  left: 30px;
  height: 40px;
  background-color: #2f2f2f;
  color: white;
  background-color: #333; 
  border: none; 
  border-radius: 20px; 
  color: #fff; 
  padding: 10px; 
  font-size: 16px; 
  appearance: none; 
  -webkit-appearance: none; 
}

.sidebar select:hover {
  background-color: #444; 
}

#toggleBtn {
    cursor: pointer;
    padding: 10px;
    background-color: transparent;
    color: white;
    border: none;
    position: fixed; /* Fixed position for visibility */
    top: 23px;
    left: 10px; /* Initially placed at the top-left */
    z-index: 1000; /* Ensures it is above other elements */
    transition: left 0.3s;
}

.conversation-list {
  list-style: none;
  padding: 0;
}

.conversation-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid rgba(51, 51, 51, 0.5);
  cursor: pointer;
  border-radius: 8px;
  /* Rounded corners */
  margin-bottom: 5px;
  /* Add some spacing */
}

.conversation-item:hover {
  background-color: rgba(40, 40, 40, 0.8);
  /* Smooth hover effect */
}

.conversation-title {
  flex: 1;
}

.delete-icon {
  color: #ff4d4d;
  font-size: 18px;
  margin-left: 10px;
  cursor: pointer;
  opacity: 0.7;
  /* Slightly transparent icon */
  transition: opacity 0.2s ease;
  /* Smooth transition on hover */
}

.delete-icon:hover {
  opacity: 1;
}
.chat-area {
    display: flex;
    flex-direction: column;
    height: 100%; 
    width: 100%;
    margin-left: 0;
    transition: margin-left 0.3s ease-in-out;
    background-color: rgba(30, 30, 30, 0.8); /* Same background as body */
}


.chat-log {
    flex: 1;         
    overflow-y: auto;
    padding: 20px;
    background-color: rgba(30, 30, 30, 0.8); /* Same background as others */
    margin-bottom: 0;
}

.input-area {
    padding: 15px;
    display: flex;
    margin: 0; /* Remove extra margin */
    background-color: rgba(30, 30, 30, 0.8); /* Same background as others */
}

#sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    cursor: pointer;
    z-index: 9999;
    color: white;
    font-size: 24px;
    background-color: transparent; /* More visible background */
    padding: 8px 12px;
    border-radius: 4px;
}

.message {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  /* Rounded corners for messages */
}

.conversation {
  padding-bottom: 100px;
  max-width: 800px;
  margin: 0 auto; /* This centers the element horizontally */
}

.ai-message {
  margin-top: 10px;
  background-color: #525252;
  padding: 10px;
  border-radius: 20px;
  max-width: 90%;
  display: block; /* Ensure it's on its own line */
  clear: both; /* Avoid overlapping with user messages */
}

.user-message {
  margin-top: 10px;
  background-color: #007bff;
  padding: 10px 20px;
  border-radius: 20px;
  display: block; /* Ensure it's on its own line */
  max-width: 90%;
  float: right; /* Aligns the message to the right */
  clear: both; /* Avoid overlapping with AI messages */
  margin-bottom: 10px;
}

#question {
  flex: 1;
  padding: 10px;
  border: 1px solid rgba(51, 51, 51, 0.5);
  background-color: rgba(30, 30, 30, 0.8);
  color: #e8e8e8;
  border-radius: 20px 0 0 20px;
}

.msg-button {
  padding: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 0 20px 20px 0;
  cursor: pointer;
}

.msg-button:active {
  background-color: #828282;
}

.new-conversation-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 10px 0 20px 0;
  /* Add bottom margin */
  cursor: pointer;
  border-radius: 8px;
  width: 100%;
}

.sender-name {
  color: white;
  /* Or any color you want */
  font-weight: bold;
  /* Optional: Make it bold */
}

.chat-area {
  /* ... your existing chat-area styles ... */
  margin-right: -15px;  /*  This will create the gap on the right side */
}

.sidebar.open ~ .chat-area {
    margin-left: 320px; /* Adjust margin when sidebar is open */
}