/* Import Google Font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  /* Dark mode colors */
  --text-color: #E3E3E3;
  --bot-response-color: red; /* Red text in dark mode */
  --subheading-color: #828282;
  --placeholder-color: #A6A6A6;
  --primary-color: #242424;
  --secondary-color: #383838;
  --secondary-hover-color: #444;
    /* Add a variable for text color in light mode */
  --light-mode-text-color: #000;
}

.light_mode {
  /* Light mode colors */
  --text-color: #000; /* Black text in light mode */
  --bot-response-color: #000; /* Black text for bot responses in light mode */
  --subheading-color: #A0A0A0;
  --placeholder-color: #6C6C6C;
  --primary-color: #FFF;
  --secondary-color: #E9EEF6;
  --secondary-hover-color: #DBE1EA;
}

.light_mode .subtitle,
.light_mode .suggestion .text {
  color: black;
}
/* New centralized color rule for all relevant text elements */
body, .header .title, .header .subtitle, .suggestion .text, .suggestion .icon, 
.chat-list .message .text, .typing-form .typing-input, .disclaimer-text a {
  color: var(--text-color);
}

body {
  background: var(--primary-color);
}

.header, .chat-list .message, .typing-form {
  margin: 0 auto;
  max-width: 980px;
}

.header {
  margin-top: 6vh;
  padding: 1rem;
  overflow-x: hidden;
}

body.hide-header .header {
  margin: 0;
  display: none;
}

.header :where(.title, .subtitle) {
  color: var(--text-color);
  font-weight: 500;
  line-height: 4rem;
}

