/* 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;
}

body.hide-header .chat-marquee {
  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 {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5vh;
  height: 220px;
  /* Space for the fanned out cards */
  width: 100%;
  perspective: 1000px;
}

.suggestion-list .suggestion {
  position: relative;
  width: 190px;
  height: 240px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 16px;
  margin: 0 -45px;
  /* Overlap */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: rotate(calc(var(--r) * 1deg)) translateY(0);
  cursor: pointer;
  padding: 1.5rem;
  z-index: 1;
}

/* Hover Effect: Fan Out */
.suggestion-list:hover .suggestion {
  transform: rotate(0deg) translateY(-10px);
  margin: 0 15px;
  /* Spread out */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  z-index: 2;
  /* Bring to front */
}

/* Hover on individual card */
.suggestion-list .suggestion:hover {
  transform: scale(1.05) translateY(-15px);
  z-index: 10;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-color: var(--accent-light);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.suggestion-list .suggestion .icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.05);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.3);
  transition: 0.3s;
}

.suggestion-list .suggestion:hover .icon {
  background: var(--accent-color);
  color: white;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.suggestion-list .suggestion .text {
  font-size: 0.9rem;
  color: var(--text-color);
  text-align: center;
  line-height: 1.5;
  font-weight: 400;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.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: #2a352d;
  /* 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);
}

/* Send button visibility now controlled by JavaScript classes - see end of file */

.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;
  }

  /* Old conflicting mobile nav styles removed - see end of file for proper mobile styles */
}






/*background*/

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

/* Main Body Styling */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #000;
  /* Base black background */
  overflow-x: hidden;
  overflow-y: auto;
  /* Allows vertical scrolling */
}

/* 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, #37474f, #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 */
}










/* Old suggestion icon color rule removed */


.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 */
}

/* --- Model Selector Dropdown Styles (Ported from multi.css) --- */

.model-selector-custom {
  min-width: 140px;
  position: relative;
  /* Anchor for dropdown */
  display: inline-block;
  /* Ensure it flows correctly in header */
}

.selector-button {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  /* Slightly larger radius */
  gap: 0.5rem;
  color: var(--text-color);
  font-size: 0.95rem;
  /* Slightly larger font */
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Subtle border for visibility */
}

.selector-button:hover {
  background: var(--secondary-hover-color);
  border-color: rgba(255, 255, 255, 0.2);
}

.selector-button .selected-icon {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

.selector-button .dropdown-arrow {
  font-size: 1.2rem;
  color: var(--subheading-color);
  margin-left: auto;
  /* Push arrow to right if fixed width */
}

/* Dropdown Menu */
.selector-dropdown {
  position: absolute;
  /* Hardcoded dark for contrast, or use var(--primary-color) but differentiate */
  background: var(--primary-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  left: 0;
  top: 110%;
  /* Spacing */
  width: 260px;
  /* Slightly wider */
  display: none;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 6px;
  max-height: 400px;
  overflow-y: auto;
}

/* Specific fix for Index Page (Bottom Bar) - Open Upwards */
#header-model-selector .selector-dropdown {
  top: auto;
  bottom: 120%;
  /* Open upwards with some spacing */
}

/* Rotate arrow for Index Page (since it opens upwards) */
#header-model-selector .dropdown-arrow {
  transform: rotate(180deg);
}

/* Light mode overrides for dropdown */
body.light_mode .selector-dropdown {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.model-selector-custom.open .selector-dropdown {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-option {
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--text-color);
  transition: background 0.15s;
  margin-bottom: 2px;
}

.dropdown-option:hover {
  background: var(--secondary-hover-color);
}

.dropdown-option.selected {
  background: rgba(66, 133, 244, 0.15);
  color: #4285f4;
}

body.light_mode .dropdown-option.selected {
  background: rgba(66, 133, 244, 0.1);
}

.dropdown-option .icon {
  font-size: 1.2rem;
  display: flex;
  /* Fix icon alignment */
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent !important;
  /* Override typical icon styles if any */
  color: inherit;
  box-shadow: none !important;
  margin: 0 !important;
}

.dropdown-option .option-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
}

.dropdown-option .check-icon {
  font-size: 1.1rem;
  opacity: 0;
  color: #4285f4;
}

.dropdown-option.selected .check-icon {
  opacity: 1;
}

/* Icon Colors */
.gemini-icon-color {
  color: #4285f4;
}

.llama-icon {
  color: #ff7b54;
}

.qwen-icon {
  color: #6ee7b7;
}

.deepseek-icon {
  color: #a78bfa;
}

/* SVG Icon alignment */
.gemini-icon {
  display: block;
}

/* Model Tags Styles */
.option-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.option-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.model-tag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 8px;
  font-size: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.3;
}

/* Light mode tag adjustments */
body.light_mode .model-tag {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Hugging Face icon color */
.huggingface-icon {
  color: #ffcc00;
}


#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;
}






/* Stop button visibility now controlled by JavaScript classes - see end of file */

/* 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 !important;
  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: 1rem 1.25rem;
  border-bottom: 1px solid var(--secondary-color);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Changed from space-between to center */
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  /* Center content within logo container */
  width: 100%;
  /* Take full width to ensure true centering */
}

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

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

/* Sidebar Close Button */
.sidebar-close-btn {
  background: transparent;
  border: none;
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

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

/* New Chat Section */
.sidebar-new-chat {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--secondary-color);
}

.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;
  justify-content: 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);
}

/* Quick Actions Grid */
/* Quick Actions Grid (Now Scrollable) */
.sidebar-quick-actions {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--secondary-color);
  /* Hide scrollbar for typical browsers but keep functionality */
  scrollbar-width: thin;
  scrollbar-color: var(--secondary-hover-color) transparent;
  padding-bottom: 0.75rem;
  /* Space for scrollbar */
}

.sidebar-quick-actions::-webkit-scrollbar {
  height: 4px;
}

.sidebar-quick-actions::-webkit-scrollbar-thumb {
  background-color: var(--secondary-hover-color);
  border-radius: 4px;
}

.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--secondary-color);
  flex-shrink: 0;
  /* Prevent squishing */
  min-width: 70px;
}

.quick-action-item:hover {
  background: var(--secondary-hover-color);
  transform: translateY(-2px);
}

.quick-action-item .icon {
  font-size: 1.4rem;
  color: var(--text-color);
}

.quick-action-item span:last-child {
  font-size: 0.65rem;
  color: var(--subheading-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 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: #000000;
  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;
}

/* Profile Actions (Edit, Settings, Logout) */
.profile-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.profile-action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-color);
}

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

.profile-action-btn .icon {
  font-size: 1.1rem;
  color: var(--placeholder-color);
}

.profile-action-btn:hover .icon {
  color: var(--text-color);
}

/* 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;
  }
}

/* ============================================
   LIBRARY & PROJECTS FEATURE STYLES
   ============================================ */

/* Nav Item with Expand Icon */
.nav-item {
  cursor: pointer;
}

