body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #e5e7eb;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.container {
  margin-top: 40px;
  width: 100%;
  max-width: 900px;
  padding: 24px;
  background: #020617;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border: 1px solid #1e293b;
}

h1 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 24px;
  color: #f9fafb;
}

.subtitle {
  margin-top: 0;
  margin-bottom: 16px;
  color: #9ca3af;
  font-size: 14px;
}

.section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #1e293b;
}

.section h2 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #e5e7eb;
}

.field {
  margin-bottom: 12px;
}

label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: #9ca3af;
}

input[type="text"],
input[type="password"],
input[type="url"],
textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #374151;
  background: #020617;
  color: #f9fafb;
  font-size: 14px;
  box-sizing: border-box;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

input[type="file"] {
  font-size: 13px;
  color: #e5e7eb;
}

button {
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  background: #22c55e;
  color: #022c22;
}

button.secondary {
  background: #0f172a;
  color: #e5e7eb;
  border: 1px solid #334155;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.output {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #020617;
  border: 1px solid #1e293b;
  font-size: 13px;
  white-space: pre-wrap;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.small {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

code {
  background: #020617;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 12px;
  color: #e5e7eb;
}

.hidden {
  display: none;
}

/* Vector Store List - Dark Theme */
#stores-list {
  margin-top: 20px;
}

.store-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid #444;
  border-radius: 6px;
  margin-bottom: 10px;
  background: #111;
  color: #eee;     
  gap: 8px;
}

.store-info div {
  margin-bottom: 4px;
}

.store-row code {
  background: #222;
  padding: 2px 4px;
  border-radius: 3px;
  color: #9cf;  
}

/* Buttons beside each store */
.store-actions {
  display: flex;
  gap: 8px;
}

.copy-btn,
.delete-btn {
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 6px;
  background: #222;
  color: #ccc;
  border: 1px solid #555;
  font-size: 18px;
  transition: background 0.2s, transform 0.1s;
}

.copy-btn:hover,
.delete-btn:hover {
  background: #333;
  transform: scale(1.1);
}

.copy-btn i,
.delete-btn i {
  pointer-events: none; /* ensure click is on the button, not the icon only */
}

/* Delete modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #111;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #444;
  color: #eee;
  max-width: 400px;
  width: 90%;
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-actions .danger {
  background: #b91c1c;
  border: none;
  color: #fff;
}

.modal-actions .danger:hover {
  background: #dc2626;
}

.modal-actions .secondary {
  background: #333;
  border: 1px solid #555;
  color: #eee;
}

/* Container for the whole query result */
.query-result-wrapper {
    text-align: left;
    white-space: normal; /* Overrides <pre> default */
    font-family: inherit;
    color: #e2e8f0;
}

/* The actual AI Answer box */
.answer-text {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #10b981;
    line-height: 1.6;
}

.api-integration-header {
    font-size: 0.8rem;
    font-weight: bold;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Code Snippet styling */
.code-snippet {
    background: #000000;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #334155;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
}

.snippet-label {
    display: block;
    color: #10b981;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.code-snippet code {
    color: #cbd5e1;
    display: block;
    white-space: pre-wrap;
}