.header .title {
  width: fit-content;
  font-size: 3rem;
  background-clip: text;
  background: linear-gradient(to right, #4285f4, #d96570);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


.header .subtitle {
  font-size: 2.6rem;
  color: var(--text-color);
}
.suggestion-list {
  width: 100%;
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin-top: 9.5vh;
  overflow: hidden;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.suggestion-list .suggestion {
  cursor: pointer;
  padding: 1.25rem;
  width: 222px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  border-radius: 0.75rem;
  justify-content: space-between;
  background: var(--secondary-color);
  transition: 0.2s ease;
}

.suggestion-list .suggestion:hover {
  background: var(--secondary-hover-color);
}

.suggestion-list .suggestion :where(.text, .icon) {
  font-weight: 400;
  color: var(--text-color);
}

.suggestion-list .suggestion .icon {
  width: 42px;
  height: 42px;
  display: flex;
  font-size: 1.3rem;
  margin-top: 2.5rem;
  align-self: flex-end;
  align-items: center;
  border-radius: 50%;
  justify-content: center;
  color: var(--text-color);
  background: var(--primary-color);
}

.chat-list {
  padding: 2rem 1rem 12rem;
  max-height: 100vh;
  overflow-y: auto; /* Ensures scrollbar appears */
  
  scrollbar-width: thin; /* For Firefox, makes scrollbar thinner */
  scrollbar-color: hsl(267, 7%, 26%) transparent; /* Custom colors for Firefox */
}

/* Custom scrollbar styling for WebKit browsers (e.g., Chrome, Safari) */
.chat-list::-webkit-scrollbar {
  width: 100vh;
  width: 8px; /* Adjust the width of the scrollbar */
}

.chat-list::-webkit-scrollbar-track {
  background: transparent; /* Track background */
  width: 100vh;
}

.chat-list::-webkit-scrollbar-thumb {
  background-color: #888; /* Scrollbar color */
  border-radius: 4px;
  border: 2px solid transparent; /* Transparent border for spacing */
}

/* Optional: Keep the same styling for incoming messages */
.chat-list .message.incoming {
  margin-top: 1.5rem;
}




/* For WebKit browsers (like Chrome and Safari) */
.chat-list::-webkit-scrollbar {
  width: 8px; /* Adjust scrollbar width */
}

.chat-list::-webkit-scrollbar-track {
  background: var(--secondary-color); /* Track color */
}

.chat-list::-webkit-scrollbar-thumb {
  background-color: #888; /* Scrollbar thumb color */
  border-radius: 4px;
  border: 2px solid var(--secondary-color); /* For rounded effect */
}

.chat-list .message.incoming {
  margin-top: 1.5rem;
}


.chat-list .message.incoming {
  margin-top: 1.5rem;
}

.chat-list .message .message-content {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  align-items: center;
}



   Styling for bot response text color 
   .chat-list .message.incoming .text {
    color: #ff0000 !important; /* Fixed color for bot responses */
  }
  
  

/* Bot response default styling */
.chat-list .message.incoming .message-content {
  background-color: #33333300; /* Regular background color */
  padding: 10px;
  border-radius: 8px;
  max-width: 100%;
  margin: 5px 0;
  transition: background-color 0.3s ease; /* Smooth transition for hover */
}

/* Green hover effect for bot response */
.chat-list .message.incoming .message-content:hover {
  background-color: #005c14; /* Green background on hover */
  color: #fff9f9; /* Text color on hover for contrast */
}









.chat-list .message .text {
  color: var(--text-color);
  white-space: pre-wrap;
}

.chat-list .message.error .text {
  color: #e55865;
}

.chat-list .message.loading .text {
  display: none;
}

.chat-list .message .avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  align-self: flex-start;
}

.chat-list .message.loading .avatar {
  animation: rotate 3s linear infinite;
}

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

.chat-list .message .icon {
  color: var(--text-color);
  cursor: pointer;
  height: 35px;
  width: 35px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  font-size: 1.25rem;
  visibility: hidden;
}


/* Apply margin to the copy button to shift the pair to the right */
.chat-list .message .icon:first-of-type {
  margin-left: 4rem; /* Adjust this value to move both buttons to the right */
}

/* Adjust gap between the two buttons */
.chat-list .message .icon + .icon {
  margin-left: 0.5rem; /* Set a smaller margin between the buttons */
}


.chat-list .message .icon.hide {
  visibility: hidden;
}

.chat-list .message:not(.loading, .error):hover .icon:not(.hide){
  visibility: visible;
}

.chat-list .message .icon:hover {
  background: var(--secondary-hover-color);
}

.chat-list .message .loading-indicator {
  display: none;
  gap: 0.8rem;
  width: 100%;
  flex-direction: column;
}

.chat-list .message.loading .loading-indicator {
  display: flex;
}

.chat-list .message .loading-indicator .loading-bar {
  height: 11px;
  width: 100%;
  border-radius: 0.135rem;
  background-position: -800px 0;
  background: linear-gradient(to right, #4285f4, var(--primary-color), #4285f4);
  animation: loading 3s linear infinite;
}

.chat-list .message .loading-indicator .loading-bar:last-child {
  width: 70%;
}

@keyframes loading {
  0% {
    background-position: -800px 0;
  }

  100% {
    background-position: 800px 0;
  }
}

.typing-area {
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 0;
  padding: 1rem;
  background: var(--primary-color);

}

/* .typing-area :where(.typing-form, .action-buttons) {
  display: flex;
  gap: 0.75rem;
} */



/* Replaces the rule you just deleted */
.typing-area .typing-form {
  display: flex;
  gap: 0.75rem;
}

/* Styles for the new container to space out the buttons */
.typing-form .typing-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem; /* This creates the equal space */
}

/* OPTIONAL: This makes the file attach icon the same size as the others for better visual balance */
.typing-form .file-upload-wrapper {
  height: 56px;
  width: 56px;
}

.typing-form .file-upload-wrapper :is(img, button) {
  height: 100%;
  width: 100%;
}





.typing-form .input-wrapper {
  width: 100%;
  height: 56px;
  display: flex;
  position: relative;
}

.typing-form .typing-input {
  height: 100%;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 1rem;
  color: var(--text-color);
  padding: 1.1rem 4rem 1.1rem 1.5rem;
  border-radius: 100px;
  background: var(--secondary-color);
}

.typing-form .typing-input:focus {
  background: var(--secondary-hover-color);
}

.typing-form .typing-input::placeholder {
  color: var(--placeholder-color);
}

.typing-area .icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  font-size: 1.4rem;
  color: var(--text-color);
  align-items: center;
  justify-content: center;
  background: var(--secondary-color);
  transition: 0.2s ease;
}

.typing-area .icon:hover {
  background: var(--secondary-hover-color);
}

.typing-form #send-message-button {
  position: absolute;
  right: 0;
  outline: none;
  border: none;
  transform: scale(0);
  background: transparent;
  transition: transform 0.2s ease;
}