.nav-item .expand-icon {
  margin-left: auto;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.nav-item.expanded .expand-icon {
  transform: rotate(180deg);
}

/* Nav Section (Expandable Content) */
.nav-section {
  padding: 0 0.5rem 0.5rem 0.5rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--placeholder-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-section .add-btn {
  background: transparent;
  border: none;
  color: var(--placeholder-color);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.nav-section .add-btn:hover {
  background: var(--secondary-color);
  color: #4CAF50;
}

.nav-section .add-btn .icon {
  font-size: 1.1rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 1.5rem 0.5rem;
  color: var(--placeholder-color);
}

.empty-state .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.empty-state p {
  font-size: 0.8rem;
}

/* Reset inner containers */
.chats-container {
  max-height: none !important;
  overflow: visible !important;
}

/* =========================================
   ANIMATED SIDEBAR TOGGLE ICON
   ========================================= */

.sidebar-toggle-wrapper {
  z-index: 10002;
  /* Higher than sidebar */
  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-wrapper:hover {
  transform: scale(1.05);
}

.icon-menu {
  --gap: 5px;
  --height-bar: 2.5px;
  --pos-y-bar-one: 0;
  --pos-y-bar-three: 0;
  --scale-bar: 1;
  --rotate-bar-one: 0;
  --rotate-bar-three: 0;
  width: 25px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  cursor: pointer;
  position: relative;
}

.bar {
  position: relative;
  height: var(--height-bar);
  width: 100%;
  border-radius: .5rem;
  background-color: var(--text-color);
  /* Changed to var(--text-color) for theme adaptation */
}

.bar--1 {
  top: var(--pos-y-bar-one);
  transform: rotate(var(--rotate-bar-one));
  transition: top 200ms 100ms, transform 100ms;
}

.bar--2 {
  transform: scaleX(var(--scale-bar));
  transition: transform 150ms 100ms;
}

.bar--3 {
  bottom: var(--pos-y-bar-three);
  transform: rotate(var(--rotate-bar-three));
  transition: bottom 200ms 100ms, transform 100ms;
}

.check-icon:checked+.icon-menu>.bar--1 {
  transition: top 200ms, transform 200ms 100ms;
}

.check-icon:checked+.icon-menu>.bar--3 {
  transition: bottom 200ms, transform 200ms 100ms;
}

.check-icon:checked+.icon-menu {
  --pos-y-bar-one: calc(var(--gap) + var(--height-bar));
  --pos-y-bar-three: calc(var(--gap) + var(--height-bar));
  --scale-bar: 0;
  --rotate-bar-one: 45deg;
  --rotate-bar-three: -45deg;
}

/* =========================================
   PROFILE EDIT MODAL
   ========================================= */

.profile-edit-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 0;
}

.current-avatar-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.current-avatar-preview img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--surface-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border-color);
}

.avatar-placeholder .icon {
  font-size: 3rem;
  color: var(--text-secondary);
}

.secondary-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-group input {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: 8px;
  color: var(--text-color);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.cancel-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.cancel-btn:hover {
  text-decoration: underline;
  color: var(--text-color);
}

.save-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  border: none;
  background: var(--accent-color);
  color: white;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: transform 0.1s;
}

.save-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* Prompts Container */
.prompts-container {
  max-height: 200px;
  overflow-y: auto;
}

/* Prompt Item */
.prompt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  margin: 0.25rem 0;
  background: var(--secondary-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.prompt-item .prompt-name {
  font-size: 0.85rem;
  color: var(--text-color);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prompt-item .prompt-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.prompt-item:hover .prompt-actions {
  opacity: 1;
}

.prompt-item .prompt-actions button {
  background: transparent;
  border: none;
  color: var(--placeholder-color);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
}

.prompt-item .prompt-actions button:hover {
  color: #ff4444;
}

/* Projects Container */
.projects-container {
  max-height: 200px;
  overflow-y: auto;
}

/* Project Item */
.project-item {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.75rem;
  margin: 0.25rem 0;
  background: var(--secondary-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 0.5rem;
}

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

.project-item .project-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.project-item .project-name {
  font-size: 0.85rem;
  color: var(--text-color);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-item .project-count {
  font-size: 0.7rem;
  color: var(--placeholder-color);
  background: var(--primary-color);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.project-item .project-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.project-item:hover .project-actions {
  opacity: 1;
}

.project-item .project-actions button {
  background: transparent;
  border: none;
  color: var(--placeholder-color);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
}

.project-item .project-actions button:hover {
  color: #ff4444;
}

/* Small Modal */
.small-modal {
  max-width: 400px;
}

/* Form Group in Modals */
.modal .form-group {
  margin-bottom: 1rem;
}

.modal .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-color);
}

.modal .form-group input,
.modal .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--secondary-color);
  border-radius: 8px;
  background: var(--secondary-color);
  color: var(--text-color);
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.modal .form-group input:focus,
.modal .form-group textarea:focus {
  outline: none;
  border-color: #4CAF50;
}

/* Color Options */
.color-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 3px solid transparent;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: var(--text-color);
  box-shadow: 0 0 0 2px var(--primary-color), 0 0 0 4px var(--text-color);
}

/* Modal Actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40);
  transform: translateY(-1px);
}

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

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

/* Projects List in Move Modal */
.projects-list {
  max-height: 300px;
  overflow-y: auto;
}

.projects-list .project-item {
  margin: 0.5rem 0;
}

.projects-list .project-item:hover {
  background: #4CAF50;
  color: white;
}

.projects-list .project-item:hover .project-name {
  color: white;
}

/* Project Wrapper and Expandable Chats */
.project-wrapper {
  margin: 0.25rem 0;
}

.project-expand {
  font-size: 1rem;
  color: var(--placeholder-color);
  transition: transform 0.2s ease;
  margin-left: auto;
}

.project-chats {
  padding-left: 1.5rem;
  margin-top: 0.25rem;
  animation: slideDown 0.2s ease;
}

.project-chats .chat-item.in-project {
  padding: 0.5rem 0.75rem;
  margin: 0.15rem 0;
  background: var(--primary-color);
  border-radius: 6px;
  border-left: 2px solid var(--placeholder-color);
}

.project-chats .chat-item.in-project:hover {
  background: var(--secondary-color);
  border-left-color: #4CAF50;
}

.project-chats .chat-item.in-project .chat-title {
  font-size: 0.8rem;
  color: var(--text-color);
}

.project-chats .empty-state.small {
  padding: 0.75rem;
}

.project-chats .empty-state.small p {
  font-size: 0.75rem;
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablets and smaller */
@media (max-width: 768px) {

  /* Header */
  .header {
    margin-top: 3vh;
    padding: 0.5rem 1rem;
  }

  .header .title {
    font-size: 2rem;
    line-height: 2.5rem;
  }

  .header .subtitle {
    font-size: 1.4rem;
    line-height: 2rem;
  }

  /* Suggestions */
  /* Responsive adjustments for Laptop */
  .suggestion-list {
    margin-top: 3vh;
    height: 200px;
  }

  .suggestion-list .suggestion {
    width: 160px;
    height: 200px;
    margin: 0 -35px;
    padding: 1rem;
  }

  .suggestion-list:hover .suggestion {
    margin: 0 10px;
  }

  .suggestion-list .suggestion .text {
    font-size: 0.8rem;
  }

  .suggestion-list .suggestion .icon {
    width: 45px;
    height: 45px;
    font-size: 1.8rem;
  }

  /* Modals */
  .modal-content {
    width: 92%;
    margin: 8% auto;
    padding: 1.25rem;
  }

  .small-modal {
    max-width: 92%;
  }

  /* Sidebar */
  .sidebar {
    width: 300px;
  }

  /* Chat messages */
  .chat-list {
    padding: 1.5rem 0.75rem 12rem;
  }

  .chat-list .message .avatar {
    width: 36px;
    height: 36px;
  }
}

/* Mobile phones - Main breakpoint */
@media (max-width: 480px) {

  /* ========== HEADER ========== */
  .header {
    margin-top: 10px;
    padding: 0.5rem;
    text-align: center;
  }

  .header .title {
    font-size: 1.5rem;
    line-height: 1.8rem;
  }

  .header .subtitle {
    font-size: 1rem;
    line-height: 1.4rem;
  }

  /* ========== SUGGESTION CARDS ========== */
  .suggestion-list {
    margin-top: 2vh;
    gap: 0.5rem;
    padding: 0 0.25rem;
    scroll-padding: 0.25rem;
  }

  .suggestion-list .suggestion {
    width: 140px;
    padding: 0.75rem;
    min-height: 90px;
    border-radius: 10px;
  }

  .suggestion-list .suggestion .text {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  .suggestion-list .suggestion .icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    margin-top: 0.75rem;
  }

  /* ========== TYPING/INPUT AREA ========== */
  .typing-area {
    padding: 0.5rem;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
  }

  .typing-form {
    gap: 0.4rem;
  }

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

  .typing-form .typing-input {
    font-size: 0.85rem;
    padding: 0.7rem 2.8rem 0.7rem 0.9rem;
  }

  .typing-form .typing-input::placeholder {
    font-size: 0.8rem;
  }

  .typing-area .icon {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .typing-form .typing-actions {
    gap: 0.3rem;
  }

  /* File upload wrapper */
  .typing-form .file-upload-wrapper {
    height: 42px;
    width: 42px;
  }

  /* Ensure prompt enhancer and delete buttons are visible on small screens */
  #prompt-enhancer-button,
  #delete-chat-button {
    display: flex !important;
  }

  /* ========== FOOTER/DISCLAIMER ========== */
  .typing-area .disclaimer-text {
    font-size: 0.6rem;
    margin-top: 0.25rem;
    padding: 0 0.5rem;
  }

  .typing-area .disclaimer-text a {
    font-size: 0.6rem;
  }

  /* ========== CHAT MESSAGES ========== */
  .chat-list {
    padding: 1rem 0.5rem 10rem;
  }

  .chat-list .message {
    padding: 0.75rem 0;
  }

  .chat-list .message .message-content {
    gap: 0.6rem;
  }

  .chat-list .message .avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
  }

  .chat-list .message .text {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .chat-list .message .icon {
    height: 26px;
    width: 26px;
    font-size: 0.95rem;
  }

  .chat-list .message .icon:first-of-type {
    margin-left: 2.4rem;
  }

  /* ========== TOP RIGHT NAVIGATION ========== */
  .top-right-buttons {
    top: 0.5rem;
    right: 0.5rem;
    gap: 0.4rem;
  }

  .top-right-buttons .icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  /* Hide some nav buttons on mobile - show only essential */
  #toggle-version-button,
  #toggle-devloper-button {
    display: none;
  }

  /* Hamburger menu */
  .hamburger-menu {
    top: 0.5rem;
    left: 0.5rem;
  }

  .hamburger-menu .icon {
    font-size: 1.5rem;
  }

  /* ========== SIDEBAR ========== */
  .sidebar {
    width: 85vw;
    max-width: 320px;
  }

  .sidebar-header {
    padding: 0.75rem;
  }

  .new-chat-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .search-bar input {
    height: 40px;
    font-size: 0.85rem;
  }

  .nav-item {
    padding: 0.7rem 0.75rem;
    font-size: 0.9rem;
    min-height: 44px;
    /* Minimum touch target */
  }

  .chat-item {
    padding: 0.6rem 0.75rem;
    min-height: 50px;
    /* Touch target */
  }

  .chat-item .chat-title {
    font-size: 0.85rem;
  }

  .chat-item .chat-timestamp {
    font-size: 0.65rem;
  }

  /* User profile in sidebar */
  .sidebar-footer {
    padding: 0.75rem;
  }

  .user-profile {
    padding: 0.6rem;
  }

  .user-profile .user-avatar {
    width: 36px;
    height: 36px;
  }

  .user-profile .user-name {
    font-size: 0.85rem;
  }

  .user-profile .user-status {
    font-size: 0.7rem;
  }

  /* ========== MODALS ========== */
  .modal-content {
    width: 95%;
    max-width: none;
    margin: 3% auto;
    padding: 1rem;
    border-radius: 12px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-header {
    padding-bottom: 0.75rem;
  }

  .modal-header h2 {
    font-size: 1.1rem;
  }

  .modal-header .close-modal {
    font-size: 1.5rem;
    padding: 0.25rem;
  }

  .modal .form-group {
    margin-bottom: 0.75rem;
  }

  .modal .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
  }

  .modal .form-group input,
  .modal .form-group textarea {
    padding: 0.65rem;
    font-size: 0.9rem;
  }

  .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 0.85rem;
    font-size: 0.9rem;
  }

  /* Color options */
  .color-options {
    justify-content: center;
    gap: 0.6rem;
  }

  .color-option {
    width: 34px;
    height: 34px;
  }

  /* ========== PROMPT ENHANCER MODAL ========== */
  .prompt-section textarea {
    font-size: 0.85rem;
    padding: 0.6rem;
  }

  .enhance-btn {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }

  .prompt-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .prompt-actions button {
    width: 100%;
  }

  /* ========== PROJECTS & LIBRARY ========== */
  .project-item,
  .prompt-item {
    padding: 0.65rem 0.75rem;
    min-height: 44px;
  }

  .project-item .project-name,
  .prompt-item .prompt-name {
    font-size: 0.85rem;
  }

  .project-chats .chat-item.in-project {
    padding: 0.5rem 0.6rem;
  }

  .project-chats .chat-item.in-project .chat-title {
    font-size: 0.75rem;
  }

  /* Projects list in move modal */
  .projects-list .project-item {
    padding: 0.85rem;
  }

  /* ========== CONTEXT MENU ========== */
  .context-menu {
    min-width: 160px;
  }

  .context-item {
    padding: 0.7rem 0.85rem;
    font-size: 0.85rem;
  }

  /* ========== OVERLAY ========== */
  .sidebar-overlay {
    background: rgba(0, 0, 0, 0.6);
  }
}

/* Extra small phones (iPhone SE, older devices) */
@media (max-width: 375px) {
  .header .title {
    font-size: 1.3rem;
    line-height: 1.6rem;
  }

  .header .subtitle {
    font-size: 0.9rem;
    line-height: 1.3rem;
  }

  /* Responsive adjustments for Tablet */
  .suggestion-list {
    height: 180px;
  }

  .suggestion-list .suggestion {
    width: 140px;
    height: 180px;
    margin: 0 -30px;
    padding: 0.8rem;
  }

  .suggestion-list:hover .suggestion {
    margin: 0 5px;
  }

  .suggestion-list .suggestion .text {
    font-size: 0.75rem;
  }

  .suggestion-list .suggestion .icon {
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

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

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

  .typing-form .typing-input {
    font-size: 0.8rem;
    padding: 0.6rem 2.5rem 0.6rem 0.75rem;
  }

  .chat-list .message .avatar {
    width: 26px;
    height: 26px;
    min-width: 26px;
  }

  .chat-list .message .text {
    font-size: 0.8rem;
  }

  .sidebar {
    width: 100vw;
  }

  .top-right-buttons .icon {
    width: 34px;
    height: 34px;
  }


}

/* Very small phones (320px and below) */
@media (max-width: 320px) {
  .header .title {
    font-size: 1.15rem;
  }

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

  .suggestion-list .suggestion {
    width: 110px;
    padding: 0.5rem;
  }

  .suggestion-list .suggestion .text {
    font-size: 0.6rem;
  }

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

  .modal-content {
    padding: 0.75rem;
  }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .header {
    margin-top: 5px;
  }

  .header .title {
    font-size: 1.3rem;
    line-height: 1.5rem;
  }

  .header .subtitle {
    font-size: 0.9rem;
    line-height: 1.2rem;
  }

  .suggestion-list {
    margin-top: 1vh;
  }

  .suggestion-list .suggestion {
    min-height: 70px;
    padding: 0.5rem;
  }

  .chat-list {
    padding-bottom: 8rem;
  }

  .modal-content {
    max-height: 85vh;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

  /* Increase touch targets */
  .nav-item,
  .chat-item,
  .project-item,
  .prompt-item {
    min-height: 48px;
  }

  /* Remove hover effects that don't work on touch */
  .suggestion-list .suggestion:hover {
    background: var(--secondary-color);
  }

  /* Better tap feedback */
  .suggestion-list .suggestion:active,
  .nav-item:active,
  .chat-item:active {
    background: var(--secondary-hover-color);
    transform: scale(0.98);
  }

  /* Ensure scrolling is smooth */
  .chat-list,
  .suggestion-list,
  .sidebar-content {
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================
   CRITICAL BASE STYLES FOR MOBILE
   ============================================ */

/* Hamburger Menu Base Styles */
.hamburger-menu {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  cursor: pointer;
}

.hamburger-menu .icon {
  font-size: 1.8rem;
  color: var(--text-color);
  background: var(--secondary-color);
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Top Right Buttons Base Styles */
.top-right-buttons {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 100;
}

.top-right-buttons .icon {
  width: 45px;
  height: 45px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--secondary-color);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* Main Content Wrapper */
.main-content {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   GEMINI-STYLE MOBILE IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {

  /* Show hamburger on mobile */
  .hamburger-menu {
    display: block;
  }

  /* Top buttons - horizontal row on mobile */
  .top-right-buttons {
    flex-direction: row;
    top: 0.75rem;
    right: 0.75rem;
    gap: 0.4rem;
  }

  .top-right-buttons .icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {

  /* ========== HAMBURGER MENU ========== */
  .hamburger-menu {
    top: 0.5rem;
    left: 0.5rem;
  }

  .hamburger-menu .icon {
    font-size: 1.5rem;
    padding: 0.4rem;
    width: 40px;
    height: 40px;
  }

  /* ========== TOP RIGHT BUTTONS ========== */
  .top-right-buttons {
    top: 0.5rem;
    right: 0.5rem;
    gap: 0.3rem;
  }

  .top-right-buttons .icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  /* Hide less important buttons on mobile */
  #toggle-version-button,
  #toggle-devloper-button,
  #toggle-assistant-button {
    display: none !important;
  }

  /* ========== MAIN CONTENT ========== */
  .main-content {
    padding-top: 50px;
    /* Space for hamburger */
  }

  /* ========== HEADER - GEMINI STYLE ========== */
  .header {
    margin-top: 0;
    padding: 1rem;
    text-align: left;
  }

  .header .title {
    font-size: 1.4rem;
    line-height: 1.6rem;
  }

  .header .subtitle {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 500;
  }

  /* ========== GEMINI-STYLE PROMPT CHIPS (SCROLLABLE) ========== */
  .suggestion-list {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 0.5rem 1rem;
    /* Add side padding for better scrolling visual */
    overflow-x: auto;
    flex-wrap: nowrap;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox */
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right, black 90%, transparent 100%);
    /* Fade out effect */
  }

  .suggestion-list::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
  }

  .suggestion-list .suggestion {
    width: auto;
    min-width: 260px;
    /* Wider chips like reference */
    padding: 1rem;
    flex-shrink: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--secondary-color);
    background: var(--secondary-color);
    /* Slight bg for visibility */
    scroll-snap-align: center;
  }

  /* Mobile Portrait: Hide fan effect, revert to scroll/stack or simplified fan */
  .suggestion-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 1rem;
    margin-top: 2vh;
    height: auto;
    gap: 15px;
  }

  .suggestion-list .suggestion {
    transform: none !important;
    /* Disable rotation */
    margin: 0 !important;
    width: 160px;
    height: 180px;
    flex-shrink: 0;
  }

  .suggestion-list:hover .suggestion {
    transform: none !important;
    margin: 0 !important;
  }

  .suggestion-list .suggestion:hover {
    transform: scale(1.02);
  }

  .suggestion-list .suggestion .text {
    font-size: 0.85rem;
    order: 1;
    /* Reset order to normal flow */
  }

  .suggestion-list .suggestion .icon {
    margin-bottom: 0.8rem;
    order: 0;
  }

  /* ========== TYPING AREA - GEMINI STYLE ========== */
  .typing-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
    background: var(--primary-color);
    z-index: 100;
    border-top: 1px solid var(--secondary-color);
  }

  .typing-form {
    flex-direction: column;
    gap: 0.5rem;
  }

  .typing-form .input-wrapper {
    width: 100%;
    height: 45px;
    border-radius: 25px;
    background: var(--secondary-color);
    order: 1;
  }

  .typing-form .typing-input {
    font-size: 0.9rem;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border-radius: 25px;
  }

  .typing-form .typing-actions {
    order: 2;
    justify-content: flex-start;
    gap: 0.25rem;
  }

  .typing-area .icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  /* Hide file upload, enhancer, delete on very small screens */
  /* Hide file upload, enhancer, delete on very small screens */
  .file-upload-wrapper {
    display: none !important;
  }

  /* ========== FOOTER ========== */
  .typing-area .disclaimer-text {
    font-size: 0.55rem;
    margin-top: 0.25rem;
    text-align: center;
  }

  /* ========== CHAT LIST ========== */
  .chat-list {
    padding: 0.75rem 0.5rem;
    padding-bottom: 120px;
    /* Space for typing area */
    max-height: calc(100vh - 120px);
  }

  .chat-list .message {
    padding: 0.5rem 0;
  }

  .chat-list .message .avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }

  .chat-list .message .text {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .chat-list .message .icon {
    width: 24px;
    height: 24px;
    font-size: 0.9rem;
  }

  /* ========== SIDEBAR ========== */
  .sidebar {
    width: 100vw;
    height: 100vh;
    max-width: none;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    background: rgba(0, 0, 0, 0.7);
  }

  /* ========== BACKGROUND FIX ========== */
  section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
  }

  /* Make sure body allows scrolling */
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* ========== MODALS ========== */
  .modal-content {
    width: 95vw;
    max-width: none;
    margin: 5% auto;
    max-height: 85vh;
    overflow-y: auto;
  }
}

/* Extra small phones */
@media (max-width: 375px) {
  .header .title {
    font-size: 1.2rem;
  }

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

  .suggestion-list .suggestion {
    padding: 1rem;
  }

  .suggestion-list .suggestion .text {
    font-size: 0.8rem;
  }

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

  .chat-list .message .avatar {
    width: 24px;
    height: 24px;
    min-width: 24px;
  }

  .chat-list .message .text {
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   FINAL GLOBAL & MOBILE FIXES
   ========================================================================== */

/* 1. Background Fix - Ensure it stays fixed and covers screen */
section {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* 2. Body Scroll Fix */
body {
  position: relative;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   MOBILE RESPONSIVE STYLES
   ========================================================================== */

/* Mobile Header - Same as Desktop Toggle Button Style */
@media (max-width: 768px) {

  /* Mobile Header Bar */
  .mobile-header {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--primary-color);
    border-bottom: 1px solid var(--secondary-color);
    z-index: 9999;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
  }

  .mobile-header-left,
  .mobile-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-header-left .icon,
  .mobile-header-right .icon {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-color);
    cursor: pointer;
    background: transparent;
    transition: background 0.2s;
  }

  .mobile-header-left .icon:active,
  .mobile-header-right .icon:active {
    background: var(--secondary-color);
  }

  .mobile-header-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-header-center .app-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
  }

  /* Hide desktop toggle button on mobile */
  .sidebar-toggle-btn {
    display: none !important;
  }

  /* Sidebar - Full screen on mobile */
  .sidebar {
    width: 85vw;
    max-width: 320px;
    left: -100%;
    z-index: 10001;
  }

  .sidebar.open {
    left: 0;
  }

  /* Sidebar Overlay */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
  }

  .sidebar-overlay.active {
    display: block;
  }

  /* Main content padding for mobile header */
  .container {
    padding-top: 60px !important;
  }

  .header {
    padding-top: 1rem !important;
    margin-top: 0 !important;
  }
}

/* Desktop: Hide mobile header */
@media (min-width: 769px) {
  .mobile-header {
    display: none !important;
  }
}

/* Suggestion scrolling on small screens */
@media (max-width: 480px) {
  .suggestion-list {
    flex-direction: row !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
  }

  .suggestion-list .suggestion {
    flex-shrink: 0;
    min-width: 150px;
  }
}

/* Model Menu Styling */
.model-menu-container {
  position: relative;
  display: inline-block;
}

.model-dropdown {
  position: absolute;
  bottom: 155%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary-color);
  border-radius: 12px;
  padding: 8px;
  width: 280px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1000;
  margin-bottom: 12px;
  border: 1px solid var(--secondary-hover-color);
}

