/* Global styles */
:root {
  /* Primary colors - cyber purple */
  --primary-color: #a855f7;
  --primary-light: #c084fc;
  --primary-dark: #9333ea;
  
  /* Background colors - dark with depth */
  --bg-dark: #121212;
  --bg-medium: #1e1e1e;
  --bg-light: #2d2d2d;
  
  /* Text colors - high contrast */
  --text-color: #f0f0f0;    /* Brighter for better contrast */
  --light-text: #c0c0c0;    /* Lighter gray for better readability */
  
  /* Accent colors - futuristic feel */
  --accent-cyan: #22d3ee;
  --accent-blue: #0ea5e9;
  --accent-green: #10b981;
  
  /* UI element colors */
  --secondary-color: #2d2d2d;
  --border-color: #3f3f3f;
  --border-highlight: #545464;  /* Brighter border color for better visibility */
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 5px 15px rgba(0, 0, 0, 0.2);
  --inset-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  
  /* Table colors */
  --table-header-bg: #333340;  /* Dark blue-gray for table headers */
  --table-odd-row: #28282f;    /* Slightly lighter than bg-medium for odd rows */
  --table-even-row: #222228;   /* Slightly darker than odd rows */
  --table-hover: rgba(168, 85, 247, 0.1); /* Subtle highlight on hover */
  
  /* Status colors */
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-dark);
  background-image: linear-gradient(to bottom right, var(--bg-dark), var(--bg-medium));
  min-height: 100vh;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

header p {
  color: var(--light-text);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
  color: var(--light-text);
  font-size: 0.875rem;
}

/* Upload container */
.upload-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
}

.upload-area {
  width: 100%;
  max-width: 600px;
  height: 250px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Mobile responsive upload area */
@media (max-width: 576px) {
  .upload-area {
    height: 200px;
    max-width: 100%;
    padding: 1rem;
  }
  
  .upload-prompt svg {
    width: 36px;
    height: 36px;
  }
  
  .upload-prompt .file-limit {
    font-size: 0.7rem;
  }
}

.upload-area:hover {
  border-color: var(--primary-color);
  background-color: rgba(124, 58, 237, 0.05);
}

.upload-area.drag-over {
  border-color: var(--primary-color);
  background-color: rgba(124, 58, 237, 0.1);
}

.upload-prompt {
  text-align: center;
  color: var(--light-text);
}

.upload-prompt svg {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.browse-text {
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
}

.file-limit {
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* Content container */
.content-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .content-container {
    flex-direction: row;
    height: calc(100vh - 100px); /* Reduced height to use more space */
    margin-bottom: 0;
  }
  
  .app-container {
    padding-bottom: 0.5rem; /* Reduced bottom padding */
  }
  
  footer {
    margin-top: 0.5rem; /* Reduced top margin */
    padding: 0.5rem; /* Reduced padding */
  }
}

.hidden {
  display: none !important;
}

/* RTL Text Support for Persian */
.rtl-text {
  direction: rtl;
  text-align: right;
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* User messages with RTL text should be aligned to the left instead of right */
.user-message.rtl-text {
  margin-left: 0;
  margin-right: auto;
}

/* Assistant messages with RTL text should be aligned to the right instead of left */
.assistant-message.rtl-text {
  margin-left: auto;
  margin-right: 0;
}

/* Mobile responsive styles */
@media (max-width: 576px) {
  .app-container {
    padding: 0.5rem;
  }
  
  header {
    margin-bottom: 1rem;
  }
  
  header h1 {
    font-size: 1.5rem;
  }
  
  /* Chat interface adjustments for mobile */
  .chat-messages {
    padding: 1rem;
  }
  
  .message {
    max-width: 95%;
  }
  
  /* Improve file upload button visibility on mobile */
  .upload-button {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
  }
  
  /* Adjust chat input container for mobile */
  .chat-input-container {
    padding: 0.75rem 0.5rem;
  }
  
  #chat-input {
    min-height: 50px;
    padding: 0.5rem;
  }
  
  #send-button {
    width: 50px;
  }
  
  /* Adjust files panel for mobile view */
  .files-panel {
    max-width: 100%;
    min-width: unset;
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding: 0.75rem;
    max-height: 200px;
  }
  
  /* File list items in mobile view */
  .conversation-file {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
  }
}

/* Small mobile screens */
@media (max-width: 360px) {
  .app-container {
    padding: 0.25rem;
  }
  
  .upload-area {
    height: 180px;
  }
  
  .upload-prompt p {
    font-size: 0.9rem;
  }
  
  .upload-prompt .file-limit {
    font-size: 0.65rem;
  }
}

/* Table styling for better readability */
.assistant-message table {
  border-collapse: collapse;
  margin: 1rem 0;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-highlight);
  border-radius: 4px;
  width: auto;
  max-width: 100%;
}