.typing-form .typing-input:valid ~ #send-message-button {
  transform: scale(1);
}

.typing-area .disclaimer-text {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 1rem;
  color: var(--placeholder-color);
}

/* Responsive media query code for small screen */
@media (max-width: 1024px) {
  .header :is(.title, .subtitle) {
    font-size: 2rem;
    line-height: 2.6rem;
  }

  .header .subtitle {
    font-size: 1.7rem;
  }

  .typing-area :where(.typing-form, .action-buttons) {
    gap: 0.4rem;
  }

  .typing-form .input-wrapper {
    height: 50px;
  }

  .typing-form .typing-input {
    padding: 1.1rem 3.5rem 1.1rem 1.2rem;
  }

  .typing-area .icon {
    height: 50px;
    width: 50px;
  }

  .typing-area .disclaimer-text {
    font-size: 0.75rem;
    margin-top: 0.5rem;
  }

  /* Mobile Navigation: Show hamburger, hide navigation buttons */
  .hamburger-menu {
    display: block !important; /* Show hamburger menu on mobile */
    

  }


  .top-right-buttons {
    display: none !important; /* Hide navigation buttons by default on mobile */
    top: 5rem; /* Position further below hamburger when shown */
    right: 0.5rem; /* Adjust right position for horizontal layout */
    flex-direction: row; /* Horizontal layout on mobile */
    gap: 0.5rem; /* Smaller gap for horizontal layout */
    opacity: 0;
    transform: translateX(100%);
  }

  .top-right-buttons.show {
    display: flex !important; /* Show navigation when hamburger is clicked */
    right: 5rem;
    flex-direction: row; /* Horizontal layout on mobile */
    opacity: 1;
    transform: translateX(0);
  }

  /* Remove vertical margins for horizontal layout on mobile */
  .top-right-buttons #theme-toggle-button,
  .top-right-buttons #toggle-assistant-button,
  .top-right-buttons #toggle-version-button,
  .top-right-buttons #toggle-devloper-button {
    margin-top: 0 !important;
  }
}






/*background*/

/* Global reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Quicksand', sans-serif;
}

/* Main Body Styling */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #000; /* Base black background */
  overflow: hidden; /* Prevents unwanted scrollbars */
}

/* Animated Background Section */
section {
  position: fixed; /* Covers the entire viewport */
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  overflow: hidden;
  z-index: -1; /* Keeps it behind other content */
}

/* Gradient Animation */
section::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(#000, #0f0, #000);
  animation: animate 5s linear infinite;
}

/* Animation Keyframes */
@keyframes animate {
  0% {
      transform: translateY(-100%);
  }
  100% {
      transform: translateY(100%);
  }
}

/* Individual Span Styling */
section span {
  position: relative;
  display: block;
  width: calc(6.25vw - 2px);
  height: calc(6.25vw - 2px);
  background: #181818;
  z-index: 2;
  transition: 1.5s;
}

/* Hover Effect for Span Elements */
section span:hover {
  background: rgb(21, 255, 0);
  transition: 0s;
}