.model-dropdown.show {
  display: block;
  opacity: 1;
}

.model-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease;
  color: var(--text-color);
}

.model-option:hover {
  background: var(--secondary-hover-color);
}

.model-option.active {
  background: var(--secondary-hover-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.model-option .icon {
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  margin: 0 !important;
  font-size: 1.2rem !important;
  color: var(--text-color) !important;
}

.model-info {
  display: flex;
  flex-direction: column;
}

.model-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-color);
  white-space: nowrap;
}

/* Light Mode specific adjustments */
.light_mode .model-dropdown {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
}

.light_mode .model-option.active {
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
}

.light_mode .model-option:hover {
  background: #f5f5f5;
}

.light_mode .model-option .icon {
  color: #000 !important;
}

/* ================================================
   NEW AI-INPUT COMPONENT STYLES
   ================================================ */

.AI-Input {
  --ai-primary-color: var(--primary-color);
  --ai-neutral-color: var(--text-color);
  --ai-border-color: rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0 1rem 0;
  z-index: 50;
  user-select: none;
  pointer-events: none;
}

.AI-Input>* {
  pointer-events: all;
}

.AI-Input .chat-container,
.AI-Input .chat-marquee,
.AI-Input .disclaimer-text {
  max-width: 55rem;
  width: 100%;
}

