/* 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 theme colors */
  --text-color: #edf3ff;
  --subheading-color: #97a7ca;
  --placeholder-color: #c3cdde;
  --primary-color: #101623;
  --secondary-color: #283045;
  --secondary-hover-color: #333e58;
  --scrollbar-color: #626a7f;
  --text-color-rgb: 237, 243, 255;
}
body.light-theme {
  /* Light theme colors */
  --text-color: #090c13;
  --subheading-color: #7b8cae;
  --placeholder-color: #606982;
  --primary-color: #f3f7ff;
  --secondary-color: #dce6f9;
  --secondary-hover-color: #d2ddf2;
  --scrollbar-color: #a2aac2;
  --text-color-rgb: 9, 12, 19;
}
body {
  color: var(--text-color);
  background: var(--primary-color);
}
.container {
  overflow-y: auto;
  padding:  0 60px;
  height: calc(100vh - 127px);
  scrollbar-color: var(--scrollbar-color) transparent;
}
.container :where(.app-header, .suggestions, .message, .prompt-wrapper) {
  position: relative;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
  max-width: 990px;
}
.container .app-header {
  margin-top: 3vh;
}
.app-header .heading {
  width: fit-content;
  font-size: 3rem;
  background: linear-gradient(to right, #1d7efd, #8f6fff);
  /* This uses webkit-specific properties for gradient text */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.app-header .sub-heading {
  font-size: 2.6rem;
  margin-top: -5px;
  color: var(--subheading-color);
}
.container .suggestions {
  width: 100%;
  list-style: none;
  display: flex;
  gap: 15px;
  margin-top: 9.5vh;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
body.chats-active .container :where(.app-header, .suggestions) {
  display: none;
}
.suggestions .suggestions-item {
  cursor: pointer;
  padding: 18px;
  width: 228px;
  flex-shrink: 0;
  display: flex;
  scroll-snap-align: center;
  flex-direction: column;
  align-items: flex-end;
  border-radius: 12px;
  justify-content: space-between;
  background: var(--secondary-color);
  transition: 0.3s ease;
}
.suggestions .suggestions-item:hover {
  background: var(--secondary-hover-color);
}
.suggestions .suggestions-item .text {
  font-size: 1.1rem;
}
.suggestions .suggestions-item .icon {
  width: 45px;
  height: 45px;
  display: flex;
  font-size: 1.4rem;
  margin-top: 35px;
  align-self: flex-end;
  align-items: center;
  border-radius: 50%;
  justify-content: center;
  color: #1d7efd;
  background: var(--primary-color);
}
.suggestions .suggestions-item:nth-child(2) .icon {
  color: #28a745;
}
.suggestions .suggestions-item:nth-child(3) .icon {
  color: #ffc107;
}
.suggestions .suggestions-item:nth-child(4) .icon {
  color: #6f42c1;
}
.container .chats-container {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 40px; /* ← increase to match .prompt-container height */
  scroll-behavior: smooth;
}
/* ---------------------------------------------------- */
/* Markdown Render Styles for Bot Messages */
/* ---------------------------------------------------- */

.chats-container .bot-message .message-text.md-root {
  display: block;
  width: 100%;
  max-width: 85%;
  margin: 0;
  padding: 0.5em 1em;
  font-family: "Poppins", sans-serif;
  color: var(--text-color);
  word-break: break-word;
  overflow-x: auto;
  overflow-y: hidden;
}

.chats-container .bot-message .message-text.md-root > * {
  margin: 0.75em 0;
}
.chats-container .bot-message .message-text.md-root > :first-child {
  margin-top: 0;
}
.chats-container .bot-message .message-text.md-root > :last-child {
  margin-bottom: 0;
}
.chats-container .bot-message .message-text.md-root p {
  line-height: 1.5;
  margin: 0.5em 0;
}

/* Tables */
.chats-container .bot-message .message-text.md-root table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(var(--text-color-rgb), 0.2);
  margin: 0.75em 0;
  display: block;
  overflow-x: auto;
}
.chats-container .bot-message .message-text.md-root th,
.chats-container .bot-message .message-text.md-root td {
  padding: 0.5em;
  border: 1px solid rgba(var(--text-color-rgb), 0.2);
}
.chats-container .bot-message .message-text.md-root thead {
  background: rgba(var(--text-color-rgb), 0.05);
}

/* Code & Pre blocks */
.chats-container .bot-message .message-text.md-root code {
  background: rgba(var(--text-color-rgb), 0.05);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
}
.chats-container .bot-message .message-text.md-root pre {
  background: rgba(var(--text-color-rgb), 0.05);
  padding: 0.75em 1em;
  border-radius: 6px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.9em;
  line-height: 1.5;
}

/* Lists */
.chats-container .bot-message .message-text.md-root ul,
.chats-container .bot-message .message-text.md-root ol {
  margin-left: 1.75em;
  padding-left: 0;
}
.chats-container .bot-message .message-text.md-root li {
  margin: 0.5em 0;
  line-height: 1.5;
}

.chats-container .bot-message .message-text.md-root h1,
.chats-container .bot-message .message-text.md-root h2,
.chats-container .bot-message .message-text.md-root h3 {
  margin: 1em 0 0.5em;
  font-weight: 600;
  color: var(--text-color);
  /* New: Set heading size to match message font */
  font-size: 1.15rem; /* Adjust this value as you like! */
  /* Optionally: Smaller margin for h3 */
  /* margin: 0.8em 0 0.4em; */
}

/* Blockquotes */
.chats-container .bot-message .message-text.md-root blockquote {
  margin: 0.75em 0;
  padding: 0.5em 1em;
  color: var(--subheading-color);
  border-left: 3px solid rgba(var(--text-color-rgb), 0.2);
  background: rgba(var(--text-color-rgb), 0.03);
  border-radius: 0 4px 4px 0;
}

/* Inline formatting */
.chats-container .bot-message .message-text.md-root strong,
.chats-container .bot-message .message-text.md-root b {
  font-weight: 600;
}
.chats-container .bot-message .message-text.md-root em,
.chats-container .bot-message .message-text.md-root i {
  font-style: italic;
}

/* Responsive fix for tables on small screens */
@media (max-width: 768px) {
  .chats-container .bot-message .message-text.md-root table {
    font-size: 0.9em;
  }
}


.chats-container .message {
  display: flex;
  gap: 11px;
  align-items: center;
}
.chats-container .message .avatar {
  width: 43px;
  height: 43px;
  flex-shrink: 0;
  align-self: flex-start;
  border-radius: 50%;
  padding: 6px;
  margin-right: -7px;
  background: var(--secondary-color);
  border: 1px solid var(--secondary-hover-color);
}
.chats-container .message.loading .avatar {
  animation: rotate 3s linear infinite;
}
@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}
.chats-container .message .message-text {
  padding: 3px 16px;
  word-wrap: break-word;
  white-space: pre-line;
}
.chats-container .bot-message {
  margin: 9px auto;
}
.chats-container .user-message {
  flex-direction: column;
  align-items: flex-end;
}
.chats-container .user-message .message-text {
  padding: 12px 16px;
  max-width: 75%;
  background: var(--secondary-color);
  border-radius: 13px 13px 3px 13px;
}
.chats-container .user-message .img-attachment {
  margin-top: -7px;
  width: 50%;
  border-radius: 13px 3px 13px 13px;
}
.chats-container .user-message .file-attachment {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px;
  margin-top: -7px;
  border-radius: 13px 3px 13px 13px;
  background: var(--secondary-color);
}
.chats-container .user-message .file-attachment span {
  color: #1d7efd;
}
.container .prompt-container {
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 0;
  padding: 16px 0;
  background: var(--primary-color);
}
.prompt-container :where(.prompt-wrapper, .prompt-form, .prompt-actions) {
  display: flex;
  gap: 12px;
  height: 56px;
  align-items: center;
}
.prompt-container .prompt-form {
  height: 100%;
  width: 100%;
  border-radius: 130px;
  background: var(--secondary-color);
}
.prompt-form .prompt-input {
  width: 100%;
  height: 100%;
  background: none;
  outline: none;
  border: none;
  font-size: 1rem;
  color: var(--text-color);
  padding-left: 24px;
}
.prompt-form .prompt-input::placeholder {
  color: var(--placeholder-color);
}
.prompt-wrapper button {
  width: 56px;
  height: 100%;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
  font-size: 1.4rem;
  border: none;
  color: var(--text-color);
  background: var(--secondary-color);
  transition: 0.3s ease;
}
.prompt-wrapper :is(button:hover, #cancel-file-btn, .file-icon) {
  background: var(--secondary-hover-color);
}
.prompt-form .prompt-actions {
  gap: 5px;
  margin-right: 7px;
}
.prompt-wrapper .prompt-form :where(.file-upload-wrapper, button, img) {
  position: relative;
  height: 45px;
  width: 45px;
}
.prompt-form .prompt-actions #send-prompt-btn {
  color: #fff;
  display: none;
  background: #1d7efd;
}
.prompt-form .prompt-input:valid~.prompt-actions #send-prompt-btn {
  display: block;
}
.prompt-form #send-prompt-btn:hover {
  background: #0264e3;
}
.prompt-form .file-upload-wrapper :where(button, img) {
  display: none;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
}
.prompt-form .file-upload-wrapper.active #add-file-btn {
  display: none;
}
.prompt-form .file-upload-wrapper #add-file-btn,
.prompt-form .file-upload-wrapper.active.img-attached img,
.prompt-form .file-upload-wrapper.active.file-attached .file-icon,
.prompt-form .file-upload-wrapper.active:hover #cancel-file-btn {
  display: block;
}
.prompt-form :is(#stop-response-btn:hover, #cancel-file-btn) {
  color: #d62939;
}
.prompt-wrapper .prompt-form .file-icon {
  color: #1d7efd;
}
.prompt-form #stop-response-btn,
body.bot-responding .prompt-form .file-upload-wrapper {
  display: none;
}
body.bot-responding .prompt-form #stop-response-btn {
  display: block;
}
.prompt-container .disclaimer-text {
  font-size: 0.9rem;
  text-align: center;
  padding: 16px 20px 0;
  color: var(--placeholder-color);
}
/* Responsive media query code for small screens */
@media (max-width: 768px) {
  .container {
    padding: 20px 0 100px;
  }
  .app-header :is(.heading, .sub-heading) {
    font-size: 2rem;
    line-height: 1.4;
  }
  .app-header .sub-heading {
    font-size: 1.7rem;
  }
  .container .chats-container {
    gap: 15px;
  }
  .chats-container .bot-message {
    margin: 4px auto;
  }
  .prompt-container :where(.prompt-wrapper, .prompt-form, .prompt-actions) {
    gap: 8px;
    height: 53px;
  }
  .prompt-container button {
    width: 53px;
  }
  .prompt-form :is(.file-upload-wrapper, button, img) {
    height: 42px;
    width: 42px;
  }
  .prompt-form .prompt-input {
    padding-left: 20px;
  }
  .prompt-form .file-upload-wrapper.active #cancel-file-btn {
    opacity: 0;
  }
  .prompt-wrapper.hide-controls :where(#theme-toggle-btn, #delete-chats-btn) {
    display: none;
  }
}
.main-page22{
  text-decoration: none;
  font-size: 30px;
  padding-left: 18px;
  padding-top: 20px;
  color: aliceblue;
}
/*-------------------------------------*/
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 24px;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.05); /* fallback before theme override */
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-theme .navbar {
  background: rgba(28, 37, 54, 0.4);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.glassy-nav {
  border-radius: 16px;
  margin: 2px auto;
  width: fit-content;
  padding: 0 32px;
  margin-top: 15px;
}


.navbar-logo {
  font-size: 28px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-color);
  transition: 0.3s ease;
}


/* Glow animation */
.glow {
  animation: glowPulse 2.4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% {
    text-shadow: 0 0 5px #1d7efd, 0 0 10px #1d7efd;
  }
  100% {
    text-shadow: 0 0 10px #1d7efd, 0 0 20px #1d7efd;
  }
}

.fade-in-bottom {
  animation: fadeInBottom 0.5s ease-in-out;
}

@keyframes fadeInBottom {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar {
  transition: all 0.3s ease;
}

.navbar.shrink {
  transform: scale(0.9);
  opacity: 0.85;
  margin-top: 0;
  padding-top: 4px;
}
/* Add to style.css */
.chats-container .bot-message .message-text.md-root pre {
  overflow-x: auto;
  max-width: 100%;
  white-space: pre-wrap;
}