/* Chatbot Container Styling */
.chat-container {
  position: relative;
  z-index: 1; /* Ensure it stays above the animated background */
  background: rgba(34, 34, 34, 0.85); /* Semi-transparent background for readability */
  padding: 20px;
  border-radius: 8px;
  width: 400px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9);
  color: white;
  margin-top: 20px; /* Provides space from the top of the viewport */
}

/* Chatbot Header */
.chat-container h1 {
  text-align: center;
  color: #0f0;
}

/* Chat Box Styling */
.chat-box {
  padding: 1rem;
  height: 300px;
  overflow-y: auto;
  border-bottom: 1px solid #333;
  color: white;
  background: #222;
  margin-bottom: 10px;
}

/* Input Container */
.input-container {
  display: flex;
}

/* User Input Styling */
#user-input {
  flex: 1;
  padding: 1rem;
  border: none;
  outline: none;
  background: #333;
  color: #fff;
  border-radius: 4px 0 0 4px;
}

/* Send Button Styling */
#send-btn {
  padding: 1rem;
  background-color: rgb(34, 255, 0);
  color: #000;
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 0 4px 4px 0;
}

/* Send Button Hover Effect */
#send-btn:hover {
  background-color: #0a0; /* Slightly darker green on hover */
}










.suggestion-list .suggestion .icon {
  color: red; /* Change this to your preferred icon color */
}


.disclaimer-text a {
  color: #59ff00; /* Initial color of the link text */
  text-decoration: none; /* Remove underline */
}

.disclaimer-text a:hover {
  color: red; /* Change color on hover */
}



/* Light mode for background boxes */
.light_mode section span {
  background: #cac3c3; /* White boxes in light mode */
}

.light_mode section span:hover {
  background: #ff0000; /* Black hover effect in light mode */
}












.icon.material-symbols-rounded {
  /* Styling for speaker button */
  cursor: pointer;
  font-size: 1.25rem;
}

.icon.material-symbols-rounded:hover {
  color: #00f; /* Change color on hover, optional */
}




/* Navigation buttons - visible on desktop, hidden on mobile */
.top-right-buttons {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex; /* Visible by default on desktop */
  flex-direction: column;
  gap: 0.75rem;
  opacity: 1;
  transform: translateX(0);
  transition: all 0.3s ease;
}

/* Show navigation menu when active (for mobile) */
.top-right-buttons.show {
  display: flex;
  opacity: 1;
  transform: translateX(0);
}

.top-right-buttons .icon {
  width: 48px;
  height: 48px;
  background: var(--secondary-color);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.3s ease;
}

.top-right-buttons .icon:hover {
  background: var(--secondary-hover-color);
}

#theme-toggle-button {
  margin-top: 0.5rem; /* adjust this value as needed */
}
#toggle-assistant-button {
  margin-top: 2rem; /* adjust this value as needed */
}
#toggle-version-button {
  margin-top: 2.2rem;
}
#toggle-devloper-button {
  margin-top: 2rem;
}

/* Hamburger Menu Styles - Hidden on desktop, visible on mobile */
.hamburger-menu {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: none; /* Hidden by default on desktop */
}

.hamburger-menu .icon {
  width: 48px;
  height: 48px;
  background: var(--secondary-color);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.3s ease;
  cursor: pointer;
}

.hamburger-menu .icon:hover {
  background: var(--secondary-hover-color);
}






#image-upload-button {
  background: var(--secondary-color);
  cursor: pointer;
  color: var(--text-color);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: background 0.3s ease;
}

#image-upload-button:hover {
  background: var(--secondary-hover-color);
}








/* === FILE UPLOAD WRAPPER STYLES (FOR .typing-form) === */
.typing-form .file-upload-wrapper {
  position: relative;
  height: 56px;
  width: 56px;
}

.typing-form .file-upload-wrapper :where(button, img) {
  display: none;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
}

.typing-form .file-upload-wrapper.active #add-file-btn {
  display: none;
}