.AI-Input .disclaimer-text {
  text-align: center;
  padding: 0.3rem 0;
  margin: 0;
  background: transparent;
  font-size: 0.7rem;
}

.chat-container .disclaimer-text {
  border-top: 1px solid var(--ai-border-color);
  padding-top: 0.4rem;
  margin-top: 0.3rem;
}

/* Hide file inputs */
#ai-camera,
#ai-photos,
#ai-files,
#voice-mode,
#ai-mic,
#appendix {
  display: none;
}

/* Voice Mode Buttons (hidden by default) */
.voice-close-btn,
.voice-mic-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: 6rem;
  padding: 1rem;
  background-color: var(--secondary-color);
  border-radius: 50%;
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
  transform: translateY(100%);
  transition: all 0.3s ease;
  color: var(--ai-neutral-color);
  border: 1px solid var(--ai-border-color);
}

.voice-close-btn {
  margin-right: 5rem;
}

.voice-mic-btn {
  margin-left: 5rem;
  width: 62px;
  aspect-ratio: 1/1;
}

.voice-mic-btn svg {
  position: absolute;
  transition: all 0.2s ease;
}

.voice-mic-btn svg:first-of-type {
  opacity: 1;
}

.voice-mic-btn svg:last-of-type {
  opacity: 0;
  fill: rgba(255, 100, 100, 0.7);
}