/* Table wrapper for horizontal scrolling */
.assistant-message .table-wrapper {
  overflow-x: auto;
  display: block;
  max-width: 100%;
}

.assistant-message th,
.assistant-message td {
  border: 1px solid var(--border-highlight);
  padding: 10px 12px;
  text-align: left;
}

.assistant-message th {
  background-color: var(--table-header-bg);
  color: var(--text-color);
  font-weight: 600;
  border-bottom: 2px solid var(--primary-color);
}

.assistant-message tr:nth-child(odd) {
  background-color: var(--table-odd-row);
}

.assistant-message tr:nth-child(even) {
  background-color: var(--table-even-row);
}

.assistant-message tr:hover {
  background-color: var(--table-hover);
}

/* Enhanced LaTeX formula styling */
.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.75rem 0;
  margin: 1rem 0;
  background-color: var(--bg-dark);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--inset-shadow);
}

.katex {
  font-size: 1.1em;
  font-family: KaTeX_Main, 'Times New Roman', serif;
  color: #e4e4e4;
}

/* Improve display mode formulas */
.katex-display > .katex {
  display: flex;
  justify-content: center;
  padding: 0.5rem;
  position: relative;
}

.katex-display > .katex::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.3), transparent);
}

/* Make sure inline math doesn't break layout */
.katex-inline {
  display: inline-block;
  white-space: nowrap;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0 4px;
  border-radius: 3px;
}

/* Add more breathing room for complex formulas */
.katex-html {
  padding: 3px;
}

/* Chat container */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-medium);
  box-shadow: var(--shadow);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  max-height: 70vh; /* Force scrollable area with fixed height */
  background-image: radial-gradient(
    circle at center,
    rgba(168, 85, 247, 0.05) 0%,
    transparent 70%
  );
}

.message {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  max-width: 90%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-message {
  background-image: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  margin-left: auto;
  margin-right: 0;
  padding: 0.6rem 0.85rem;
  min-height: unset;
  height: auto;
  display: inline-block;
  max-width: 85%;
  word-break: break-word;
  line-height: 1.4;
  box-shadow: 0 2px 10px rgba(147, 51, 234, 0.3);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  font-family: 'Vazirmatn', sans-serif;
}

.assistant-message {
  background-color: var(--bg-light);
  margin-right: auto;
  margin-left: 0;
  line-height: 1.6;
  border: 1px solid rgba(168, 85, 247, 0.2);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.05);
  position: relative;
  font-family: 'Vazirmatn', sans-serif;
}

.assistant-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
}

/* Markdown styles for assistant messages */
.assistant-message h1,
.assistant-message h2,
.assistant-message h3,
.assistant-message h4,
.assistant-message h5,
.assistant-message h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-color);
}

.assistant-message h1 {
  font-size: 1.5em;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.3em;
}

.assistant-message h2 {
  font-size: 1.3em;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.3em;
}

.assistant-message h3 {
  font-size: 1.2em;
}

.assistant-message h4 {
  font-size: 1.1em;
}

.assistant-message h5, .assistant-message h6 {
  font-size: 1em;
}

.assistant-message p {
  margin-bottom: 1em;
}

.assistant-message ul, .assistant-message ol {
  margin-bottom: 1em;
  padding-left: 2em;
}

.assistant-message li {
  margin-bottom: 0.5em;
}

