@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");



html, body {
  background: #111 !important;
  color: #fff;
}

.fas-large {
  font-size: large;
}

#install-popup {
  font-family: Arial, sans-serif;
  text-align: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgb(51, 51, 51);
  color: white;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

/* Responsive */
@media (max-width: 480px) {
  #install-popup {
    padding: 15px;
    font-size: 14px;
  }
}


.chat-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding-bottom: 10rem;
  background: #111;
}

.chat-header {
  text-align: center;
  padding: 1rem;
  font-weight: bold;
  font-size: 1.25rem;
  background-color: transparent;
  border-radius: 12px 12px 0 0;
  color: white;
}

.chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: #111;
}

.chat-window::-webkit-scrollbar {
  width: 8px;
  background-color: #1e1e2f;
}

.chat-window::-webkit-scrollbar-thumb {
  background-color: #303030;
  border-radius: 10px;
}

.chat-window {
  scrollbar-width: thin;
  scrollbar-color: #303030 #111;
}

.chat-bubble {
  font-family: var(--font-family-base);
  font-size: var(--font-size-body);
  padding: 0.875rem 1.125rem;
  border-radius: 12px;
  line-height: 1.6;
  word-wrap: break-word;
  max-width: 95%;
}

.chat-bubble:first-child {
  margin-top: 4rem;
}

.chat-bubble pre {
  background-color: transparent;
  color: #ffffff;
  padding: 0.75rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: monospace;
  font-size: var(--font-size-code);
  line-height: 1.5;
}

.chat-bubble code {
  background-color: transparent;
  color: #ffcb6b;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: var(--font-size-code);
  line-height: 1.5;
}

.chat-bubble pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-family: monospace;
  font-size: var(--font-size-code);
  line-height: 1.5;
}

.chat-bubble ul,
.chat-bubble ol {
  padding-left: 1.5rem;
}

.chat-bubble blockquote {
  border-left: 4px solid #666;
  padding-left: 1rem;
  color: #ccc;
  font-style: italic;
}

.user-bubble {
  align-self: end;
  background-color: #2d6a4f;
  color: white;
  font-size: var(--font-size-body);
}

.ads-bubble {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: auto;
  width: 50%;
}

.ads-bubble .ad-container {
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid #333;
  border-top: 1px #333 solid;
}

/* Responsive: Full width on mobile */
@media (max-width: 960px) {
  .ads-bubble {
    width: 100%;
  }
}


.ai-bubble {
  align-self: start;
  background-color: #2c2c3a;
  color: white;
  font-size: clamp(1.05rem, 0.8vw + 0.4rem, 1.2rem);
}

.ai-bubble table{
  width: 100%;
}

.ai-bubble thead{
  background: #111;
}

tbody, td, tfoot, th, thead, tr {
  border-width: 1px;
  border-color: #444;
  padding: 0.25rem;
}


.cost-info {
  font-size: 0.8em;
  color: #888;
  margin-top: 4px;
  display: block;
}

.response-cost {
  text-align: left;
}

.chat-header {
  transition: opacity 0.5s ease;
}

.chat-input-container {
  border-top: 1px solid #333;
  padding: 1rem;
  background-color: #12121c;
  border-radius: 25px;
}

.chat-input-container .form-control:focus{
  box-shadow: none;
}

.chat-input-container  textarea::placeholder {
  color:#666
}

.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #999;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

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

#resetChat {
  position: fixed;
  top: 1.25rem;
  right: 2.5rem;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

body {
  scrollbar-width: thin;
  scrollbar-color: #888 #f1f1f1;
}

.loading-circle {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

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

img.user-uploaded {
  height: auto;
  border-radius: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 300px;
}

#nerd-stats {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-family: monospace;
  font-size: 12px;
  color: #ccc;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 9999;
  display: none;
}

:root {
  --font-family-base: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-size-h1: clamp(1.75rem, 1.2vw + 0.7rem, 2rem);    /* ~28px – 32px */
  --font-size-h2: clamp(1.5rem, 1vw + 0.6rem, 1.85rem);     /* ~24px – 29.6px */
  --font-size-h3: clamp(1.3rem, 0.85vw + 0.5rem, 1.6rem);   /* ~20.8px – 25.6px */
  --font-size-h4: clamp(1.1rem, 0.7vw + 0.4rem, 1.4rem);    /* ~17.6px – 22.4px */
  --font-size-h5: clamp(1rem, 0.6vw + 0.3rem, 1.2rem);      /* ~16px – 19.2px */
  --font-size-h6: clamp(0.9rem, 0.5vw + 0.2rem, 1.255rem);   /* ~14.4px – 16.8px */
  --font-size-body: clamp(1rem, 1vw + 0.2rem, 1.125rem);
  --font-size-small: clamp(0.95rem, 0.9vw + 0.25rem, 1.05rem);
  --font-size-code: clamp(0.95rem, 0.75vw + 0.3rem, 1.05rem);
  --font-size-input: clamp(1.05rem, 1.1vw + 0.25rem, 1.2rem);
  --font-size-button: clamp(1rem, 1vw + 0.3rem, 1.125rem);
  --font-size-label: clamp(0.95rem, 1vw + 0.25rem, 1.125rem);
  --font-size-blockquote: clamp(1.05rem, 1vw + 0.3rem, 1.2rem);
  --font-size-list: clamp(1rem, 0.8vw + 0.3rem, 1.125rem);
  --font-size-link: clamp(1rem, 0.85vw + 0.2rem, 1.15rem);
}

h1 {
  font-size: var(--font-size-h1);
}
h2 {
  font-size: var(--font-size-h2);
}
h3 {
  font-size: var(--font-size-h3);
}
h4 {
  font-size: var(--font-size-h4);
}
h5 {
  font-size: var(--font-size-h5);
}
h6 {
  font-size: var(--font-size-h6);
}

p {
  font-size: var(--font-size-body);
  margin-bottom: 1rem;
}

small {
  font-size: var(--font-size-small);
}

blockquote {
  font-size: var(--font-size-blockquote);
  font-style: italic;
  border-left: 4px solid #ccc;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #666;
}

label {
  font-size: var(--font-size-label);
  font-weight: 500;
}

input,
textarea,
select {
  font-size: var(--font-size-input);
  font-family: inherit;
}

button {
  font-size: var(--font-size-button);
  font-weight: 600;
  font-family: inherit;
}

a {
  font-size: var(--font-size-link);
  text-decoration: none;
  color: #0d6efd;
}

a:hover {
  text-decoration: underline;
}

ul,
ol {
  font-size: var(--font-size-body);
  line-height: 1.6;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  font-size: inherit;
  margin-bottom: 0.5rem;
}

.pg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.pg-overlay .pg-content {
  background: #222;
  color: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 90vw;
  position: relative;
  text-align: center;
}

.pg-overlay .btn-close {
  position: absolute;
  top: 10px;
  right: 10px;
  filter: invert(1);
}