#ai-mic:checked+.voice-mic-btn {
  background-color: rgba(255, 100, 100, 0.2);
}

#ai-mic:checked+.voice-mic-btn>svg:first-child {
  opacity: 0;
}

#ai-mic:checked+.voice-mic-btn>svg:last-child {
  opacity: 1;
}

/* Voice Mode Active State */
#voice-mode:checked~.voice-close-btn,
#voice-mode:checked~.voice-mic-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

#voice-mode:checked~.chat-marquee {
  opacity: 0;
  transform: translateY(-200%) scale(0.9);
}

#voice-mode:checked~.chat-container {
  width: 10rem;
  height: 10rem;
  border-radius: 30% 45% 30% 40%;
  animation: ai-rotate 10s linear infinite;
}

#voice-mode:checked~.chat-container .chat-wrapper {
  opacity: 0;
  pointer-events: none;
}

/* Marquee Suggestions */
.chat-marquee {
  --gap: 1em;
  display: flex;
  gap: var(--gap);
  margin-bottom: 0rem;
  width: 100%;
  mask-image: linear-gradient(to right,
      rgba(0, 0, 0, 0),
      rgba(0, 0, 0, 1) 15%,
      rgba(0, 0, 0, 1) 85%,
      rgba(0, 0, 0, 0));
  overflow: hidden;
  transition: all 0.3s ease;
}

.chat-marquee>ul {
  display: flex;
  gap: var(--gap);
  flex-shrink: 0;
  list-style: none;
  animation: scroll-marquee-left 25s linear infinite;
}

.chat-marquee>ul>li {
  padding: 0.5rem 1rem;
  background-color: #0a0a0b !important;
  background-image:
    linear-gradient(to right, rgba(64, 47, 181, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(207, 48, 170, 0.03) 1px, transparent 1px);
  border: 1px solid var(--ai-border-color);
  border-radius: 20px;
  color: var(--ai-neutral-color);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease, transform 0.1s ease;
}

.chat-marquee>ul>li:hover {
  background-color: var(--secondary-hover-color);
  transform: scale(1.05);
}

.chat-marquee>ul>li:active {
  transform: scale(0.95);
}

.chat-marquee:hover>ul {
  animation-play-state: paused !important;
}

/* Chat Container */
.chat-container {
  position: relative;
  width: 100%;
  background-color: #0a0a0b !important;
  background-image:
    linear-gradient(to right, rgba(64, 47, 181, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(207, 48, 170, 0.03) 1px, transparent 1px);
  border: 1px solid var(--ai-border-color);
  border-radius: 1.5rem 1.5rem 0 0;
  border-bottom: none;
  /* overflow: hidden; - Removed to show dropdowns */
  overflow: visible;
  transition: all 0.4s cubic-bezier(0.3, 1.2, 0.6, 1);
}

.chat-container::before {
  content: "";
  position: absolute;
  top: -8rem;
  left: -5rem;
  width: 12rem;
  height: 12rem;
  background: radial-gradient(circle,
      rgba(255, 255, 255, 0.15) 10%,
      rgba(255, 255, 255, 0.05) 30%,
      transparent 70%);
  filter: blur(20px);
  border-radius: 50%;
  pointer-events: none;
  transition: all 0.8s ease;
}

.chat-container:focus-within::before {
  top: -5rem;
  left: 30%;
  filter: blur(40px);
}

.chat-wrapper {
  display: flex;
  flex-direction: column;
  padding: 0 0.8rem 0.6rem;
  transition: all 0.2s ease;
}

/* Chat Input Textarea */
#chat-input {
  width: 100%;
  min-height: 2.5rem;
  max-height: 8rem;
  padding: 0.1rem 0.5rem 0.5rem;
  background: none;
  border: none;
  border-radius: 0;
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.5;
  outline: none;
  resize: none;
  font-family: inherit;
}

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

/* Button Bar */
.button-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  gap: 0.5rem;
}

