body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background-color: #121212; 
  padding: 0;
}

.layout {
  display: flex;
  height: 100vh;
}

/* GLASSMORPHISM TOPBAR (drop into style.css) */
.topbar {
  position: fixed;
  top: 20px;                        
  left: 50%;
  transform: translateX(-50%);      
  width: calc(100% - 2rem);         
  max-width: 550px;                 
  border-radius: 30px;              
  background: rgba(255, 255, 255, 0.04);    
  border: 1px solid rgba(255, 255, 255, 0.06); 
  backdrop-filter: blur(10px) saturate(120%); 
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 10px 30px rgba(4, 6, 12, 0.6); 
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between; 
  padding: 0; /* handled on UL */
}

/* list inside the glass panel */
.topbar ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0.5rem 1.25rem;  
  justify-content: flex-end; /* keep links on the right side of the bar */
}

/* links */
.topbar a {
  display: inline-block;             /* makes hit area consistent */
  color: #b5b5b5;                    /* greyed-out default */
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;                /* round when active/hovered */
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

/* hover: brighten text and give a very subtle background */
.topbar a:hover {
  color: #f5f5f5; /* near-white on hover */
}

/* active: slightly brighter and highlighted, no ugly underline */
.topbar a.active {
  color: #ffffff;
}

.topbar-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  margin-left: 0; /* flush to the left */
}

/* Main content */
.content {
  margin-top: 84px;
  padding: 1rem;
  flex: 1;
  padding: 30px;
  background: #121212;
  color: #fff;
  box-sizing: border-box;
  position: relative;
}

/* Stock labels bar */
.stock-bar {
  display: flex;
  justify-content: center; /* center horizontally */
  gap: 5px;               /* increase space between labels */
  margin-bottom: 30px;
  flex-wrap: wrap;          /* allow wrapping on smaller screens */
}

/* Stock style */
.stock {
  padding: 8px 20px; 
  color: #fff;          
  font-size: 16px;
  text-align: center;
  border-radius: 8px;       /* rounded corners */
  background-color: transparent;/* same dark background for all */
  white-space: nowrap;      /* prevent text wrapping */
  min-width: 100px;     
  font-family: "Helvetica", sans-serif;  
}

/* Chat container */
.chat-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* messages stack from bottom */
  align-items: center;
  width: 100%;
  max-width: 700px;      /* match input width */
  margin: 0 auto;        /* center within content area */
  padding-bottom: 80px;  /* leave space for fixed input */
  box-sizing: border-box;
}

.chat-messages {
  width: 100%;
  max-height: 78vh;          /* use viewport-based height */
  overflow-y: auto;
  padding: 10px 0 10px 0;    /* combine padding preferences */
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  gap: 10px;                 /* space between messages */
  scroll-behavior: smooth;   /* smooth scrolling for new messages */

  font-size: 16px;
  font-family: "Helvetica", sans-serif;
  line-height: 1.8;          /* controls spacing between lines */
}


/* Modern custom scroll bar for Webkit browsers (Chrome, Edge, Safari) */
.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background-color: rgba(100, 100, 100, 0.5);
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 100, 100, 0.8);
}

/* Messages */
.message {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 75%;
  word-wrap: break-word;
}

.message.user {
  background: #3a3a3a;
  align-self: flex-end;      /* pushes message to right */
  display: inline-block;     /* shrink to fit content */
}

.message.bot {
  align-self: stretch;
  max-width: 100%;
}

/* Chat input container fixed at bottom of content area */
.chat-input-container {
  width: 700px;
  height: 33px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  border-radius: 40px;
  position: absolute;  /* relative to content area */
  bottom: 20px;  
  left: 50%;
  transform: translateX(-50%);

  background: rgba(255, 255, 255, 0.1);
  border: 0.1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 10px -8px rgba(0, 0, 0, 0.35);
}

.chat-input-container input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  padding: 8px;
}

.chat-input-container .send-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  outline: none;
  color: #fff;
  font-size: 18px;
  padding: 10px 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.chat-input-container .send-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.chat-input-wrapper {
  position: absolute;      /* relative to content */
  bottom: 20px;            /* same as chat input */
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  display: flex;
  flex-direction: column-reverse; /* input at bottom, autocomplete above */
  z-index: 1000;           /* make sure it's above other content */
}

.autocomplete-items {
  position: absolute;
  bottom: 80px;              /* offset above input */
  left: 0;
  width: 100%;
  max-height: 200px;         
  overflow-y: auto;          /* vertical scroll only */
  overflow-x: hidden;        /* prevent horizontal scroll */
  background-color: #2b2b2b;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  border-radius: 8px 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;                  
  font-size: 15px;
  box-sizing: border-box;     /* include padding in width */
  padding: 0;                 /* remove extra padding that might push width */
  max-height: 250px;      /* keep it limited in height */
  overflow-y: auto;       /* enable vertical scrolling */
  scrollbar-width: thin;  /* Firefox: thin scrollbar */
  scrollbar-color: #888 #f1f1f1; /* thumb color / track color for Firefox */
}

.autocomplete-items div:hover {
  background-color: #414141;  /* slightly lighter */
  transform: translateX(2px); /* subtle shift effect */
}

.autocomplete-items div {
  padding: 12px 16px;         /* more modern padding */
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s, transform 0.1s;
}