/* 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;
}@import url('https://fonts.googleapis.com/css2?family=Jasmine+UPC&display=swap');
@font-face {
  font-family: 'GeminiGujarati';
  src: url('https://fonts.gstatic.com/ea/notosansgujarati/v6/NotoSansGujarati-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
/* Use JasmineUPC for all user/bot text and input area */
.prompt-form .prompt-input,
.chats-container .user-message .message-text,
.chats-container .bot-message .message-text {
  font-family: 'JasmineUPC', sans-serif !important;
  font-size: 1.3rem;
  line-height: 1.6;
}

/* Gujarati text font override */
.prompt-form .prompt-input:lang(gu),
.chats-container .user-message .message-text:lang(gu),
.chats-container .bot-message .message-text:lang(gu) {
  font-family: 'GeminiGujarati', 'JasmineUPC', sans-serif !important;
}

: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;
}
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;
}
body {
  color: var(--text-color);
  background: var(--primary-color);
}

.container {
  overflow-y: auto;
  padding: 32px 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;
}
.hero-title {
  font-size: 3rem; /* Bigger for bold impact */
  font-weight: 900; /* Extra-bold */
  letter-spacing: 0.5px; /* Slight spacing */
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  font-family: "Montserrat", sans-serif; /* Or replace with actual font from image */
}

.hero-title span {
  background: linear-gradient(90deg, #2a8cff, #9c5fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 3rem; /* Bigger for bold impact */
  font-weight: 900; /* Extra-bold */
  letter-spacing: 0.5px; /* Slight spacing */
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  font-family: "Montserrat", sans-serif;
}

.hero-subtitle {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--subheading-color);
  letter-spacing: 0.3px;
}

.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;
}
/* ======================= */
/* Pro Max Premium Cards   */
/* ======================= */

/* ======== Super Premium Suggestion Cards ======== */
/* Strong Premium Suggestion Cards - Dark Mode Safe */

/* Container layout */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}

/* Card base style */
.card {
  position: relative;
  padding: 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  transition: all 0.35s ease;
  overflow: hidden;
  min-height: 170px;
}

/* Hover animations */
.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

/* Decorative shine effect on hover */
.card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
  transform: rotate(25deg);
  transition: opacity 0.4s ease;
  opacity: 0;
}
.card:hover::before {
  opacity: 1;
}

/* Force text color dark in both themes */
body.light-theme .card h3,
body.light-theme .card p,
body:not(.light-theme) .card h3,
body:not(.light-theme) .card p {
  color: #111 !important;
}

/* Gradient background per card */
.card-blue {
  background: linear-gradient(135deg, #d0f0ff, #81d4fa);
}
.card-yellow {
  background: linear-gradient(135deg, #fff5cc, #fcd34d);
}
.card-green {
  background: linear-gradient(135deg, #d1fae5, #6ee7b7);
}
.card-purple {
  background: linear-gradient(135deg, #ede9fe, #c4b5fd);
}

/* Title */
.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

/* Paragraph */
.card p {
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Icon orb */
.icon-orb {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0.15));
  backdrop-filter: blur(6px);
  font-size: 1.15rem;
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover .icon-orb {
  transform: scale(1.1) rotate(6deg);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}




.container .chats-container {
  display: flex;
  gap: 20px;
  flex-direction: column;
}
.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 .user-message {
  flex-direction: column;
  align-items: flex-end;
}
.chats-container .user-message .message-text {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe); /* soft blue */
  border-radius: 1.2rem 1.2rem 0.3rem 1.2rem;
  padding: 1rem 1.3rem;
  font-size: 1rem;
  line-height: 1.6;
  font-family: 'Inter', sans-serif;
  color: #1e3a8a;
  max-width: 75%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.3);
}
.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);
}

/* Dark mode safe text */
body.dark-theme .chats-container .user-message .message-text {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

.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;
  }
}

.message {
  position: relative;
  padding-bottom: 30px;
}