.left-buttons,
.right-buttons {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.left-buttons>label,
.right-buttons>label,
.right-buttons>button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--ai-neutral-color);
  background: transparent;
  border: none;
}

.left-buttons>label:hover,
.right-buttons>label:hover,
.right-buttons>button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.left-buttons>label:active,
.right-buttons>label:active,
.right-buttons>button:active {
  transform: scale(0.9);
}

.left-buttons .material-symbols-rounded,
.right-buttons .material-symbols-rounded {
  font-size: 1.3rem;
}

/* Send Button Special Styling */
#send-message-button {
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  width: 2.2rem;
  height: 2.2rem;
  min-width: 2.2rem;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  position: relative;
  z-index: 10;
}

#send-message-button svg {
  display: block;
  width: 1.8rem;
  height: 1.8rem;
  fill: var(--text-color, #e0e0e0);
  transition: all 0.2s ease-in-out;
}

#send-message-button:hover {
  transform: translateY(-10%) scale(1.1);
}

#send-message-button:hover svg {
  fill: #ffffff;
}

#send-message-button:active {
  transform: scale(0.9);
}

/* Attachment Overlay */
#appendix-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 1.5rem;
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  pointer-events: none;
  z-index: 100;
  transition: all 0.2s ease;
}

#appendix-bar>label {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background-color: var(--secondary-hover-color);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.2s ease;
  color: var(--ai-neutral-color);
}

#appendix:checked~#appendix-bar {
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  pointer-events: all;
}

#appendix:checked~#appendix-bar>label {
  opacity: 1;
  transform: translateY(0);
}

#appendix:checked~#appendix-bar>label:nth-child(1) {
  transition-delay: 0.05s;
}

#appendix:checked~#appendix-bar>label:nth-child(2) {
  transition-delay: 0.1s;
}

#appendix:checked~#appendix-bar>label:nth-child(3) {
  transition-delay: 0.15s;
}

#appendix:checked~#appendix-bar>label:nth-child(4) {
  transition-delay: 0.2s;
}

#appendix-bar>label:hover {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  transform: scale(1.1);
}

#appendix-bar .material-symbols-rounded {
  font-size: 1.5rem;
}

/* Model Menu in new layout */
.AI-Input .model-menu-container {
  position: relative;
}

.AI-Input .model-menu-container>label {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--ai-neutral-color);
}

.AI-Input .model-menu-container>label:hover {
  background: rgba(255, 255, 255, 0.1);
}

.AI-Input .model-dropdown {
  bottom: 100%;
  left: 0;
  margin-bottom: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  /* Custom Scrollbar for Dropdown */
  scrollbar-width: thin;
  scrollbar-color: var(--secondary-hover-color) transparent;
}

/* Keyframe Animations */
@keyframes scroll-marquee-left {
  to {
    transform: translateX(calc(-100% - var(--gap)));
  }
}

@keyframes ai-rotate {
  0% {
    transform: rotate(0);
    border-radius: 30% 45% 30% 40%;
  }

  25% {
    transform: rotate(90deg);
    border-radius: 40% 30% 45% 30%;
  }

  50% {
    transform: rotate(180deg);
    border-radius: 45% 30% 40% 30%;
  }

  75% {
    transform: rotate(270deg);
    border-radius: 30% 40% 30% 45%;
  }

  100% {
    transform: rotate(360deg);
    border-radius: 30% 45% 30% 40%;
  }
}

/* Light Mode Overrides */
.light_mode .AI-Input {
  --ai-border-color: rgba(0, 0, 0, 0.1);
}

.light_mode .chat-container::before {
  background: radial-gradient(circle,
      rgba(0, 0, 0, 0.05) 10%,
      rgba(0, 0, 0, 0.02) 30%,
      transparent 70%);
}

.light_mode #send-message-button {
  color: #fff;
}

.light_mode #appendix-bar>label {
  background-color: #f0f0f0;
  color: #333;
}

.light_mode #appendix:checked~#appendix-bar {
  background-color: rgba(255, 255, 255, 0.9);
}

/* ====== RESPONSIVE STYLES ====== */

/* Base responsive - Use fluid sizing */
.AI-Input {
  padding: 0 clamp(0.5rem, 2vw, 1.5rem) 0;
}

.AI-Input .chat-container,
.AI-Input .chat-marquee {
  max-width: min(55rem, 95vw);
}

.chat-wrapper {
  /* Reduced top padding to 0 as requested */
  padding: 0 clamp(0.5rem, 1.5vw, 1rem) clamp(0.4rem, 1vw, 1rem);
}

#chat-input {
  min-height: clamp(1.5rem, 3vw, 2.5rem);
  font-size: clamp(0.85rem, 2vw, 1rem);
}

.button-bar {
  gap: clamp(0.1rem, 0.5vw, 0.5rem);
}

.left-buttons,
.right-buttons {
  gap: clamp(0rem, 0.5vw, 0.25rem);
}

.left-buttons>label,
.right-buttons>label,
.right-buttons>button {
  width: clamp(1.5rem, 4vw, 2.2rem);
  height: clamp(1.5rem, 4vw, 2.2rem);
  min-width: clamp(1.5rem, 4vw, 2.2rem);
  flex-shrink: 0;
}

.left-buttons .material-symbols-rounded,
.right-buttons .material-symbols-rounded {
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
}

/* Send & Stop Button Styles */
#send-message-button,
#stop-response-btn {
  width: clamp(1.6rem, 4.5vw, 2.5rem);
  height: clamp(1.6rem, 4.5vw, 2.5rem);
  min-width: clamp(1.6rem, 4.5vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  border-radius: 50%;
  transition: all 0.25s ease;
}

#send-message-button:hover,
#stop-response-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

#send-message-button svg {
  fill: currentColor;
}

#stop-response-btn .material-symbols-rounded {
  font-size: 1.5rem;
  color: #ff5252;
}

/* Hidden state for buttons */
.send-btn.hidden,
.stop-btn.hidden {
  display: none !important;
}

/* Animation for button appearance */
@keyframes buttonPopIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  70% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#send-message-button:not(.hidden),
#stop-response-btn:not(.hidden) {
  animation: buttonPopIn 0.2s ease-out;
}

.chat-marquee>ul>li {
  padding: clamp(0.25rem, 0.8vw, 0.5rem) clamp(0.5rem, 1.2vw, 1rem);
  font-size: clamp(0.65rem, 1.5vw, 0.85rem);
}

.chat-marquee {
  margin-bottom: clamp(0.3rem, 1vw, 1rem);
}

.AI-Input .disclaimer-text {
  font-size: clamp(0.5rem, 1.2vw, 0.7rem);
}

.chat-container .disclaimer-text {
  padding-top: clamp(0.2rem, 0.5vw, 0.4rem);
  margin-top: clamp(0.15rem, 0.4vw, 0.3rem);
}