.assistant-message li > ul, .assistant-message li > ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.assistant-message blockquote {
  border-left: 4px solid var(--primary-light);
  padding-left: 1em;
  margin-left: 0;
  margin-bottom: 1em;
  color: var(--light-text);
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0.5em 1em;
  border-radius: 0 4px 4px 0;
}

.assistant-message pre {
  background-color: var(--bg-dark);
  border-radius: 8px;
  padding: 1em;
  overflow-x: auto;
  margin-bottom: 1em;
  border: 1px solid var(--border-color);
  box-shadow: var(--inset-shadow);
}

.assistant-message code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--accent-cyan);
}

.assistant-message pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.9em;
  color: var(--text-color);
}

.assistant-message table {
  border-collapse: collapse;
  margin-bottom: 1em;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-highlight);
  border-radius: 4px;
  width: auto;
  max-width: 100%;
}

.assistant-message table th,
.assistant-message table td {
  border: 1px solid var(--border-highlight);
  padding: 0.5em 0.75em;
  text-align: left;
}

.assistant-message table th {
  background-color: var(--table-header-bg);
  color: var(--text-color);
  font-weight: 600;
  border-bottom: 2px solid var(--primary-color);
}

.assistant-message table tr:nth-child(odd) {
  background-color: var(--table-odd-row);
}

.assistant-message table tr:nth-child(even) {
  background-color: var(--table-even-row);
}

.assistant-message table tr:hover {
  background-color: var(--table-hover);
}

.assistant-message a {
  color: var(--primary-color);
  text-decoration: none;
}

.assistant-message a:hover {
  text-decoration: underline;
}

.assistant-message img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1em;
  border-radius: 6px;
}

.assistant-message hr {
  height: 1px;
  background-color: var(--border-color);
  border: none;
  margin: 1.5em 0;
}

.system-message {
  background-color: rgba(34, 211, 238, 0.07);
  border: 1px solid var(--border-highlight);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--light-text);
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-weight: 500;
}

.system-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.chat-input-container {
  display: flex;
  flex-wrap: wrap;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-medium);
  position: relative;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
}

.chat-input-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
}

#chat-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  resize: none;
  font-family: inherit;
  font-size: 1rem;
  min-height: 60px;
  width: calc(100% - 80px); /* Account for send button */
  margin-right: 0.5rem;
  background-color: var(--bg-dark);
  color: var(--text-color);
  box-shadow: var(--inset-shadow);
  transition: all 0.3s ease;
}

#chat-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2), var(--inset-shadow);
}

#send-button {
  background-image: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 10px;
  width: 60px;
  margin-left: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 10px rgba(147, 51, 234, 0.3);
}

#send-button:hover {
  background-image: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

#send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* File preview area styles */
.file-preview {
  margin-bottom: 0.25rem;
  padding: 0.5rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.8rem;
  width: 100%;
  min-width: 100%;
  flex-basis: 100%;
  order: -1; /* Make sure it appears before the input */
  box-sizing: border-box;
  box-shadow: var(--inset-shadow);
  position: relative;
  overflow: hidden;
}

.file-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
}

.preview-header {
  margin-bottom: 0.25rem;
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.preview-file-item {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.preview-file-item svg {
  margin-right: 0.25rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.preview-file-size {
  margin-left: 0.25rem;
  color: var(--light-text);
  font-size: 0.7rem;
}

.preview-clear-button {
  padding: 0.1rem 0.5rem;
  border: none;
  background-color: transparent;
  color: var(--light-text);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  transition: all 0.2s ease;
  margin-left: auto;
}

.preview-clear-button:hover {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--error-color);
  text-shadow: 0 0 4px rgba(239, 68, 68, 0.3);
}

/* Files info panel */
.files-panel {
  border-left: 1px solid var(--border-color);
  padding: 1rem;
  min-width: 200px;
  max-width: 250px;
  height: 100%;
  overflow-y: auto;
  background-color: var(--bg-medium);
  box-shadow: inset 2px 0 10px rgba(0, 0, 0, 0.1);
}

.files-panel h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--primary-light);
  position: relative;
  padding-bottom: 0.5rem;
}

