:root {
  --primary-gradient: linear-gradient(135deg, #8A2BE2, #4A00E0);
  --accent-gradient: linear-gradient(135deg, #00C9FF, #92FE9D);
  --dark-bg: #10111A;
  --card-bg: rgba(30, 32, 46, 0.7);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --border-radius: 12px;
  --transition: all 0.3s ease;
  --chat-user: #8A2BE2;
  --chat-bot: #4A69BD;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', 'Roboto', sans-serif;
}

body {
  background: var(--dark-bg);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Live Aurora Background */
.aurora-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
}

.aurora {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: 
    radial-gradient(ellipse at top right, rgba(138, 43, 226, 0.2) 0%, transparent 40%),
    radial-gradient(ellipse at bottom left, rgba(0, 201, 255, 0.2) 0%, transparent 40%);
  filter: blur(20px);
  animation: aurora-movement 60s linear infinite alternate;
}

.aurora-beam {
  position: absolute;
  width: 200px;
  height: 800px;
  border-radius: 80px;
  filter: blur(30px);
  opacity: 0.3;
  transform-origin: bottom center;
  animation-duration: 15s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.beam-1 {
  background: linear-gradient(180deg, #9D50BB, #6E48AA, transparent);
  left: 10%;
  animation-name: aurora-beam-1;
}

.beam-2 {
  background: linear-gradient(180deg, #00C9FF, #92FE9D, transparent);
  left: 30%;
  animation-name: aurora-beam-2;
  animation-delay: 2s;
}

.beam-3 {
  background: linear-gradient(180deg, #8A2BE2, #4A00E0, transparent);
  left: 50%;
  animation-name: aurora-beam-3;
  animation-delay: 4s;
}

.beam-4 {
  background: linear-gradient(180deg, #00C9FF, #6E48AA, transparent);
  left: 70%;
  animation-name: aurora-beam-2;
  animation-delay: 6s;
}

.beam-5 {
  background: linear-gradient(180deg, #4A00E0, #92FE9D, transparent);
  left: 90%;
  animation-name: aurora-beam-1;
  animation-delay: 8s;
}

@keyframes aurora-movement {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(3deg) scale(1.1); }
  100% { transform: rotate(-3deg) scale(1); }
}

@keyframes aurora-beam-1 {
  0% { transform: translateY(0) rotate(-5deg); opacity: 0.2; }
  50% { transform: translateY(-200px) rotate(5deg); opacity: 0.5; }
  100% { transform: translateY(0) rotate(-5deg); opacity: 0.2; }
}

@keyframes aurora-beam-2 {
  0% { transform: translateY(0) rotate(5deg); opacity: 0.2; }
  50% { transform: translateY(-300px) rotate(-5deg); opacity: 0.4; }
  100% { transform: translateY(0) rotate(5deg); opacity: 0.2; }
}

@keyframes aurora-beam-3 {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.2; }
  50% { transform: translateY(-250px) rotate(0deg); opacity: 0.6; }
  100% { transform: translateY(0) rotate(0deg); opacity: 0.2; }
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  background: radial-gradient(1px 1px at 25px 5px, white, rgba(255, 255, 255, 0)),
              radial-gradient(1px 1px at 50px 25px, white, rgba(255, 255, 255, 0)),
              radial-gradient(1px 1px at 125px 20px, white, rgba(255, 255, 255, 0)),
              radial-gradient(1.5px 1.5px at 50px 75px, white, rgba(255, 255, 255, 0)),
              radial-gradient(2px 2px at 15px 125px, white, rgba(255, 255, 255, 0)),
              radial-gradient(2.5px 2.5px at 110px 80px, white, rgba(255, 255, 255, 0));
  background-repeat: repeat;
  background-size: 200px 200px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  padding: 20px 0;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 10px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 3px;
}

.tagline {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 15px;
}

/* Agent Navigation Tabs */
.agent-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 15px;
  gap: 8px;
  max-width: 100%;
}

.agent-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-weight: 500;
  border: 1px solid transparent;
  min-width: 80px;
}

.agent-tab:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.agent-tab.active {
  background: rgba(138, 43, 226, 0.4);
  color: white;
  border-color: rgba(138, 43, 226, 0.6);
}

.agent-icon {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.agent-name {
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.2;
}

/* Agent Content Containers */
.agent-content {
  display: none;
  flex-direction: column;
  flex: 1;
  height: calc(100vh - 280px);
  min-height: 400px;
}

.agent-content.active {
  display: flex;
}

.agent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 15px;
  background: rgba(30, 32, 46, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.agent-title .agent-icon {
  font-size: 1.3rem;
  margin-bottom: 0;
}

.agent-controls {
  display: flex;
  gap: 10px;
}

.reset-chat-btn, .documents-btn {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.reset-chat-btn:hover, .documents-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.documents-btn {
  background: rgba(138, 43, 226, 0.3);
  color: white;
}

.documents-btn:hover {
  background: rgba(138, 43, 226, 0.5);
}

/* Tab content containers */
.tab-content {
  display: none;
  flex: 1;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  margin-bottom: 20px;
  background: rgba(20, 22, 36, 0.4);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  
}

.message {
  max-width: 80%;
  padding: 12px 18px;
  margin-bottom: 15px;
  border-radius: 18px;
  position: relative;
  color: white;
  animation: fadeIn 0.3s ease;
}

.message-content {
  
  word-wrap: break-word;
  line-height: 1.5;
}

.message-content p {
  margin-bottom: 10px;
}

.message-content p:last-child {
  margin-bottom: 0;
}

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

.message.user {
  align-self: flex-end;
  background: var(--chat-user);
  border-bottom-right-radius: 4px;
}

.message.bot {
  align-self: flex-start;
  background: var(--chat-bot);
  border-bottom-left-radius: 4px;
}

.message-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 5px;
  text-align: right;
}

.input-container {
  position: relative;
  padding: 15px;
  background: rgba(30, 32, 46, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 10px;
}

.message-input {
  flex: 1;
  padding: 15px;
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 1rem;
  resize: none;
  outline: none;
  transition: var(--transition);
}

.message-input:focus {
  border-color: rgba(74, 0, 224, 0.5);
  box-shadow: 0 0 0 2px rgba(74, 0, 224, 0.25);
}

.actions {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.file-upload {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

.file-upload-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.file-upload-btn input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.paperclip-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 8px rgba(74, 0, 224, 0.2);
}

.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(74, 0, 224, 0.3);
}

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

.send-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-info {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 100%;
  padding: 10px;
  background: rgba(30, 32, 46, 0.9);
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: none;
}

.file-info.visible {
  display: block;
}

.credits-banner {
  text-align: center;
  padding: 8px 0;
  margin-top: 15px;
  color: white;
  font-size: 0.8rem;
  font-weight: 400;
  background: rgba(74, 0, 224, 0.6);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.credit-name {
  font-weight: 600;
  color: #FFFFFF;
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  background: var(--chat-bot);
  padding: 12px 18px;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  margin-bottom: 15px;
  align-self: flex-start;
  color: white;
}

.typing-dots {
  display: flex;
  gap: 4px;
  margin-left: 10px;
}

.dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: typingAnimation 1.4s infinite ease-in-out;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingAnimation {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* Make sure scrolling container has explicit height */
#chat-tab {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 250px);
  min-height: 300px;
}
.document-management {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: calc(100vh - 250px);
}

.document-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(30, 32, 46, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.document-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.document-actions {
  display: flex;
  gap: 10px;
}

.add-doc-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.add-doc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(74, 0, 224, 0.3);
}

.refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.refresh-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.documents-list {
  flex: 1;
  overflow-y: auto;
  background: rgba(20, 22, 36, 0.4);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0;
  max-height: calc(100vh - 390px);
  min-height: 200px;
}

.document-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeIn 0.3s ease;
}

.document-item:last-child {
  border-bottom: none;
}

.document-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.document-icon {
  width: 30px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.document-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.document-name {
  font-weight: 500;
  color: var(--text-primary);
}

.document-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.document-actions-btn {
  display: flex;
  gap: 10px;
}

.doc-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  border: none;
}

.doc-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.doc-action-btn.delete-btn:hover {
  background: rgba(255, 0, 0, 0.2);
  color: #ff6b6b;
}

.action-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  text-align: center;
  padding: 20px;
}

.empty-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
  opacity: 0.6;
}

.file-upload-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 10;
  justify-content: center;
  align-items: center;
}

.file-upload-modal {
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
}

.upload-section, .documents-section {
  margin-bottom: 20px;
}

.upload-section h3, .documents-section h3 {
  margin-bottom: 15px;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.documents-list-modal {
  max-height: 200px;
  overflow-y: auto;
  background: rgba(20, 22, 36, 0.4);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover {
  color: var(--text-primary);
}

.upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  padding: 30px 20px;
  text-align: center;
  margin-bottom: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.upload-area:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.03);
}

.upload-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 15px;
  opacity: 0.7;
}

.upload-text {
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.upload-info {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.selected-file {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 10px 15px;
  margin-bottom: 20px;
  display: none;
}

.selected-file.visible {
  display: block;
}

.file-name {
  font-weight: 500;
  margin-bottom: 5px;
}

.file-size {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.cancel-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.confirm-btn {
  padding: 8px 16px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.confirm-btn:hover {
  box-shadow: 0 4px 8px rgba(74, 0, 224, 0.3);
}

.confirm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  display: none;
}

.status-message.success {
  background: rgba(0, 200, 83, 0.2);
  color: #00c853;
  display: block;
}

.status-message.error {
  background: rgba(255, 0, 0, 0.2);
  color: #ff5252;
  display: block;
}

.status-message.loading {
  background: rgba(74, 0, 224, 0.2);
  color: #c5a8ff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Loading screen styles */
#loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-title {
  font-size: 3rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 30px;
}

.large-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: #8A2BE2;
  animation: spin 1s linear infinite;
}

.loading-message {
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Project info in header */
.project-info {
  background: rgba(138, 43, 226, 0.1);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #b794f6;
  display: inline-block;
  margin-left: 20px;
}

/* Session info styles */
.session-info {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card-bg);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  z-index: 100;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.session-info:hover {
  opacity: 1;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .agent-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }
  
  .agent-tab {
    min-width: 100px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
}

/* Print styles */
@media print {
  .aurora-container,
  .stars,
  .actions,
  .agent-tabs,
  .credits-banner {
    display: none;
  }
  
  .chat-container {
    max-height: none;
    overflow: visible;
  }
  
  .message {
    page-break-inside: avoid;
  }
}

/* Accessibility improvements */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for keyboard navigation */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(138, 43, 226, 0.5);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-gradient);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 10000;
}

.skip-to-content:focus {
  top: 0;
}

.tooltip {
  position: relative;
}

.tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  z-index: 10;
}

/* New CSS to ensure complete hiding of tabs */
.tab-content {
  display: none !important;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

.tab-content.active {
  display: flex !important;
  visibility: visible;
  height: auto;
  overflow: visible;
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  .message {
    max-width: 90%;
  }
  
  .input-container {
    padding: 10px;
  }
  
  .document-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .document-actions-btn {
    align-self: flex-end;
  }
  
  .agent-tabs {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .agent-tab {
    min-width: 70px;
    padding: 6px 8px;
  }
  
  .agent-icon {
    font-size: 1rem;
    margin-bottom: 2px;
  }
  
  .agent-name {
    font-size: 0.7rem;
  }
  
  .agent-content {
    height: calc(100vh - 320px);
    min-height: 300px;
  }
  
  .agent-header {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }
  
  .agent-controls {
    width: 100%;
    justify-content: center;
  }
  
  .reset-chat-btn, .documents-btn {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
}

/* Loading container for initial app load */
#loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.large-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #8A2BE2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}


.document-item-modal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s;
}

.document-item-modal:hover {
  background: rgba(255, 255, 255, 0.03);
}

.document-item-modal:last-child {
  border-bottom: none;
}

.doc-action-btn.view-btn {
  padding: 6px 12px;
  background: rgba(138, 43, 226, 0.2);
  color: #b794f6;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.doc-action-btn.view-btn:hover {
  background: rgba(138, 43, 226, 0.3);
  color: white;
}

.tooltip {
  position: relative;
}

.tooltip[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 0.75rem;
  white-space: nowrap;
  border-radius: 4px;
  margin-bottom: 5px;
  z-index: 1000;
}

.empty-list-modal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeIn 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  margin-bottom: 8px;
}

.document-item-modal:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.document-item-modal:hover {
  background: rgba(255, 255, 255, 0.05);
}

.document-item-modal .document-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.document-item-modal .document-icon {
  width: 24px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.document-item-modal .document-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.document-item-modal .document-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.document-item-modal .document-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.document-item-modal .agent-type {
  color: rgba(138, 43, 226, 0.8);
  font-weight: 500;
}

.document-item-modal .document-actions-btn {
  display: flex;
  gap: 6px;
}

.document-item-modal .doc-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  border: none;
  font-size: 0.8rem;
}

.document-item-modal .doc-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.document-item-modal .doc-action-btn.view-btn {
  background: rgba(138, 43, 226, 0.3);
  color: white;
  width: auto;
  padding: 4px 8px;
}

.document-item-modal .doc-action-btn.view-btn:hover {
  background: rgba(138, 43, 226, 0.5);
}

.document-item-modal .doc-action-btn.delete-btn:hover {
  background: rgba(255, 0, 0, 0.2);
  color: #ff6b6b;
}

.document-item-modal .action-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}