/* Small screens - under 600px */
@media (max-width: 600px) {
  .AI-Input {
    bottom: 0;
    padding: 0 0.35rem 0;
  }

  .chat-container {
    border-radius: 0.75rem;
  }
}

/* Very small screens - under 400px */
@media (max-width: 400px) {
  .AI-Input {
    bottom: 0;
    padding: 0 0.25rem 0;
  }

  .left-buttons>label,
  .right-buttons>label,
  .right-buttons>button {
    width: 1.35rem;
    height: 1.35rem;
    min-width: 1.35rem;
  }

  .left-buttons .material-symbols-rounded,
  .right-buttons .material-symbols-rounded {
    font-size: 0.8rem;
  }

  #send-message-button,
  #stop-response-btn {
    width: 1.5rem;
    height: 1.5rem;
    min-width: 1.5rem;
  }
}

/* =========================================
   GLOBAL RESPONSIVE & LAYOUT FIXES
   ========================================= */

/* Ensure full viewport height on all devices to prevent background clipping */
html,
body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

/* Force body background to cover screen */
body {
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  /* Ensure background color is consistent */
  background-color: var(--primary-color);
}

/* Hide suggestion prompts on non-desktop screens (tablets and mobile) */
@media (max-width: 1024px) {
  .suggestion-list {
    display: none !important;
  }
}

/* Ensure AI Input stays on top */
.AI-Input {
  z-index: 1000;
}

/* Fix for any fixed background elements to ensure they cover the screen */
.background,
.bg-animation,
#background-canvas,
canvas.background-canvas {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -1;
  pointer-events: none;
}

/* =========================================
   ANIMATED SEARCH INPUT STYLING
   ========================================= */

.sidebar-search {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 314px;
}

.search-white,
.search-border,
.search-darkBorderBg,
.search-glow {
  max-height: 50px;
  max-width: 100%;
  height: 100%;
  width: 100%;
  position: absolute;
  overflow: hidden;
  z-index: -1;
  border-radius: 12px;
  filter: blur(3px);
}

.search-input {
  background-color: #010201;
  border: none;
  width: 100%;
  height: 46px;
  border-radius: 10px;
  color: #c0b9c0;
  padding-inline: 45px 15px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.search-input::placeholder {
  color: #c0b9c0;
}

.search-input:focus {
  outline: none;
}

.search-main:focus-within>.search-input-mask {
  display: none;
}

.search-input-mask {
  pointer-events: none;
  width: 100px;
  height: 20px;
  position: absolute;
  background: linear-gradient(90deg, transparent, #010201);
  top: 13px;
  left: 50px;
}

.search-pink-mask {
  pointer-events: none;
  width: 30px;
  height: 20px;
  position: absolute;
  background: #cf30aa;
  top: 8px;
  left: 5px;
  filter: blur(20px);
  opacity: 0.8;
  transition: all 2s;
}

.search-container:hover>.search-main>.search-pink-mask {
  opacity: 0;
}

.search-white {
  max-height: 48px;
  max-width: 100%;
  border-radius: 10px;
  filter: blur(2px);
}

.search-white::before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(83deg);
  position: absolute;
  width: 600px;
  height: 600px;
  background-repeat: no-repeat;
  background-position: 0 0;
  filter: brightness(1.4);
  background-image: conic-gradient(rgba(0, 0, 0, 0) 0%,
      #a099d8,
      rgba(0, 0, 0, 0) 8%,
      rgba(0, 0, 0, 0) 50%,
      #dfa2da,
      rgba(0, 0, 0, 0) 58%);
  transition: all 2s;
}

.search-border {
  max-height: 47px;
  max-width: 100%;
  border-radius: 11px;
  filter: blur(0.5px);
}

.search-border::before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(70deg);
  position: absolute;
  width: 600px;
  height: 600px;
  filter: brightness(1.3);
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: conic-gradient(#1c191c,
      #402fb5 5%,
      #1c191c 14%,
      #1c191c 50%,
      #cf30aa 60%,
      #1c191c 64%);
  transition: all 2s;
}

.search-darkBorderBg {
  max-height: 50px;
  max-width: 100%;
}

.search-darkBorderBg::before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(82deg);
  position: absolute;
  width: 600px;
  height: 600px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: conic-gradient(rgba(0, 0, 0, 0),
      #18116a,
      rgba(0, 0, 0, 0) 10%,
      rgba(0, 0, 0, 0) 50%,
      #6e1b60,
      rgba(0, 0, 0, 0) 60%);
  transition: all 2s;
}

.search-container:hover>.search-darkBorderBg::before {
  transform: translate(-50%, -50%) rotate(-98deg);
}

.search-container:hover>.search-glow::before {
  transform: translate(-50%, -50%) rotate(-120deg);
}

.search-container:hover>.search-white::before {
  transform: translate(-50%, -50%) rotate(-97deg);
}

.search-container:hover>.search-border::before {
  transform: translate(-50%, -50%) rotate(-110deg);
}

.search-container:focus-within>.search-darkBorderBg::before {
  transform: translate(-50%, -50%) rotate(442deg);
  transition: all 4s;
}

.search-container:focus-within>.search-glow::before {
  transform: translate(-50%, -50%) rotate(420deg);
  transition: all 4s;
}

.search-container:focus-within>.search-white::before {
  transform: translate(-50%, -50%) rotate(443deg);
  transition: all 4s;
}

.search-container:focus-within>.search-border::before {
  transform: translate(-50%, -50%) rotate(430deg);
  transition: all 4s;
}

.search-glow {
  overflow: hidden;
  filter: blur(30px);
  opacity: 0.4;
  max-height: 80px;
  max-width: 100%;
}

.search-glow:before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(60deg);
  position: absolute;
  width: 999px;
  height: 999px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: conic-gradient(#000,
      #402fb5 5%,
      #000 38%,
      #000 50%,
      #cf30aa 60%,
      #000 87%);
  transition: all 2s;
}

.search-main {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 13px;
  pointer-events: none;
  z-index: 2;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .search-container {
    max-width: 100%;
  }

  .search-input {
    font-size: 13px;
    height: 42px;
  }

  .search-icon {
    top: 11px;
    left: 12px;
  }

  .search-input {
    padding-inline: 40px 12px;
  }
}

/* =========================================
   SIDEBAR GRADIENT THEME
   ========================================= */

/* Sidebar Background with Gradient Grid */
.sidebar {
  background-color: #0a0a0b !important;
  background-image:
    linear-gradient(to right, rgba(64, 47, 181, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(207, 48, 170, 0.03) 1px, transparent 1px);
  background-size: 2rem 2rem;
  position: relative;
}

.sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(64, 47, 181, 0.15), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(207, 48, 170, 0.15), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.sidebar>* {
  position: relative;
  z-index: 1;
}

/* Sidebar Header Styling */
.sidebar-header {
  background: rgba(1, 2, 1, 0.5);
  border-bottom: 1px solid rgba(64, 47, 181, 0.2);
}

/* New Chat Button - Gradient Style */
.sidebar-new-chat {
  padding: 0.75rem 1rem;
}

.new-chat-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #402fb5, #cf30aa);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(64, 47, 181, 0.3);
}

.new-chat-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.new-chat-btn:hover::before {
  left: 100%;
}

.new-chat-btn:hover {
  box-shadow: 0 6px 25px rgba(207, 48, 170, 0.5);
  transform: translateY(-2px);
}

.new-chat-btn:active {
  transform: translateY(0);
}