.files-panel h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, var(--primary-light), transparent);
}

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

.conversation-file {
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 0.875rem;
  background-color: var(--bg-light);
  transition: all 0.2s ease;
}

.conversation-file:hover {
  background-color: rgba(168, 85, 247, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.conversation-file.active {
  border-color: var(--primary-color);
  background-color: rgba(168, 85, 247, 0.15);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.file-type-icon {
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* Message actions and copy button styles */
.message-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
}

.copy-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-medium);
  color: var(--light-text);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-button:hover {
  background-color: var(--bg-light);
  border-color: var(--border-highlight);
  color: var(--text-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.copy-button.copied {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: var(--success-color);
  color: var(--success-color);
}

.copy-button svg {
  transition: transform 0.2s ease;
}

.copy-button:hover svg {
  transform: translateY(-1px);
}

/* Table download button styles */
.table-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0.5rem 0 1.5rem;
}

.table-download-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(14, 165, 233, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.table-download-button:hover {
  background-color: rgba(14, 165, 233, 0.2);
  border-color: var(--accent-blue);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.table-download-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.table-download-button.success {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: var(--success-color);
  color: var(--success-color);
}

.table-download-button.error {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: var(--error-color);
  color: var(--error-color);
}

/* Loading indicator */
.loading-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 1.2rem;
  position: relative;
  padding: 0.5rem;
}

.loading-indicator::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40%;
  height: 1px;
  background: linear-gradient(90deg, var(--primary-color), transparent);
  animation: loading-line 2s infinite ease-in-out;
}

@keyframes loading-line {
  0% {
    left: 0;
    width: 0;
  }
  50% {
    width: 40%;
  }
  100% {
    left: 100%;
    width: 0;
  }
}

.loading-indicator .dots {
  display: flex;
}

.loading-indicator .dot {
  width: 8px;
  height: 8px;
  margin: 0 4px;
  border-radius: 50%;
  background-image: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  animation: pulse-glow 1.5s infinite ease-in-out;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.loading-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulse-glow {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
    box-shadow: 0 0 4px rgba(168, 85, 247, 0.3);
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.7);
  }
}

/* Primary button styles */
.primary-button {
  background-image: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 3px 10px rgba(147, 51, 234, 0.3);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.primary-button:hover {
  background-image: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(147, 51, 234, 0.4);
}

.primary-button svg {
  width: 16px;
  height: 16px;
}

/* New chat button styles */
#new-chat-button {
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

@media (max-width: 576px) {
  #new-chat-button {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  #new-chat-button svg {
    width: 14px;
    height: 14px;
  }
}

/* Go-to-top button styles */
.go-to-top-button {
  position: fixed !important;
  bottom: 30px !important;
  right: 30px !important;
  width: 50px !important;
  height: 50px !important;
  background-image: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
  color: white !important;
  border: none !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  transition: all 0.3s ease !important;
  z-index: 9999 !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.go-to-top-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(147, 51, 234, 0.5);
}

.go-to-top-button.hidden {
  opacity: 0 !important;
  transform: translateY(30px) !important;
  pointer-events: none !important;
}

.go-to-top-button svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
}

/* Mobile-specific styles for the go-to-top button */
.go-to-top-button.mobile {
  width: 50px;
  height: 50px;
  bottom: 20px;
  right: 20px;
  background-image: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.go-to-top-button.mobile svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
}

/* Make button more touch-friendly on small screens */
@media (max-width: 480px) {
  .go-to-top-button.mobile {
    width: 55px;
    height: 55px;
    bottom: 16px;
    right: 16px;
  }
}

/* Dashboard-specific styles for a smaller button */
body.dashboard .go-to-top-button {
  width: 40px;
  height: 40px;
}

body.dashboard .go-to-top-button svg {
  width: 20px;
  height: 20px;
}

body.dashboard .go-to-top-button.mobile {
  width: 45px;
  height: 45px;
}

body.dashboard .go-to-top-button.mobile svg {
  width: 22px;
  height: 22px;
}