.typing-form .file-upload-wrapper #add-file-btn,
.typing-form .file-upload-wrapper.active.img-attached img,
.typing-form .file-upload-wrapper.active.file-attached .file-icon,
.typing-form .file-upload-wrapper.active:hover #cancel-file-btn {
  display: block;
}

.typing-form :is(#cancel-file-btn) {
  color: #d62939;
}

.typing-form .file-icon {
  color: #1d7efd;
}

.typing-form .file-preview {
  height: 56px;
  width: 56px;
  border-radius: 50%;
  object-fit: cover;
}






.typing-form #stop-response-btn {
  position: absolute;
  right: 0;
  outline: none;
  border: none;
  background: transparent;
  display: none; /* Hide it by default */
  transform: scale(1); /* Ensure it's the same size */
}

/* Prompt Enhancer Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--primary-color);
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--secondary-color);
}

.modal-header h2 {
  color: var(--text-color);
  margin: 0;
  font-size: 1.5rem;
}

.close-modal {
  color: var(--text-color);
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: #ff4757;
}

.modal-body {
  padding: 1.5rem;
}

.prompt-section {
  margin-bottom: 1.5rem;
}

.prompt-section label {
  display: block;
  color: var(--text-color);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.prompt-section textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--secondary-color);
  border-radius: 8px;
  background: var(--secondary-color);
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.prompt-section textarea:focus {
  outline: none;
  border-color: #4285f4;
}

.prompt-section textarea::placeholder {
  color: var(--placeholder-color);
}

.enhance-controls {
  text-align: center;
  margin: 1.5rem 0;
}

.enhance-btn {
  background: linear-gradient(135deg, #4285f4, #34a853);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.enhance-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

.enhance-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.prompt-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.use-btn, .copy-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.use-btn {
  background: #34a853;
  color: white;
}

.use-btn:hover {
  background: #2d8f47;
}

.copy-btn {
  background: var(--secondary-color);
  color: var(--text-color);
  border: 1px solid var(--secondary-hover-color);
}

.copy-btn:hover {
  background: var(--secondary-hover-color);
}

.loading-indicator {
  text-align: center;
  padding: 2rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--secondary-color);
  border-top: 4px solid #4285f4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.loading-indicator p {
  color: var(--text-color);
  margin: 0;
}

/* Mobile responsiveness for modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  .modal-header, .modal-body {
    padding: 1rem;
  }
  
  .prompt-actions {
    flex-direction: column;
  }
}

/* ===== SIDEBAR NAVIGATION STYLES ===== */

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10002;
  background: var(--secondary-color);
  color: var(--text-color);
  border: none;
  border-radius: 8px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-toggle-btn:hover {
  background: var(--secondary-hover-color);
  transform: scale(1.05);
}

/* Sidebar Container */
.sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100vh;
  background: var(--primary-color);
  border-right: 1px solid var(--secondary-color);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transition: left 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.open {
  left: 0;
}

/* Sidebar Header */
.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--secondary-color);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sidebar-logo .icon {
  font-size: 2rem;
  color: #4285f4;
}

.sidebar-logo h2 {
  color: var(--text-color);
  font-size: 1.5rem;
  margin: 0;
  font-weight: 600;
}

.new-chat-btn {
  width: 100%;
  background: linear-gradient(135deg, #4285f4, #34a853);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.new-chat-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

/* Sidebar Content */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--secondary-color) transparent;
}

.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 3px;
}

/* Search Section */
.sidebar-search {
  margin-bottom: 1.5rem;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper .icon {
  position: absolute;
  left: 0.75rem;
  color: var(--placeholder-color);
  font-size: 1.2rem;
}

#chat-search {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  background: var(--secondary-color);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-color);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

#chat-search:focus {
  outline: none;
  border-color: #4285f4;
  background: var(--primary-color);
}

#chat-search::placeholder {
  color: var(--placeholder-color);
}