/* Quick Action Items - Gradient Borders */
.sidebar-quick-actions {
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.quick-action-item {
  position: relative;
  height: 70px;
  background: rgba(1, 2, 1, 0.8);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

.quick-action-item::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: conic-gradient(from 0deg at 50% 50%,
      transparent 0%,
      #402fb5 25%,
      transparent 50%,
      #cf30aa 75%,
      transparent 100%);
  border-radius: 12px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: rotate 6s linear infinite;
}

.quick-action-item:hover::before {
  opacity: 1;
}

.quick-action-item::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: rgba(1, 2, 1, 0.95);
  border-radius: 10px;
  z-index: -1;
}

.quick-action-item .icon {
  font-size: 1.5rem;
  color: #c0b9c0;
  transition: color 0.3s ease;
}

.quick-action-item:hover .icon {
  color: #ffffff;
}

.quick-action-item span:last-child {
  font-size: 11px;
  color: #8a8a8a;
  font-weight: 500;
}

/* Library and Projects Sections */
.nav-item {
  padding: 0.9rem 1rem;
  margin: 0.25rem 0.75rem;
  background: rgba(1, 2, 1, 0.6);
  border: 1px solid rgba(64, 47, 181, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-item:hover {
  background: rgba(1, 2, 1, 0.9);
  border-color: rgba(207, 48, 170, 0.4);
  box-shadow: 0 0 15px rgba(64, 47, 181, 0.2);
}

/* Chat List Items */
.chats-container {
  padding: 0 0.75rem;
}

.chat-item {
  position: relative;
  padding: 0.9rem;
  margin: 0.4rem 0;
  background: rgba(1, 2, 1, 0.6);
  border: 1px solid rgba(64, 47, 181, 0.15);
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

.chat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(64, 47, 181, 0.1), transparent);
  transition: left 0.5s ease;
}

.chat-item:hover::before {
  left: 100%;
}

.chat-item:hover {
  background: rgba(1, 2, 1, 0.9);
  border-color: rgba(207, 48, 170, 0.3);
  box-shadow: 0 0 15px rgba(64, 47, 181, 0.15);
}

.chat-item.active {
  background: rgba(64, 47, 181, 0.15);
  border-color: #402fb5;
  box-shadow: 0 0 20px rgba(64, 47, 181, 0.3);
}

/* Recent Chats Header */
.chat-list-section .section-header h3 {
  color: #c0b9c0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1.25rem 1rem 0.75rem;
}

/* User Profile Footer */
.sidebar-footer .user-profile {
  background: rgba(1, 2, 1, 0.8);
  border-top: 1px solid rgba(64, 47, 181, 0.2);
  position: relative;
}

.sidebar-footer .user-profile::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to bottom, transparent, rgba(1, 2, 1, 0.8));
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(1, 2, 1, 0.5);
}

.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #402fb5, #cf30aa);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5040c5, #df40ba);
}

/* Rotation Animation */
@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }

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

/* =========================================
   SCROLLBAR UI REMOVAL
   ========================================= */
/* Hide scrollbar for Chrome, Safari and Opera */
.right-scroll-wrapper::-webkit-scrollbar,
body::-webkit-scrollbar,
.chat-list::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar,
*::-webkit-scrollbar {
  /* Nuclear option to ensure it's gone everywhere */
  display: none !important;
}

/* Hide scrollbar for IE, Edge and Firefox */
.right-scroll-wrapper,
body,
.chat-list,
.sidebar-content,
* {
  -ms-overflow-style: none !important;
  /* IE and Edge */
  scrollbar-width: none !important;
  /* Firefox */
}

/* =========================================
   THINKING TOGGLE - AI Reasoning Display
   ========================================= */

.thinking-container {
  margin-bottom: 0.75rem;
  display: block;
  width: 100%;
}

.thinking-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  user-select: none;
  background: rgba(66, 133, 244, 0.15);
  border-radius: 20px;
  transition: background 0.2s ease;
  margin-bottom: 0.5rem;
}

.thinking-toggle:hover {
  background: rgba(66, 133, 244, 0.25);
}

.thinking-toggle .thinking-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thinking-toggle .thinking-icon svg {
  width: 16px;
  height: 16px;
  fill: #4285f4;
}

.thinking-toggle .thinking-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #4285f4;
}

.thinking-toggle .thinking-arrow {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4285f4;
  transition: transform 0.3s ease;
}

.thinking-toggle .thinking-arrow svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.thinking-container.expanded .thinking-toggle .thinking-arrow {
  transform: rotate(180deg);
}

.thinking-content {
  display: none;
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.thinking-container.expanded .thinking-content {
  display: block;
}

.thinking-content .thinking-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Light mode adjustments */
.light_mode .thinking-toggle {
  background: rgba(66, 133, 244, 0.12);
}

.light_mode .thinking-toggle:hover {
  background: rgba(66, 133, 244, 0.2);
}

.light_mode .thinking-content {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.light_mode .thinking-content .thinking-text {
  color: rgba(0, 0, 0, 0.55);
}

/* When message has thinking, make content flow vertically */
.chat-list .message .message-content:has(.thinking-container) {
  flex-direction: column;
  align-items: flex-start;
}

.chat-list .message .message-content:has(.thinking-container) .avatar {
  position: absolute;
  top: 0;
  left: 0;
}

.chat-list .message .message-content:has(.thinking-container) {
  position: relative;
  padding-left: 56px;
}

/* Dropdown Category Headers */
.dropdown-category-header {
  padding: 10px 16px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--subheading-color);
  background: var(--secondary-hover-color);
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
  border-top: 1px solid rgba(128, 128, 128, 0.2);
  position: sticky;
  top: 0;
  z-index: 5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(5px);
}

.dropdown-category-header:first-child {
  border-top: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* Adjust dropdown option padding to account for visuals */
.dropdown-option {
  border-bottom: none;
  /* enhance list feel */
}

/* Research Mode Button */
.research-mode-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: all 0.2s ease;
  opacity: 0.7;
}

.research-mode-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.research-mode-btn.active {
  color: #4a90e2;
  opacity: 1;
}

.research-mode-btn .material-symbols-rounded {
  font-size: 24px;
}

/* Developer Mode Button */
.developer-mode-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: all 0.2s ease;
  opacity: 0.7;
}

.developer-mode-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.developer-mode-btn.active {
  color: #00d084;
  opacity: 1;
}

.developer-mode-btn .material-symbols-rounded {
  font-size: 24px;
}

/* Uncensored Mode Button */
.uncensored-mode-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: all 0.2s ease;
  opacity: 0.7;
}

.uncensored-mode-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.uncensored-mode-btn.active {
  color: #ff6b6b;
  opacity: 1;
}

.uncensored-mode-btn .material-symbols-rounded {
  font-size: 24px;
}

/* Thinking Mode Button */
.thinking-mode-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: all 0.2s ease;
  opacity: 0.7;
}

.thinking-mode-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.thinking-mode-btn.active {
  color: #a855f7;
  opacity: 1;
}

.thinking-mode-btn .material-symbols-rounded {
  font-size: 24px;
}

/* Reasoning Mode Button */
.reasoning-mode-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: all 0.2s ease;
  opacity: 0.7;
}

.reasoning-mode-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.reasoning-mode-btn.active {
  color: #f97316;
  opacity: 1;
}

.reasoning-mode-btn .material-symbols-rounded {
  font-size: 24px;
}

/* Speed Mode Button */
.speed-mode-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: all 0.2s ease;
  opacity: 0.7;
}

.speed-mode-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.speed-mode-btn.active {
  color: #22d3ee;
  opacity: 1;
}

.speed-mode-btn .material-symbols-rounded {
  font-size: 24px;
}