.copy-btn-container {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.message:hover .copy-btn-container {
  opacity: 1;
}

.copy-btn {
  cursor: pointer;
  background: var(--secondary-color);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s ease;
}

.copy-btn:hover {
  background: var(--secondary-hover-color);
}

.checkmark {
  display: none;
  color: #10b981;
}

.copied .checkmark {
  display: block;
}

.copied .copy-icon {
  display: none;
}
/* Code block styles */
.code-block {
  background-color: #1f2937;
  color: #d1d5db;
  padding: 16px;
  margin: 10px 0;
  border-radius: 10px;
  overflow-x: auto;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  white-space: pre-wrap;
  line-height: 1.5;
}

.code-block code {
  font-family: inherit;
}

.code-wrapper {
  background-color: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  margin: 10px 0;
  overflow: hidden;
}

.code-header {
  background-color: #1e293b;
  color: #7dd3fc;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 8px 12px;
  text-transform: uppercase;
}

.code-block {
  background-color: #0f172a;
  color: #f1f5f9;
  padding: 16px;
  overflow-x: auto;
  font-family: "Fira Code", "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.message-text {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Poppins", sans-serif;
}

.emoji {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif !important;
  font-size: 1.1rem;
  margin-right: 0.25rem;
}

.chat-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3B82F6;
  margin-bottom: 0.5rem;
}

.chat-subheading {
  font-size: 1.25rem;
  font-weight: 600;
  color: #9333EA;
  margin: 1rem 0 0.5rem;
}

.chat-heading {
  font-size: 1.125rem;
  font-weight: 600;
  color: #059669;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.bot-list {
  padding-left: 1rem;
  margin: 0.25rem 0;
}

.bot-list li {
  margin: 0.3rem 0;
  list-style: none;
}

.emoji {
  width: 1.25em;
  height: 1.25em;
  margin-right: 0.3rem;
  vertical-align: middle;
}

/* ── Typing animation cursor ── */

.typing-caret {
  display: inline-block;
  color: #9b5de5;
  font-size: 1.2rem;
  margin-left: 4px;
  animation: blink 0.7s ease-in-out infinite;
  text-shadow: 0 0 6px #c084fc;
}


@media (max-width: 768px) {
  /* Stack AI messages vertically instead of side-by-side */
  .chats-container .message.bot-message {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Avatar centered or left-aligned at top */
  .chats-container .message.bot-message .avatar {
    width: 40px;
    height: 40px;
    margin: 0 0 6px 0; /* space below avatar */
    padding: 4px;
    align-self: flex-start;
  }

  /* Message text now full width */
  .chats-container .message.bot-message .message-text {
    max-width: 100%;
  }
}


/* Fractions */
.math {
  font-family: "Times New Roman", serif;
  background: #f9fafb;
  padding: 2px 4px;
  border-radius: 4px;
}

sup {
  font-size: 0.8em;
  vertical-align: super;
}
sub {
  font-size: 0.8em;
  vertical-align: sub;
}

.frac {
  display: inline-block;
  text-align: center;
  vertical-align: middle;
  margin: 0 2px;
}
.frac .top {
  display: block;
  border-bottom: 1px solid #000;
  padding: 0 2px;
}
.frac .bottom {
  display: block;
  padding: 0 2px;
}

.boxed {
  display: inline-block;
  border: 2px solid #2563eb;
  background: #dbeafe;
  padding: 6px 10px;
  margin: 2px 4px;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.math {
  font-family: "Times New Roman", serif;
  background: #f9fafb;
  padding: 2px 4px;
  border-radius: 4px;
}

sup { font-size: 0.8em; vertical-align: super; }
sub { font-size: 0.8em; vertical-align: sub; }

.frac {
  display: inline-block;
  text-align: center;
  vertical-align: middle;
  margin: 0 2px;
}
.frac .top {
  display: block;
  border-bottom: 1px solid #000;
  padding: 0 2px;
}
.frac .bottom {
  display: block;
  padding: 0 2px;
}

.ddot {
  position: relative;
}
.ddot::before {
  content: "¨"; /* two dots */
  font-size: 0.6em;
  position: absolute;
  top: -0.7em;
  left: 0.1em;
}