/* Navigation Items */
.sidebar-nav {
  margin-bottom: 1.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.nav-item:hover {
  background: var(--secondary-color);
}

.nav-item .icon {
  font-size: 1.2rem;
  color: var(--placeholder-color);
}

/* Chat List Section */
.chat-list-section {
  flex: 1;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h3 {
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.folder-btn {
  background: none;
  border: none;
  color: var(--placeholder-color);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.folder-btn:hover {
  background: var(--secondary-color);
  color: var(--text-color);
}

/* Folder Items */
.folder-item {
  margin-bottom: 0.5rem;
}

.folder-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.folder-header:hover {
  background: var(--secondary-color);
}

.folder-icon {
  color: #f39c12;
  font-size: 1.1rem;
}

.folder-name {
  flex: 1;
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
}

.folder-toggle {
  background: none;
  border: none;
  color: var(--placeholder-color);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.folder-toggle:hover {
  background: var(--secondary-hover-color);
}

.folder-chats {
  margin-left: 1.5rem;
  margin-top: 0.25rem;
}

/* Chat Items */
.chat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 0.25rem;
  position: relative;
}

.chat-item:hover {
  background: var(--secondary-color);
}

.chat-item.active {
  background: var(--secondary-color);
  border-left: 3px solid #4285f4;
}

.chat-content {
  flex: 1;
  min-width: 0;
}

.chat-title {
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.chat-timestamp {
  color: var(--placeholder-color);
  font-size: 0.75rem;
}

.chat-menu {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chat-item:hover .chat-menu {
  opacity: 1;
}

.menu-btn {
  background: none;
  border: none;
  color: var(--placeholder-color);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.menu-btn:hover {
  background: var(--secondary-hover-color);
  color: var(--text-color);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--secondary-color);
  flex-shrink: 0;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.footer-item:hover {
  background: var(--secondary-color);
}

.footer-item .icon {
  font-size: 1.2rem;
  color: var(--placeholder-color);
}

/* User Profile */
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  position: relative;
}

.user-profile:hover {
  background-color: var(--secondary-hover-color);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.user-avatar .icon {
  font-size: 18px;
  color: white;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status {
  font-size: 12px;
  color: var(--placeholder-color);
  margin-top: 2px;
}

/* Avatar Edit Button */
.avatar-edit-btn {
  background: none;
  border: none;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  color: var(--placeholder-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  right: 0;
}

.user-profile:hover .avatar-edit-btn {
  opacity: 1;
}

.avatar-edit-btn:hover {
  background-color: var(--secondary-hover-color);
  color: var(--text-color);
}

.avatar-edit-btn .icon {
  font-size: 16px;
}

/* Avatar Context Menu */
.avatar-context-menu {
  background: var(--secondary-color);
  border: 1px solid var(--placeholder-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 4px 0;
  min-width: 160px;
  z-index: 10000;
}

.avatar-context-menu .context-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: var(--text-color);
  font-size: 14px;
}

.avatar-context-menu .context-item:hover {
  background-color: var(--secondary-hover-color);
}

.avatar-context-menu .context-item .icon {
  font-size: 16px;
  color: var(--placeholder-color);
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Context Menu */
.context-menu {
  position: fixed;
  background: var(--primary-color);
  border: 1px solid var(--secondary-color);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10003;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: all 0.2s ease;
}

.context-menu.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.context-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-color);
}

.context-item:hover {
  background: var(--secondary-color);
}

.context-item .icon {
  font-size: 1.1rem;
  color: var(--placeholder-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    width: 280px;
  }
  
  .sidebar-toggle-btn {
    display: none; /* Hide on mobile, use hamburger menu instead */
  }
}

/* Main Content Adjustment */
.main-content {
  transition: margin-left 0.3s ease;
}

.main-content.sidebar-open {
  margin-left: 320px;
}

@media (max-width: 768px) {
  .main-content.sidebar-open {
    margin-left: 0;
  }
}