@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Rajdhani:wght@600;700&family=Orbitron:wght@700;900&display=swap');

/* ── SPLASH SCREEN - Clean & Professional ── */
#splash {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splashContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  animation: splashFadeIn 0.8s ease forwards;
}

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

.splashLogo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 24px;
  animation: splashLogoIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes splashLogoIn {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

.splashName {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  letter-spacing: 6px;
  background: linear-gradient(90deg, #00ff88, #00ccff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: splashFadeIn 0.8s ease 0.3s both;
}

.splashTagline {
  font-size: 13px;
  color: #444;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: splashFadeIn 0.8s ease 0.5s both;
}



/* GLOBAL */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, Arial, sans-serif;
}

body {
  height: 100vh;
  background: #0f0f0f;
  color: white;
  overflow: hidden;
}

/* SPLASH SCREEN */










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




  70%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}






  100% { opacity: 1; transform: translateY(0); }
}









@keyframes dotBounce {
  0%, 80%, 100% { background: #333; transform: scale(1); }
  40%            { background: #00ff88; transform: scale(1.5); box-shadow: 0 0 8px #00ff88; }
}

/* TOPBAR */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: #222;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  z-index: 1100;
}

.topTitle {
  font-size: 16px;
  font-weight: 600;
}

/* SIDEBAR */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100%;
  background: #171717;
  border-right: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  padding: 15px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.sidebar.show {
  transform: translateX(0);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.newchat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: none;
  background: #262626;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 15px;
}

.newchat:hover {
  background: #333;
}

.searchBox {
  padding: 8px;
  border: none;
  border-radius: 6px;
  background: #1f1f1f;
  color: white;
  margin-bottom: 15px;
}

/* CHAT HISTORY */
.history {
  flex: 1;
  overflow-y: auto;
}

.chatGroup {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 15px;
  margin-bottom: 6px;
}

.chatItem {
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatItem:hover {
  background: #262626;
}

.chatTitle {
  font-size: 14px;
}

.menuBtn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.chatMenu {
  position: absolute;
  background: #1e1e1e;
  padding: 5px;
  border-radius: 6px;
  display: none;
}

/* MAIN AREA */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  margin-top: 50px;
  height: calc(100vh - 50px);
}

/* WELCOME SCREEN */
.welcomeScreen {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.welcomeTitle {
  font-size: 28px;
  margin-bottom: 20px;
}

.suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.suggestions button {
  padding: 10px;
  border: none;
  background: #1e1e1e;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

.suggestions button:hover {
  background: #2a2a2a;
}

/* CHAT */
.chatWrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* MESSAGE ROW */
.messageRow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.userRow {
  justify-content: flex-end;
}

/* AVATAR */


/* BUBBLES */
.userBubble {
  background: #2f2f2f;
  color: #ececec;
  padding: 10px 16px;
  border-radius: 18px;
  max-width: 70%;
  font-weight: 400;
  line-height: 1.7;
}

.aiContent {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aiBubble {
  background: #1e1e1e;
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 65%;
}

/* TYPING */
.typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #aaa;
  border-radius: 50%;
  margin-right: 3px;
  animation: blink 1s infinite alternate;
}

.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }

@keyframes blink {
  from { opacity: 0.2; }
  to   { opacity: 1; }
}

/* ACTION BUTTONS */
.aiActions {
  display: flex;
  gap: 6px;
}

.actionBtn {
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  opacity: 0.8;
}

.actionBtn svg {
  stroke: white;
}

.actionBtn:hover {
  opacity: 1;
}

/* CODE BLOCK */
pre {
  position: relative;
  background: #0c0c0c;
  padding: 10px;
  border-radius: 6px;
  overflow: auto;
}

.codeCopy {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #333;
  border: none;
  color: white;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
}

/* INPUT AREA */
.inputArea {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0;
  border: none;
}

.inputWrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e1e1e;
  padding: 12px;
  border-radius: 20px;
  width: 600px;
  max-width: 90%;
}

.inputWrap input {
  flex: 1;
  background: none;
  border: none;
  color: white;
  outline: none;
  font-size: 16px;
}

.modeBtn {
  background: #333;
  border: none;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.assistant,
.send {
  background: none;
  border: none;
  cursor: pointer;
}

/* SCROLL BUTTON */
#scrollDownBtn {
  position: absolute;
  bottom: 20px;
  right: 25px;
  background: #2a2a2a;
  border: none;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: none;
}

/* AFTER FIRST MESSAGE */
.chat-started .inputArea {
  position: fixed;
  bottom: 0;
  top: auto;
  left: 0;
  transform: none;
  padding: 10px;
  background: #0f0f0f;
  border-top: 1px solid #2a2a2a;
}

/* FILE UPLOAD */
#uploadBtn {
  background: transparent;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  margin-right: 4px;
  padding: 0 6px;
  line-height: 1;
}

#filePreview {
  color: #aaa;
  font-size: 12px;
  margin-right: 6px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

#clearFile {
  background: rgba(255,255,255,0.08);
  border: none;
  color: #aaa;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: all 0.15s;
}
#clearFile:hover {
  background: rgba(255,80,80,0.2);
  color: #ff6666;
}

/* DELETE BUTTON IN SIDEBAR */
.deleteBtn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.chatItem:hover .deleteBtn {
  opacity: 1;
}

.deleteBtn:hover {
  background: #3a1a1a;
}

.chatTitle {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* CONFIRM DELETE DIALOG */
.confirmOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 8000;
}

.confirmDialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 28px 32px;
  z-index: 8001;
  text-align: center;
  min-width: 260px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  0%   { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.confirmIcon {
  font-size: 36px;
  margin-bottom: 12px;
}

.confirmText {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin-bottom: 6px;
}

.confirmSub {
  font-size: 13px;
  color: #666;
  margin-bottom: 24px;
}

.confirmBtns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirmCancel {
  padding: 10px 22px;
  background: #2a2a2a;
  border: 1px solid #444;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.confirmCancel:hover {
  background: #333;
}

.confirmDelete {
  padding: 10px 22px;
  background: #dc2626;
  border: none;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.confirmDelete:hover {
  background: #ef4444;
}

/* ── NEW SIDEBAR ── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 270px;
  height: 100%;
  background: #111;
  border-right: 1px solid #222;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  overflow: hidden;
}

.sidebar.show { transform: translateX(0); }

.sidebarTop {
  margin-bottom: 20px;
  padding: 0 4px;
}

.sidebarBrand {
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.newChatBtn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e05a2b;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 8px;
  transition: background 0.2s;
}

.newChatBtn:hover { background: #1a1a1a; }

/* NAV ITEMS */
.sidebarNav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.navItem {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  color: #888;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, color 0.2s;
  width: 100%;
}

.navItem:hover {
  background: #1e1e1e;
  color: #ccc;
}

.navItem.active {
  background: #1e1e1e;
  color: white;
}

.sidebarDivider {
  height: 1px;
  background: #222;
  margin: 10px 0;
}

.recentsLabel {
  font-size: 12px;
  color: #555;
  padding: 4px 12px 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.searchBox {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: #1a1a1a;
  color: white;
  font-size: 13px;
  margin-bottom: 8px;
  outline: none;
}

.sidebarSection {
  flex: 1;
  overflow-y: auto;
}

/* CHAT ITEMS */
.chatItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  gap: 8px;
  transition: background 0.15s;
}

.chatItem:hover { background: #1e1e1e; }

.chatTitle {
  font-size: 14px;
  color: #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.deleteBtn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 2px 5px;
  border-radius: 6px;
  flex-shrink: 0;
}

.chatItem:hover .deleteBtn { opacity: 1; }
.deleteBtn:hover { background: #3a1a1a; }

/* EMPTY SECTION */
.emptySection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: #444;
  font-size: 13px;
  text-align: center;
}

/* BOTTOM PROFILE */
.sidebarProfile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  border-top: 1px solid #222;
  margin-top: auto;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s;
}

.sidebarProfile:hover { background: #1a1a1a; }

.profileAvatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #333;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.profileInfo {
  flex: 1;
  overflow: hidden;
}

.profileName {
  font-size: 14px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profileSub {
  font-size: 11px;
  color: #555;
}

.profileSettings {
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.profileSettings:hover {
  color: white;
  background: #2a2a2a;
}

/* ── SETTINGS MODAL ── */
.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modalOverlay.show {
  display: flex;
}

.modalBox {
  background: #111;
  border: 1px solid #222;
  border-radius: 20px;
  width: 480px;
  max-width: 95vw;
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.modalBox::-webkit-scrollbar {
  width: 4px;
}

.modalBox::-webkit-scrollbar-track {
  background: transparent;
}

.modalBox::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #1e1e1e;
  position: sticky;
  top: 0;
  background: #111;
  z-index: 1;
}

.modalTitle {
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.modalClose {
  background: #1e1e1e;
  border: none;
  color: #aaa;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.modalClose:hover { background: #2a2a2a; color: white; }

/* SETTINGS TABS */
.settingsTabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  border-bottom: 1px solid #1e1e1e;
  overflow-x: auto;
  scrollbar-width: none;
}

.sTab {
  background: none;
  border: none;
  color: #666;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.sTab:hover { background: #1e1e1e; color: #ccc; }
.sTab.active { background: #1e1e1e; color: white; }
.sTab.danger { color: #ef4444; }
.sTab.danger.active { background: #2a0a0a; color: #ef4444; }

/* TAB CONTENT */
.sTabContent { display: none; padding: 20px 24px; }
.sTabContent.active { display: block; }

.sSection {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #1a1a1a;
}

.sSection:last-child { border-bottom: none; margin-bottom: 0; }

.sLabel {
  font-size: 12px;
  color: #888;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.sHint {
  font-size: 12px;
  color: #555;
  margin-top: 6px;
}

.sRow {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sInput {
  width: 100%;
  padding: 11px 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.sInput:focus { border-color: #00ff88; }

.sSaveBtn {
  padding: 10px 18px;
  background: linear-gradient(135deg, #00cc6a, #00aaff);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.sSaveBtn:hover { opacity: 0.85; }

/* THEME BUTTONS */
.themeOptions {
  display: flex;
  gap: 10px;
}

.themeBtn {
  flex: 1;
  padding: 14px;
  background: #1a1a1a;
  border: 2px solid #2a2a2a;
  border-radius: 12px;
  color: #aaa;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.themeBtn.active {
  border-color: #00ff88;
  color: white;
  background: #0a2a1a;
}

/* FONT SIZE BUTTONS */
.fontBtn {
  flex: 1;
  padding: 10px;
  background: #1a1a1a;
  border: 2px solid #2a2a2a;
  border-radius: 10px;
  color: #aaa;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.fontBtn.active {
  border-color: #00ccff;
  color: white;
}

/* SELECT */
.sSelect {
  width: 100%;
  padding: 11px 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  outline: none;
  cursor: pointer;
}

/* TOGGLE SWITCH */
.sToggleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #1a1a1a;
}

.sToggleRow:last-child { border-bottom: none; }

.sToggleLabel {
  font-size: 14px;
  color: white;
  font-weight: 500;
  margin-bottom: 2px;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggleSlider {
  position: absolute;
  inset: 0;
  background: #2a2a2a;
  border-radius: 24px;
  cursor: pointer;
  transition: 0.3s;
}

.toggleSlider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle input:checked + .toggleSlider { background: #00cc6a; }
.toggle input:checked + .toggleSlider::before { transform: translateX(20px); }

/* DANGER ZONE */
.sDangerBox {
  background: #1a0a0a;
  border: 1px solid #3a1a1a;
  border-radius: 12px;
  padding: 16px;
}

.sDangerTitle {
  font-size: 15px;
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 6px;
}

.sDangerDesc {
  font-size: 13px;
  color: #888;
  margin-bottom: 14px;
}

.sDangerBtn {
  padding: 10px 18px;
  background: #dc2626;
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.sDangerBtn:hover { background: #ef4444; }

/* SETTINGS MSG */
.settingsMsg {
  margin: 0 24px;
  padding: 0;
  font-size: 13px;
  border-radius: 8px;
  overflow: hidden;
  max-height: 0;
  transition: all 0.3s;
}

.settingsMsg.success {
  padding: 10px 14px;
  background: #0a2a1a;
  border: 1px solid #104410;
  color: #44ff88;
  max-height: 60px;
  margin: 8px 24px;
}

.settingsMsg.error {
  padding: 10px 14px;
  background: #2a1010;
  border: 1px solid #441010;
  color: #ff6666;
  max-height: 60px;
  margin: 8px 24px;
}

/* LIGHT THEME */
body.light {
  background: #f5f5f5;
  color: #111;
}

body.light .topbar { background: #fff; border-bottom: 1px solid #e0e0e0; color: #111; }
body.light .sidebar { background: #fafafa; border-right: 1px solid #e0e0e0; }
body.light .sidebarBrand { color: #111; }
body.light .navItem { color: #666; }
body.light .navItem.active, body.light .navItem:hover { background: #efefef; color: #111; }
body.light .chatItem:hover { background: #efefef; }
body.light .chatTitle { color: #333; }
body.light .main { background: #f5f5f5; }
body.light .inputWrap { background: #fff; border: 1px solid #e0e0e0; }
body.light .inputWrap input { color: #111; }
body.light .aiBubble { background: #fff; color: #111; border: 1px solid #e0e0e0; }
body.light .userBubble { background: #1a1a2e; color: #e8e8ff !important; border-color: #2a2a4a; }
body.light .modalBox { background: #fff; border-color: #e0e0e0; }
body.light .modalHeader { background: #fff; }
body.light .sInput { background: #f5f5f5; border-color: #ddd; color: #111; }
body.light .sSelect { background: #f5f5f5; border-color: #ddd; color: #111; }
body.light .sidebarProfile { border-top-color: #e0e0e0; }
body.light .profileName { color: #111; }

/* Light theme - comprehensive fixes for all invisible text */
body.light .topTitle { color: #111 !important; }
body.light .chatBox { background: #f5f5f5; }
body.light .messageRow { color: #111; }

/* AI bubble */
body.light .aiBubble { background: #f9f9f9; color: #111 !important; border: 1px solid #eaeaea; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
body.light .aiBubble p { color: #111 !important; }
body.light .aiBubble li { color: #111 !important; }
body.light .aiBubble h1, body.light .aiBubble h2, body.light .aiBubble h3 { color: #111 !important; }
body.light .aiBubble strong { color: #000 !important; }
body.light .aiBubble code { background: #f0f0f0; color: #d63031; }
body.light .aiBubble pre { background: #f0f0f0; border: 1px solid #ddd; }
body.light .aiBubble pre code { color: #2d3436; }
body.light .stream { color: #111 !important; }

/* User bubble */
body.light .userBubble { background: #111; color: #fff !important; }

/* Input area */
body.light .inputWrap { background: #fff; border: 1px solid #ddd; }
body.light #message { color: #111 !important; background: transparent; }
body.light #message::placeholder { color: #aaa; }
body.light .sendBtn { background: #111; color: #fff; }
body.light .micBtn { color: #666; }

/* Model pill */
body.light .inputModelSingle { background: #f0f0f0; border-color: #ddd; color: #111; }
body.light .activeModelName { color: #111; }
body.light .modelDropdown { background: #fff; border-color: #ddd; }
body.light .modelDropItem { color: #111; }
body.light .modelDropItem:hover { background: #f5f5f5; }

/* Sidebar */
body.light .sidebar { background: #fafafa; }
body.light .chatTitle { color: #333 !important; }
body.light .chatTime { color: #999 !important; }
body.light .sectionLabel { color: #999 !important; }
body.light #history { color: #333; }
body.light .newChatBtn { background: #111; color: #fff; }

/* Welcome screen */
body.light .welcomeScreen { background: #f5f5f5; }
body.light .welcomeTitle { color: #111 !important; }
body.light .welcomeSub { color: #888 !important; }
body.light .chip { background: #fff; border-color: #e0e0e0; color: #333 !important; }
body.light .chip:hover { background: #f0f0f0; color: #111 !important; }

/* Topbar icons */
body.light .topIconBtn { color: #666; border-color: #e0e0e0; }
body.light .topIconBtn:hover { background: #f0f0f0; color: #111; }

/* Thinking animation */
body.light .thinkLabel { color: #666 !important; }

/* Code blocks */
body.light .codeBlock { background: #f8f8f8; border: 1px solid #e0e0e0; }
body.light .codeLang { color: #666; background: #eee; }
body.light .copyCodeBtn { color: #666; }

/* Action buttons */
body.light .actionBtn { color: #999; }
body.light .actionBtn:hover { color: #333; background: #f0f0f0; }

/* Toast */
body.light .toast { background: #333; color: #fff; }



/* WEB SEARCH INDICATOR */
.searchingIndicator {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px 16px !important;
  background: #0a1a2a !important;
  border: 1px solid #0a3a5a !important;
}

.searchIcon {
  font-size: 16px;
  animation: spin 1.5s linear infinite;
  display: inline-block;
}

.searchText {
  font-size: 13px;
  color: #4fc3f7;
  letter-spacing: 0.3px;
}

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

/* CLEAN ACTION BUTTONS - ChatGPT style */
.aiActions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.messageRow:hover .aiActions {
  opacity: 1;
}

.actionBtn {
  background: none !important;
  border: none !important;
  color: #666 !important;
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s !important;
}

.actionBtn:hover {
  color: #ccc !important;
  background: #2a2a2a !important;
}

.actionBtn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.actionDivider {
  width: 1px;
  height: 14px;
  background: #333;
  margin: 0 4px;
}

.likeBtn.active { color: #00ff88 !important; }
.dislikeBtn.active { color: #ff4444 !important; }

/* Remove old aiBubble max-width restriction for better look */
.aiBubble {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2px 0;
  max-width: 100%;
  line-height: 1.8;
  position: relative;
}

.aiContent {
  max-width: 82%;
}

/* GENERATED IMAGE DISPLAY */
.aiBubble img {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 8px;
  border: 1px solid #2a2a2a;
  display: block;
}

.aiBubble img:hover {
  transform: scale(1.02);
  transition: transform 0.2s;
  cursor: zoom-in;
}

/* UPGRADE BUTTON IN SIDEBAR */
.upgradeBtn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #0a2a1a, #0a1a2a);
  border: 1px solid #00ff8833;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.upgradeBtn:hover {
  background: linear-gradient(135deg, #0a3a2a, #0a2a3a);
  border-color: #00ff8866;
}

.upgradeBtn span:first-child {
  font-size: 20px;
}

/* CUSTOM FONTS - Bold & Strong */
:root {
  --font-brand: 'Bebas Neue', sans-serif;
  --font-heading: 'Rajdhani', sans-serif;
  --font-tech: 'Orbitron', sans-serif;
}

/* App title in topbar */
.topTitle {
  font-family: var(--font-brand) !important;
  font-size: 22px !important;
  letter-spacing: 3px !important;
  background: linear-gradient(90deg, #00ff88, #00ccff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sidebar brand name */
.sidebarBrand {
  font-family: var(--font-brand) !important;
  font-size: 26px !important;
  letter-spacing: 3px !important;
  background: linear-gradient(90deg, #00ff88, #00ccff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Welcome title */
.welcomeTitle {
  font-family: var(--font-heading) !important;
  font-size: 36px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase;
}

/* Section titles in settings/pricing */
.sectionTitle, .modalTitle, .panelTitle, .heroTitle {
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
}

/* Nav items */
.navItem {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Splash title */


/* Plan names in pricing */
.planName {
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase;
}

/* Settings header */
.headerTitle {
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
}

/* New chat button */
.newChatBtn {
  font-family: var(--font-heading) !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
}

/* Profile name */
.profileName {
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
}

/* VOICE ASSISTANT */
.voiceOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  backdrop-filter: blur(20px);
}

.voiceOverlay.show { display: flex; }

.voiceOrb {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.voiceRing {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(0,255,136,0.3);
  animation: voicePulse 2s ease-out infinite;
}

.ring1 { width: 160px; height: 160px; animation-delay: 0s; }
.ring2 { width: 200px; height: 200px; animation-delay: 0.4s; }
.ring3 { width: 240px; height: 240px; animation-delay: 0.8s; }

@keyframes voicePulse {
  0%   { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.2); opacity: 0; }
}

.voiceCore {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00ff88, #00ccff);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 40px rgba(0,255,136,0.5);
  transition: transform 0.2s;
}

.voiceOrb.listening .voiceCore {
  animation: voiceBeat 0.5s ease infinite alternate;
  box-shadow: 0 0 60px rgba(0,255,136,0.8);
}

.voiceOrb.speaking .voiceCore {
  background: linear-gradient(135deg, #00ccff, #aa44ff);
  box-shadow: 0 0 60px rgba(0,200,255,0.8);
  animation: voiceBeat 0.3s ease infinite alternate;
}

@keyframes voiceBeat {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

.voiceStatus {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #aaa;
  letter-spacing: 1px;
}

.voiceText {
  font-size: 16px;
  color: white;
  text-align: center;
  max-width: 300px;
  min-height: 50px;
  line-height: 1.5;
  padding: 0 20px;
}

.voiceActions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.voiceActionBtn {
  padding: 12px 24px;
  border-radius: 30px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  background: #1e1e1e;
  color: white;
  border: 1px solid #333;
}

.voiceActionBtn:hover { background: #2a2a2a; }

.voiceActionBtn.active {
  background: linear-gradient(135deg, #00ff88, #00ccff);
  color: black;
  border: none;
}

.voiceCloseBtn { background: #2a1010 !important; color: #ff6666 !important; border-color: #441010 !important; }
.voiceCloseBtn:hover { background: #3a1010 !important; }

/* Voice button in input bar */
.assistant {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s;
}

.assistant:hover { color: #00ff88; background: #0a2a1a; }
.assistant.active { color: #00ff88; }

/* ── NEW INPUT BAR ── */
.inputArea {
  position: absolute !important;
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  top: auto !important;
  width: 100% !important;
  max-width: 720px !important;
  padding: 0 16px !important;
  background: none !important;
  border: none !important;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-started .inputArea {
  position: fixed !important;
  bottom: 16px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  top: auto !important;
  background: none !important;
  border: none !important;
  padding: 0 16px !important;
}

.inputWrap {
  background: #1a1a1a !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 50px !important;
  padding: 8px 8px 8px 16px !important;
  width: 100% !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex !important;
  flex-direction: column !important;
}

.inputWrap:focus-within {
  border-color: #333 !important;
  box-shadow: 0 4px 32px rgba(0,255,136,0.08);
}

.filePreviewWrap {
  padding: 4px 4px 8px 4px;
}

.filePreviewChip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #252525;
  border: 1px solid #333;
  border-radius: 20px;
  padding: 4px 10px 4px 12px;
  font-size: 12px;
  color: #aaa;
  max-width: 200px;
}

.filePreviewChip button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  line-height: 1;
}

.inputRow {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.inputRow #message {
  flex: 1;
  min-width: 0;
}

.inputRightBtns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.plusBtn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #252525;
  border: 1px solid #333;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.plusBtn:hover, .plusBtn.active {
  background: #2a2a2a;
  color: white;
  border-color: #444;
}

.plusBtn.active {
  transform: rotate(45deg);
}

#message {
  flex: 1;
  background: none !important;
  border: none !important;
  color: white !important;
  outline: none !important;
  font-size: 15px !important;
  padding: 6px 0 !important;
}

#message::placeholder { color: #555; }

.inputRightBtns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.iconBtn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: none;
  border: none;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.iconBtn:hover { color: #aaa; background: #252525; }

.sendBtn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.sendBtn:hover { background: #e0e0e0; transform: scale(1.05); }
.sendBtn svg { stroke: black; }

/* PLUS MENU */
.plusMenu {
  display: none;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 8px;
  margin-bottom: 8px;
  gap: 4px;
  flex-wrap: wrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: menuSlideUp 0.2s ease;
}

.plusMenu.show { display: flex; }

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

.plusMenuItem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #222;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.plusMenuItem:hover {
  background: #2a2a2a;
  border-color: #333;
}

.plusMenuIcon { font-size: 18px; }

/* Remove old button styles */
.modeBtn { display: none !important; }

/* IMAGE GENERATION - Gemini/ChatGPT Style */
.imageGenContainer {
  max-width: 420px;
  margin: 4px 0;
}

.imageGenLoader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  background: #1a1a1a;
  border-radius: 16px;
  border: 1px solid #2a2a2a;
}

.imageGenSpinner {
  width: 36px;
  height: 36px;
  border: 3px solid #2a2a2a;
  border-top-color: #00ff88;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.imageGenLoadText {
  font-size: 13px;
  color: #888;
  animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.imageGenResult {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  background: #111;
}

.generatedImg {
  width: 100%;
  display: block;
  border-radius: 16px 16px 0 0;
  max-height: 420px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.generatedImg:hover {
  transform: scale(1.01);
  cursor: zoom-in;
}

.imageGenActions {
  padding: 10px 12px;
  background: #111;
}

.imageGenPrompt {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.imageGenBtns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.imgActionBtn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.imgActionBtn:hover {
  background: #2a2a2a;
  color: white;
  border-color: #333;
}

.imgActionBtn svg { flex-shrink: 0; }

.likeImgBtn:hover { color: #00ff88 !important; border-color: #00ff8844 !important; }
.dislikeImgBtn:hover { color: #ff4444 !important; border-color: #ff444444 !important; }

/* ADD TO CHAT BOTTOM SHEET */








.sheetHandle {
  width: 36px;
  height: 4px;
  background: #333;
  border-radius: 4px;
  margin: 12px auto 0;
}

.sheetHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
}

.sheetTitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: white;
}

.sheetCloseBtn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #222;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.sheetCloseBtn:hover { background: #2a2a2a; color: white; }

.sheetTopBtns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px 16px;
}

.sheetBigBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px;
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 16px;
  color: #aaa;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Josefin Sans', sans-serif;
}
.sheetBigBtn:hover { background: #161616; border-color: #2a2a2a; color: white; }
.sheetBigBtn:active { transform: scale(0.96); }

.sheetBigIcon {
  width: 46px;
  height: 46px;
  background: #1a1a1a;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

.sheetDivider {
  height: 1px;
  background: #1e1e1e;
  margin: 0 16px;
}

.sheetRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.15s;
}

.sheetRow:hover { background: #161616; }

.sheetRowLeft {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sheetRowIcon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #1e1e1e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  flex-shrink: 0;
}

.sheetRowLabel {
  font-size: 15px;
  font-weight: 500;
  color: white;
}

.sheetRowSub {
  font-size: 12px;
  color: #666;
  margin-top: 1px;
}

.sheetRowArrow { color: #444; font-size: 20px; }

/* Sheet Toggle */
.sheetToggle {
  position: relative;
  width: 50px; height: 28px;
  flex-shrink: 0;
}

.sheetToggle input { opacity: 0; width: 0; height: 0; }

.sheetToggleTrack {
  position: absolute;
  inset: 0;
  background: #333;
  border-radius: 28px;
  cursor: pointer;
  transition: 0.3s;
}

.sheetToggleTrack::before {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.sheetToggle input:checked + .sheetToggleTrack { background: #fff; }
.sheetToggle input:checked + .sheetToggleTrack::before { transform: translateX(22px); background: #000; }

/* CLAUDE-STYLE INPUT BUTTONS */
.micBtn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: none;
  border: none;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.micBtn:hover { color: white; background: #2a2a2a; }
.micBtn.listening { color: #00ff88; animation: micPulse 1s infinite; }

@keyframes micPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}






  50% { box-shadow: 0 0 0 6px rgba(255,68,68,0); }
}

.sendBtn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: white !important;
  border: none !important;
  color: black !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  flex-shrink: 0 !important;
}

.sendBtn:hover { background: #e0e0e0 !important; transform: scale(1.05) !important; }
.sendBtn svg { stroke: black !important; fill: none !important; }

.sendBtn:disabled {
  background: #2a2a2a !important;
  cursor: not-allowed !important;
}

.sendBtn:disabled svg { stroke: #666 !important; }

/* CHATGPT-STYLE IMAGE GENERATION */
.imageGenWrap {
  max-width: 380px;
  margin: 4px 0;
}

.creatingLabel {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 12px;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.5px;
}

.imageGenBox {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #111;
}

.imageGradientPlaceholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #2a1a2e, #1a2a3a, #2a1a3a, #1a1a2a);
  background-size: 400% 400%;
  animation: gradientShift 3s ease infinite;
  border-radius: 16px;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.generatedImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.generatedImg:hover { transform: none; }

.imageGenActions {
  padding: 10px 0 0;
}

.imageGenBtns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.imgActionBtn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.imgActionBtn:hover { background: #2a2a2a; color: white; }
.likeImgBtn:hover { color: #00ff88 !important; border-color: #00ff8844 !important; }
.dislikeImgBtn:hover { color: #ff4444 !important; border-color: #ff444444 !important; }
.likeImgBtn.active { color: #00ff88; border-color: #00ff8844; }
.dislikeImgBtn.active { color: #ff4444; border-color: #ff444444; }

/* Remove old image styles */
.imageGenContainer { display: none !important; }
.imageGenLoader { display: none !important; }

/* FIX EXTRA SPACE IN INPUT BAR */
.inputArea {
  position: fixed !important;
  bottom: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  top: auto !important;
  width: calc(100% - 32px) !important;
  max-width: 680px !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
}

.chat-started .inputArea {
  position: fixed !important;
  bottom: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  top: auto !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

.inputWrap {
  background: #1c1c1c !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 50px !important;
  padding: 8px 8px 8px 16px !important;
  width: 100% !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  display: flex !important;
  flex-direction: column !important;
}

.inputRow {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}

#message {
  flex: 1 !important;
  min-width: 0 !important;
  background: none !important;
  border: none !important;
  color: white !important;
  outline: none !important;
  font-size: 15px !important;
  padding: 6px 0 !important;
}

.inputRightBtns {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
}

.plusBtn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #252525 !important;
  border: 1px solid #333 !important;
  color: #888 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  transition: all 0.2s !important;
}

/* DATTA AI UNIQUE IMAGE STYLE */
.dattaImgWrap {
  max-width: 360px;
  margin: 4px 0;
}

.dattaImgLabel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 10px;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.5px;
}

.dattaImgIcon { font-size: 16px; }

.dattaImgBox {
  border-radius: 20px;
  overflow: hidden;
  background: #111;
  border: 1px solid #222;
  aspect-ratio: 1;
  position: relative;
}

/* Shimmer loading */
.dattaShimmer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #0d0d0d;
}

.shimmerOrb {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #00ff88, #00ccff, #aa44ff, #00ff88);
  animation: orbSpin 2s linear infinite;
  box-shadow: 0 0 40px rgba(0,255,136,0.3);
}

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

.shimmerText {
  font-size: 13px;
  color: #555;
  letter-spacing: 1px;
  animation: shimmerFade 1.5s ease infinite;
}

@keyframes shimmerFade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.dattaImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  transition: opacity 0.6s ease;
  cursor: zoom-in;
}

.dattaImgActions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.dattaImgBtn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #161616;
  border: 1px solid #222;
  border-radius: 20px;
  color: #777;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.dattaImgBtn:hover { background: #1e1e1e; color: white; border-color: #333; }
.likeImgBtn:hover { color: #00ff88 !important; border-color: #00ff8833 !important; }
.dislikeImgBtn:hover { color: #ff4444 !important; border-color: #ff444433 !important; }
.likeImgBtn.active { color: #00ff88 !important; }
.dislikeImgBtn.active { color: #ff4444 !important; }

/* SUGGESTION CHIPS */
.suggestionChips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 20px;
  max-width: 560px;
  margin: 0 auto 20px;
  width: 100%;
}

.chip {
  padding: 12px 14px;
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 14px;
  color: #777;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.chip:hover {
  background: #161616;
  border-color: #00ff8833;
  color: #ddd;
  transform: translateY(-2px);
}

.chat-started .suggestionChips {
  display: none;
}

/* WELCOME SCREEN - Perfect Center */
.welcomeScreen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  text-align: center;
  width: 100%;
  max-width: 700px;
  padding: 0 20px;
  pointer-events: none;
}

.welcomeScreen * { pointer-events: all; }

.suggestionChips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: center !important;
  padding: 0 !important;
  max-width: 680px !important;
  margin: 16px auto 0 !important;
}

.chat-started .welcomeScreen,
.chat-started .suggestionChips {
  display: none !important;
}

/* PERFECT CENTER WELCOME */
.main {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  overflow: hidden !important;
}

.welcomeScreen {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -55%) !important;
  text-align: center !important;
  width: 100% !important;
  max-width: 680px !important;
  padding: 0 24px !important;
  z-index: 10 !important;
  pointer-events: none !important;
}

.welcomeScreen * { pointer-events: all !important; }

.welcomeTitle {
  font-family: 'Rajdhani', sans-serif !important;
  font-size: 32px !important;
  font-weight: 700 !important;
  color: white !important;
  letter-spacing: 1px !important;
  margin-bottom: 8px !important;
  text-transform: uppercase !important;
}

.welcomeSub {
  font-size: 14px !important;
  color: #555 !important;
  margin-bottom: 24px !important;
}

.suggestionChips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 100% !important;
}

.chip {
  padding: 9px 16px !important;
  background: #141414 !important;
  border: 1px solid #222 !important;
  border-radius: 20px !important;
  color: #888 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  white-space: nowrap !important;
}

.chip:hover {
  background: #1e1e1e !important;
  border-color: #00ff8833 !important;
  color: #ccc !important;
  transform: translateY(-2px) !important;
}

.chat-started .welcomeScreen {
  display: none !important;
}

/* CODE BLOCKS - Professional Style */
.codeBlockWrap {
  margin: 12px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  background: #0d0d0d;
}

.codeBlockHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #161616;
  border-bottom: 1px solid #222;
}

.codeLang {
  font-size: 12px;
  color: #666;
  font-family: monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.codeCopyBtn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.codeCopyBtn:hover {
  background: #252525;
  color: white;
  border-color: #333;
}

.aiBubble pre {
  margin: 0 !important;
  padding: 14px !important;
  background: #0d0d0d !important;
  border-radius: 0 !important;
  overflow-x: auto !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

.aiBubble code {
  font-family: 'Consolas', 'Monaco', monospace !important;
  font-size: 13px !important;
}

.aiBubble :not(pre) > code {
  background: #1a1a1a !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  color: #00ff88 !important;
  font-size: 12px !important;
}

/* MOBILE FIX - Suggestion Chips Grid */
@media (max-width: 768px) {
  .suggestionChips {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 0 16px !important;
  }

  .chip {
    white-space: normal !important;
    text-align: left !important;
    font-size: 12px !important;
    padding: 10px 12px !important;
    line-height: 1.3 !important;
  }

  .welcomeTitle {
    font-size: 22px !important;
  }

  .welcomeSub {
    font-size: 12px !important;
    margin-bottom: 16px !important;
  }

  .welcomeScreen {
    transform: translate(-50%, -58%) !important;
    padding: 0 !important;
  }
}

@media (max-width: 380px) {
  .suggestionChips {
    grid-template-columns: 1fr !important;
  }
}

/* ── TOP ACTIONS ── */
.topBar {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 12px 0 0 !important;
}

.topActions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.modelSelect {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  color: #aaa;
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.modelSelect:hover { border-color: #333; color: white; }
.modelSelect option { background: #1a1a1a; }

.themeToggleBtn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.themeToggleBtn:hover { background: #222; border-color: #333; }

.topIconBtn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.topIconBtn:hover { background: #222; color: #aaa; border-color: #333; }

/* ── LIGHT THEME ── */
body.light-theme {
  background: #f5f5f5 !important;
  color: #111 !important;
}

body.light-theme .sidebar { background: #fff !important; border-color: #e0e0e0 !important; }
body.light-theme .topBar { background: #fff !important; border-color: #e0e0e0 !important; }
body.light-theme .inputWrap { background: #fff !important; border-color: #ddd !important; }
body.light-theme .aiBubble { color: #111 !important; }
body.light-theme .userBubble { background: #e8e8e8 !important; color: #111 !important; }
body.light-theme .chatItem { background: transparent !important; color: #333 !important; }
body.light-theme .chatItem:hover { background: #f0f0f0 !important; }
body.light-theme .chip { background: #f0f0f0 !important; border-color: #ddd !important; color: #555 !important; }
body.light-theme .chip:hover { background: #e8e8e8 !important; color: #111 !important; }
body.light-theme .sidebarProfile { background: #f8f8f8 !important; border-color: #e0e0e0 !important; }
body.light-theme .modelSelect { background: #f0f0f0 !important; border-color: #ddd !important; color: #555 !important; }
body.light-theme .topIconBtn, body.light-theme .themeToggleBtn { background: #f0f0f0 !important; border-color: #ddd !important; }
body.light-theme .welcomeTitle { color: #111 !important; }
body.light-theme .welcomeSub { color: #888 !important; }
body.light-theme .main { background: #f5f5f5 !important; }
body.light-theme #message { color: #111 !important; }
body.light-theme #message::placeholder { color: #aaa !important; }
body.light-theme .sendBtn { background: #111 !important; }
body.light-theme .sendBtn svg { stroke: white !important; }
body.light-theme .codeBlockWrap { border-color: #ddd !important; }
body.light-theme .codeBlockHeader { background: #f0f0f0 !important; border-color: #ddd !important; }
body.light-theme pre { background: #f8f8f8 !important; }

/* MODEL PICKER BUTTON */
.modelPickerBtn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.5px;
}

.modelPickerBtn:hover {
  background: #222;
  border-color: #333;
  color: white;
}

/* MODEL PICKER OVERLAY */
.modelPickerOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  display: none;
  backdrop-filter: blur(4px);
}

.modelPickerOverlay.show { display: block; }

/* MODEL PICKER MODAL */
.modelPickerModal {
  position: fixed;
  top: 60px;
  right: 16px;
  width: 360px;
  max-height: 80vh;
  background: #111;
  border: 1px solid #222;
  border-radius: 20px;
  z-index: 2001;
  overflow: hidden;
  display: none;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: modelPickerIn 0.2s ease;
}

@media (max-width: 480px) {
  .modelPickerModal {
    right: 8px;
    left: 8px;
    width: auto;
    top: 56px;
  }
}

@keyframes modelPickerIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modelPickerModal.show { display: flex; }

.modelPickerHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #1e1e1e;
}

.modelPickerTitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: white;
}

.modelPickerClose {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #1e1e1e;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.modelPickerClose:hover { background: #2a2a2a; color: white; }

.modelPickerList {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* MODEL CARD */
.modelCard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: #161616;
  border: 1px solid #1e1e1e;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.modelCard:hover {
  background: #1a1a1a;
  border-color: #2a2a2a;
}

.modelCard.active {
  border-color: #00ff8844;
  background: #0a1a0f;
}

.modelCardLeft {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modelCardIcon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.modelCardName {
  font-size: 15px;
  font-weight: 700;
  color: white;
  margin-bottom: 3px;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modelCardDesc {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
  line-height: 1.3;
}

.modelCardFeatures {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mf {
  font-size: 10px;
  color: #555;
  background: #1e1e1e;
  padding: 2px 7px;
  border-radius: 10px;
}

.modelCard.active .mf { color: #00ff8888; background: #0a2a1a; }

.modelBadge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.modelBadge.free { background: #0a2a1a; color: #00ff88; }
.modelBadge.pro { background: #1a0a2a; color: #aa66ff; }
.modelBadge.vision { background: #0a1a2a; color: #00ccff; }

.modelCardCheck {
  font-size: 16px;
  color: #00ff88;
  font-weight: 700;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

/* ACTIVE CHAT IN SIDEBAR */
.chatItem.active {
  background: #1a1a1a !important;
  border-left: 2px solid #00ff88 !important;
}

/* ═══════════════════════════════════════════════════════
   SMOOTH MOBILE SCROLL + PROFESSIONAL LAYOUT FIX
   ═══════════════════════════════════════════════════════ */

/* Smooth scrolling everywhere */
* {
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
}

/* Main app container */
body {
  overscroll-behavior: none !important;
}

/* Chat scroll area */
.chat {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
  padding-bottom: 120px !important;
}

/* Sidebar smooth scroll */
.sidebar {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Prevent double scroll on mobile */
.main {
  overflow: hidden !important;
  position: relative !important;
}

/* Input area always at bottom on mobile */
@media (max-width: 768px) {
  .inputArea {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    padding: 8px 12px 20px !important;
    background: linear-gradient(to top, #0a0a0a 80%, transparent) !important;
    max-width: 100% !important;
    z-index: 100 !important;
  }

  .chat {
    padding-bottom: 100px !important;
  }

  /* Bigger touch targets on mobile */
  .actionBtn, .imgActionBtn, .dattaImgBtn {
    padding: 8px 14px !important;
    min-height: 36px !important;
  }

  /* Better message bubbles on mobile */
  .userBubble {
    max-width: 85% !important;
    font-size: 14px !important;
  }

  .aiBubble, .aiContent {
    max-width: 95% !important;
    font-size: 14px !important;
  }

  /* Topbar compact on mobile */
  .topTitle {
    font-size: 16px !important;
    letter-spacing: 2px !important;
  }

  .modelPickerBtn span:last-of-type {
    display: none !important;
  }

  /* Better code blocks on mobile */
  .codeBlockWrap pre {
    font-size: 12px !important;
    padding: 10px !important;
  }

  /* Welcome screen on mobile */
  .welcomeScreen {
    transform: translate(-50%, -55%) !important;
    width: 92% !important;
  }

  .welcomeTitle {
    font-size: 24px !important;
  }
}

/* Momentum scrolling for all scrollable areas */
.chatWrapper {
  flex: 1 !important;
  overflow: hidden !important;
  position: relative !important;
}

/* Message spacing */
.messageRow {
  padding: 4px 0 !important;
  animation: msgFadeIn 0.3s ease !important;
}

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

/* Smooth sidebar on mobile */
@media (max-width: 768px) {
  .sidebar {
    position: fixed !important;
    left: -280px !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    z-index: 1000 !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none !important;
  }

  .sidebar.show {
    left: 0 !important;
    box-shadow: 4px 0 20px rgba(0,0,0,0.5) !important;
  }

  .main {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

/* CHAT SEARCH */
.chatSearchWrap {
  padding: 8px 12px;
  border-bottom: 1px solid #1a1a1a;
}

.chatSearchInput {
  width: 100%;
  padding: 8px 12px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  color: white;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.chatSearchInput:focus { border-color: #00ff8844; }
.chatSearchInput::placeholder { color: #444; }

.chatItem.hidden { display: none !important; }

/* PROFILE PHOTO */
.profileAvatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

/* INSTALL PWA BANNER */
.installBanner {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  border: 1px solid #00ff8833;
  border-radius: 16px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: slideUp 0.3s ease;
  max-width: calc(100% - 32px);
}

.installBanner img { width: 36px; height: 36px; border-radius: 8px; }
.installBannerText { flex: 1; }
.installBannerTitle { font-size: 14px; font-weight: 600; color: white; }
.installBannerSub { font-size: 11px; color: #666; }
.installBannerBtn {
  padding: 7px 14px;
  background: linear-gradient(135deg, #00cc6a, #00aaff);
  border: none;
  border-radius: 20px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.installBannerClose {
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  flex-shrink: 0;
}

/* NOTIFICATION PERMISSION TOAST */
.notifToast {
  position: fixed;
  top: 60px;
  right: 16px;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 14px 16px;
  z-index: 999;
  max-width: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: slideDown 0.3s ease;
}

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

.notifToastTitle { font-size: 14px; font-weight: 600; color: white; margin-bottom: 4px; }
.notifToastSub { font-size: 12px; color: #888; margin-bottom: 12px; }
.notifToastBtns { display: flex; gap: 8px; }
.notifAllow { flex: 1; padding: 7px; background: #00cc6a; border: none; border-radius: 8px; color: white; font-size: 12px; font-weight: 600; cursor: pointer; }
.notifDeny { flex: 1; padding: 7px; background: #1e1e1e; border: 1px solid #333; border-radius: 8px; color: #888; font-size: 12px; cursor: pointer; }

/* CODE RUN BUTTON */
.codeRunBtn {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: #0a2a1a;
  border: 1px solid #00ff8844; border-radius: 6px;
  color: #00ff88; font-size: 12px; cursor: pointer;
  transition: all 0.2s;
}
.codeRunBtn:hover { background: #0f3a22; }
.codeRunBtn:disabled { opacity: 0.5; cursor: not-allowed; }

/* CODE OUTPUT */
.codeOutput { border-top: 1px solid #1a1a1a; }
.codeOutputOk {
  padding: 12px 14px; background: #050f05;
  font-size: 13px; color: #88ff88;
}
.codeOutputOk pre { background: transparent; padding: 4px 0; color: #88ff88; }
.codeOutputErr {
  padding: 12px 14px; background: #0f0505;
  font-size: 13px; color: #ff6666;
}

/* ADD ADMIN LINK TO SIDEBAR */
.adminLink {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; color: #666; font-size: 13px;
  cursor: pointer; border-radius: 8px; text-decoration: none;
  transition: all 0.2s;
}
.adminLink:hover { background: #1a1a1a; color: #aaa; }

/* SCROLL DOWN BUTTON - fixed to bottom right */
#scrollDownBtn {
  position: fixed !important;
  bottom: 90px !important;
  right: 20px !important;
  left: auto !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: #1a1a1a !important;
  border: 1px solid #333 !important;
  color: #aaa !important;
  font-size: 16px !important;
  cursor: pointer !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  z-index: 200 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
  transition: all 0.2s !important;
  padding: 0 !important;
}

#scrollDownBtn:hover {
  background: #222 !important;
  color: white !important;
  border-color: #444 !important;
  transform: translateY(-2px) !important;
}

#scrollDownBtn.show {
  display: flex !important;
}

/* ═══════════════════════════════════════════
   CLEAN AI RESPONSE FORMATTING
   ═══════════════════════════════════════════ */

.aiBubble {
  line-height: 1.75 !important;
  font-size: 15px !important;
  color: #e0e0e0 !important;
  max-width: 100% !important;
  word-break: break-word !important;
}

/* Paragraphs */
.aiBubble p {
  margin: 0 0 12px 0 !important;
  line-height: 1.75 !important;
}
.aiBubble p:last-child { margin-bottom: 0 !important; }

/* Headings */
.aiBubble h1, .aiBubble h2, .aiBubble h3,
.aiBubble h4, .aiBubble h5, .aiBubble h6 {
  font-family: 'Rajdhani', sans-serif !important;
  font-weight: 700 !important;
  margin: 18px 0 8px !important;
  color: white !important;
  letter-spacing: 0.3px !important;
}
.aiBubble h1 { font-size: 22px !important; }
.aiBubble h2 { font-size: 19px !important; }
.aiBubble h3 { font-size: 17px !important; color: #ccc !important; }

/* Lists */
.aiBubble ul, .aiBubble ol {
  margin: 8px 0 12px 0 !important;
  padding-left: 20px !important;
}

.aiBubble li {
  margin: 5px 0 !important;
  line-height: 1.6 !important;
  color: #d0d0d0 !important;
}

.aiBubble ul li { list-style-type: disc !important; }
.aiBubble ol li { list-style-type: decimal !important; }

/* Nested lists */
.aiBubble li ul, .aiBubble li ol {
  margin: 4px 0 4px 0 !important;
}

/* Bold & Italic */
.aiBubble strong {
  font-weight: 700 !important;
  color: white !important;
}
.aiBubble em {
  font-style: italic !important;
  color: #bbb !important;
}

/* Inline code */
.aiBubble :not(pre) > code {
  background: #1e1e1e !important;
  border: 1px solid #2a2a2a !important;
  padding: 1px 6px !important;
  border-radius: 5px !important;
  font-family: 'Consolas', 'Monaco', monospace !important;
  font-size: 13px !important;
  color: #00ff88 !important;
}

/* Blockquotes */
.aiBubble blockquote {
  border-left: 3px solid #00ff8866 !important;
  margin: 12px 0 !important;
  padding: 8px 16px !important;
  background: #0a1a0a !important;
  border-radius: 0 8px 8px 0 !important;
  color: #aaa !important;
  font-style: italic !important;
}

/* Tables */
.aiBubble table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 12px 0 !important;
  font-size: 13px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}

.aiBubble th {
  background: #1a1a1a !important;
  color: #00ff88 !important;
  padding: 10px 14px !important;
  text-align: left !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border-bottom: 1px solid #2a2a2a !important;
}

.aiBubble td {
  padding: 9px 14px !important;
  border-bottom: 1px solid #161616 !important;
  color: #ccc !important;
}

.aiBubble tr:last-child td { border-bottom: none !important; }
.aiBubble tr:hover td { background: #0f0f0f !important; }

/* Horizontal rule */
.aiBubble hr {
  border: none !important;
  border-top: 1px solid #2a2a2a !important;
  margin: 16px 0 !important;
}

/* Links */
.aiBubble a {
  color: #00ccff !important;
  text-decoration: none !important;
  border-bottom: 1px solid #00ccff44 !important;
  transition: border-color 0.2s !important;
}
.aiBubble a:hover { border-color: #00ccff !important; }

/* Cursor while streaming */
.cursor {
  display: inline-block !important;
  width: 2px !important;
  height: 16px !important;
  background: #00ff88 !important;
  margin-left: 2px !important;
  vertical-align: middle !important;
  animation: blink 1s infinite !important;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* USER BUBBLE clean style */
.userBubble {
  background: #1a1a1a !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 18px 18px 4px 18px !important;
  padding: 10px 16px !important;
  max-width: 75% !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  color: #e8e8e8 !important;
  word-break: break-word !important;
}

/* MESSAGE ROW spacing */
.messageRow {
  display: flex !important;
  gap: 10px !important;
  margin-bottom: 20px !important;
  align-items: flex-start !important;
}

.messageRow.userRow {
  flex-direction: row-reverse !important;
  justify-content: flex-start !important;
}

/* AI Avatar */


/* AI content area */
.aiContent {
  flex: 1 !important;
  min-width: 0 !important;
  max-width: calc(100% - 44px) !important;
}

/* IMAGE GENERATION ANIMATION */
.imgGenCanvas {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #0a1a1a 0%, #050a0a 100%);
}

/* Floating particles */
.imgGenParticle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ff88;
  animation: particleFloat 3s ease-in-out infinite var(--d);
  box-shadow: 0 0 10px #00ff88;
}

@keyframes particleFloat {
  0%   { transform: translate(0,0) scale(1); opacity: 0.8; }
  33%  { transform: translate(20px,-20px) scale(1.5); opacity: 1; }
  66%  { transform: translate(-15px,10px) scale(0.8); opacity: 0.6; }
  100% { transform: translate(0,0) scale(1); opacity: 0.8; }
}

/* Brush sweep animation */
.imgGenBrush {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(0,255,136,0.06) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: brushSweep 2s ease infinite;
}

@keyframes brushSweep {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* Center rings */
.imgGenCenter {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.imgGenRing {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(0,255,136,0.4);
  animation: ringPulse 2s ease-out infinite;
}

.r1 { width: 60px; height: 60px; animation-delay: 0s; }
.r2 { width: 90px; height: 90px; animation-delay: 0.4s; }
.r3 { width: 120px; height: 120px; animation-delay: 0.8s; }

@keyframes ringPulse {
  0%   { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

.imgGenIcon {
  font-size: 28px;
  z-index: 1;
  animation: iconBob 1.5s ease-in-out infinite;
}

@keyframes iconBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-5px) scale(1.1); }
}

/* Loading text */
.dattaShimmer .shimmerText {
  position: absolute !important;
  bottom: 16px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-size: 13px !important;
  color: #00ff8888 !important;
  letter-spacing: 1px !important;
  white-space: nowrap !important;
  animation: textFade 1.2s ease infinite !important;
}

@keyframes textFade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.dattaShimmer {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 300px !important;
}

/* VOICE SELECTOR */
.voiceSelector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.voiceOption {
  padding: 7px 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  color: #666;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.voiceOption:hover { background: #222; color: #aaa; }
.voiceOption.active {
  background: #0a2a1a;
  border-color: #00ff8866;
  color: #00ff88;
}

/* ═══════════════════════════════════════
   MOBILE FIXES - All 5 issues
   ═══════════════════════════════════════ */

/* FIX 1: Keyboard pushes content - use dvh instead of vh */
@supports (height: 100dvh) {
  body, .app, .main {
    height: 100dvh !important;
    max-height: 100dvh !important;
  }
}

/* FIX 2: Input stays above keyboard */
@media (max-width: 768px) {
  .inputArea {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 12px env(safe-area-inset-bottom, 12px) !important;
    background: #0a0a0a !important;
    border-top: 1px solid #1a1a1a !important;
    transform: none !important;
    z-index: 999 !important;
  }

  /* Prevent keyboard from pushing input */
  .inputWrap {
    border-radius: 16px !important;
  }

  /* Chat box padding from input */
  .chat {
    padding-bottom: 80px !important;
    height: auto !important;
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* FIX 3: Smooth scroll */
  .chat, .sidebar, .history {
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    scroll-behavior: smooth !important;
  }

  /* FIX 4: Text readable size */
  .aiBubble {
    font-size: 15px !important;
    line-height: 1.7 !important;
  }

  .userBubble {
    font-size: 15px !important;
    max-width: 85% !important;
  }

  /* FIX 5: Scroll down button - correct position above input */
  #scrollDownBtn {
    bottom: 80px !important;
    right: 16px !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 18px !important;
    z-index: 998 !important;
  }

  /* FIX: Buttons not overlapping */
  .inputRightBtns {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .sendBtn, .stopBtn, .micBtn {
    width: 38px !important;
    height: 38px !important;
    flex-shrink: 0 !important;
  }

  .plusBtn {
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0 !important;
  }

  #message {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
    min-width: 0 !important;
    flex: 1 !important;
  }

  /* Action buttons not overlapping */
  .aiActions {
    gap: 4px !important;
    flex-wrap: wrap !important;
  }

  .actionBtn {
    padding: 6px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }

  /* Topbar buttons not overlapping */
  .topActions {
    gap: 4px !important;
  }

  .topIconBtn, .themeToggleBtn {
    width: 30px !important;
    height: 30px !important;
  }

  .modelPickerBtn {
    padding: 5px 10px !important;
    font-size: 12px !important;
  }

  /* Code blocks scroll on mobile */
  .codeBlockWrap pre {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    font-size: 12px !important;
  }

  /* Image not cut off */
  .dattaImgWrap {
    max-width: 100% !important;
  }

  .dattaImgBox {
    border-radius: 12px !important;
  }

  /* Welcome screen on mobile */
  .welcomeScreen {
    width: 95% !important;
    transform: translate(-50%, -52%) !important;
  }

  /* Message row spacing */
  .messageRow {
    margin-bottom: 14px !important;
    padding: 0 4px !important;
  }
}

/* iPhone safe area support */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .inputArea {
    padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important;
  }
}



/* DISABLE ZOOM on mobile */
* { touch-action: pan-x pan-y; }
input, textarea, select { touch-action: manipulation; }

/* MENU BUTTON - bigger and visible */
.menuBtn {
  font-size: 22px !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #1a1a1a !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  color: white !important;
  flex-shrink: 0 !important;
  transition: all 0.2s !important;
}

.menuBtn:hover { background: #222 !important; border-color: #333 !important; }

@media (max-width: 768px) {
  .menuBtn {
    font-size: 20px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }
}







/* INPUT BAR - fixed at bottom, no transform tricks */
@media (max-width: 768px) {
  .inputArea {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    z-index: 100 !important;
    background: #0a0a0a !important;
    padding: 8px 12px 16px !important;
  }

  /* Sheet must be ABOVE input bar */
  

  /* Prevent page scroll from triggering sheet */
  body {
    overflow: hidden !important;
  }

  .main {
    overflow: hidden !important;
    position: relative !important;
  }

  .chat {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* ═══════════════════════════════════════
   UI IMPROVEMENTS
   ═══════════════════════════════════════ */

/* Rate limit box */
.limitBox {
  background: #1a0a00 !important;
  border: 1px solid #ff880033 !important;
  border-radius: 16px !important;
  padding: 20px !important;
  text-align: center !important;
  max-width: 280px !important;
}

/* Better welcome screen */
.welcomeTitle {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: 36px !important;
  letter-spacing: 3px !important;
  background: linear-gradient(135deg, #ffffff, #aaaaaa) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  margin-bottom: 8px !important;
}

.welcomeSub {
  font-size: 14px !important;
  color: #555 !important;
  margin-bottom: 28px !important;
}

/* Better chips */
.chip {
  background: #111 !important;
  border: 1px solid #1e1e1e !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  color: #888 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  text-align: left !important;
  line-height: 1.4 !important;
}

.chip:hover {
  background: #161616 !important;
  border-color: #2a2a2a !important;
  color: #ccc !important;
  transform: translateY(-1px) !important;
}

/* Better topbar */
.topBar {
  height: 52px !important;
  padding: 0 12px !important;
  gap: 8px !important;
}

.topTitle {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: 20px !important;
  letter-spacing: 3px !important;
  background: linear-gradient(135deg, #00ff88, #00ccff) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* Better sidebar */
.sidebar {
  width: 260px !important;
}

.sidebarBrand {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: 18px !important;
  letter-spacing: 3px !important;
  background: linear-gradient(135deg, #00ff88, #00ccff) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Chat item hover */
.chatItem {
  border-radius: 10px !important;
  padding: 10px 12px !important;
  margin: 2px 8px !important;
  transition: background 0.15s !important;
}

.chatItem:hover {
  background: #161616 !important;
}

.chatItem.active {
  background: #0a1f0a !important;
  border-left: 2px solid #00ff88 !important;
}

/* User bubble improvement */
.userBubble {
  background: #1a1a1a !important;
  border: 1px solid #222 !important;
  border-radius: 18px 18px 4px 18px !important;
  padding: 10px 16px !important;
  max-width: 78% !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #e8e8e8 !important;
}

/* AI bubble improvement */
.aiBubble {
  padding: 4px 0 !important;
  max-width: 100% !important;
}

/* Typing indicator */
.typing::after {
  content: "▌" !important;
  animation: blink 1s infinite !important;
  color: #00ff88 !important;
}

/* New chat button */
.newChatBtn {
  background: linear-gradient(135deg, #0a2a1a, #0a1a2a) !important;
  border: 1px solid #00ff8822 !important;
  color: #00ff88 !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  font-weight: 600 !important;
  transition: all 0.2s !important;
}

.newChatBtn:hover {
  background: linear-gradient(135deg, #0f3a22, #0f2a3a) !important;
  border-color: #00ff8844 !important;
}

/* Upgrade button in sidebar */
.upgradeBtn {
  margin: 8px 12px !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
}

/* CLEAN CHAT ITEMS - no emoji */
.chatItem {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 9px 10px !important;
  margin: 2px 6px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
  position: relative !important;
  border: 1px solid transparent !important;
}

.chatItem:hover { background: #161616 !important; }
.chatItem:hover .deleteBtn { opacity: 1 !important; }
.chatItem.active {
  background: #0a1a0a !important;
  border-color: #00ff8822 !important;
}

.chatIcon { flex-shrink: 0 !important; color: #444 !important; }

.chatTitle {
  flex: 1 !important;
  font-size: 13px !important;
  color: #aaa !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.4 !important;
}

.chatItem.active .chatTitle { color: #ddd !important; }

.deleteBtn {
  opacity: 0 !important;
  background: none !important;
  border: none !important;
  color: #555 !important;
  cursor: pointer !important;
  padding: 4px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: all 0.15s !important;
}

.deleteBtn:hover {
  background: #2a1010 !important;
  color: #ff6666 !important;
}

/* Delete confirm inline */
.deleteConfirm {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
}

/* INPUT MODEL BAR - like Claude's model selector */
.inputModelBar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.inputModelBar::-webkit-scrollbar { display: none; }

.inputModelPill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  color: #555;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.3px;
}

.inputModelPill:hover {
  border-color: #333;
  color: #888;
  background: #111;
}

.inputModelPill.active {
  border-color: #00ff8866;
  color: #00ff88;
  background: #0a1a0f;
}

@media (max-width: 768px) {
  .inputModelBar {
    padding: 4px 4px 2px;
    gap: 5px;
  }

  .inputModelPill {
    font-size: 11px;
    padding: 4px 10px;
  }
}

/* MODEL BAR INSIDE INPUT BOX - like Claude */
.inputWrap {
  border-radius: 16px !important;
  border: 1px solid #222 !important;
  background: #111 !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.inputModelBar {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 8px 12px 4px !important;
  border-bottom: 1px solid #1a1a1a !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}

.inputModelBar::-webkit-scrollbar { display: none !important; }

.inputModelPill {
  padding: 4px 12px !important;
  background: transparent !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 20px !important;
  color: #555 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.15s !important;
  font-family: 'Rajdhani', sans-serif !important;
}

.inputModelPill:hover {
  border-color: #333 !important;
  color: #888 !important;
}

.inputModelPill.active {
  background: #0a1a0f !important;
  border-color: #00ff8866 !important;
  color: #00ff88 !important;
}

/* Input row stays clean */
.inputRow {
  display: flex !important;
  align-items: center !important;
  padding: 6px 8px 8px !important;
  gap: 6px !important;
}

#message {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  flex: 1 !important;
  font-size: 15px !important;
  color: white !important;
  padding: 6px 8px !important;
}

#message::placeholder { color: #444 !important; }

/* MOBILE RESPONSE FORMATTING - Clean and compact */
@media (max-width: 768px) {

  /* AI bubble - tighter on mobile */
  .aiBubble {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  /* Paragraphs - less spacing */
  .aiBubble p {
    margin: 0 0 8px 0 !important;
    line-height: 1.6 !important;
  }

  /* Headings - smaller on mobile */
  .aiBubble h1 { font-size: 17px !important; margin: 12px 0 6px !important; }
  .aiBubble h2 { font-size: 15px !important; margin: 12px 0 6px !important; }
  .aiBubble h3 { font-size: 14px !important; margin: 10px 0 5px !important; }

  /* Lists - compact */
  .aiBubble ul, .aiBubble ol {
    margin: 4px 0 8px 0 !important;
    padding-left: 18px !important;
  }

  .aiBubble li {
    margin: 3px 0 !important;
    line-height: 1.5 !important;
    font-size: 14px !important;
  }

  /* No extra indent on list items */
  .aiBubble li p {
    margin: 0 !important;
    display: inline !important;
  }

  /* Reduce message row spacing */
  .messageRow {
    margin-bottom: 12px !important;
    padding: 0 2px !important;
  }

  /* AI content max width */
  .aiContent {
    max-width: 100% !important;
  }

  /* Tables scroll on mobile */
  .aiBubble table {
    font-size: 12px !important;
    display: block !important;
    overflow-x: auto !important;
  }

  /* Bold stays white but not too heavy */
  .aiBubble strong {
    font-weight: 600 !important;
    color: #eee !important;
  }

  /* Blockquote compact */
  .aiBubble blockquote {
    padding: 6px 12px !important;
    margin: 8px 0 !important;
    font-size: 13px !important;
  }
}

/* SINGLE MODEL PILL */
.inputModelBar {
  padding: 6px 10px 2px !important;
  border-bottom: 1px solid #1a1a1a !important;
}

.inputModelSingle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 4px 12px !important;
  background: #0a1a0f !important;
  border: 1px solid #00ff8844 !important;
  border-radius: 20px !important;
  color: #00ff88 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  font-family: 'Rajdhani', sans-serif !important;
  letter-spacing: 0.3px !important;
}

.inputModelSingle:hover {
  background: #0f2a18 !important;
}

/* MODEL DROPDOWN ITEMS */
.modelDropItem {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
  margin-bottom: 2px !important;
}

.modelDropItem:hover { background: #1a1a1a !important; }
.modelDropItem.active { background: #0a1a0f !important; }

.mdiCheck {
  color: #00ff88 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  width: 20px !important;
  text-align: center !important;
}

/* SINGLE MODEL PILL */
.inputModelBar {
  padding: 6px 10px 2px !important;
  border-bottom: 1px solid #1a1a1a !important;
}

.inputModelSingle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 4px 12px !important;
  background: #0a1a0f !important;
  border: 1px solid #00ff8844 !important;
  border-radius: 20px !important;
  color: #00ff88 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  font-family: 'Rajdhani', sans-serif !important;
}

/* MODEL DROPDOWN */
.modelDropItem {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
  margin-bottom: 2px !important;
}

.modelDropItem:hover { background: #1a1a1a !important; }
.modelDropItem.active { background: #0a1a0f !important; }

/* FIX: Chat padding so input bar doesn't cover messages */
.chat {
  padding-bottom: 160px !important;
}

@media (max-width: 768px) {
  .chat {
    padding-bottom: 180px !important;
  }
}

/* WELCOME SCREEN - show all chips properly */
.welcomeScreen {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 40px 20px !important;
}

.suggestionChips {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 500px !important;
}

.chip {
  width: 100% !important;
  text-align: left !important;
  padding: 12px 16px !important;
  background: #111 !important;
  border: 1px solid #1e1e1e !important;
  border-radius: 12px !important;
  color: #888 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.chip:hover {
  background: #161616 !important;
  border-color: #2a2a2a !important;
  color: #ccc !important;
  transform: translateX(4px) !important;
}

.welcomeTitle {
  font-size: 28px !important;
  font-weight: 800 !important;
  text-align: center !important;
  margin-bottom: 8px !important;
  color: white !important;
}

.welcomeSub {
  font-size: 14px !important;
  color: #555 !important;
  text-align: center !important;
  margin-bottom: 24px !important;
}

@media (max-width: 768px) {
  .welcomeTitle { font-size: 22px !important; }
  .chip { font-size: 13px !important; padding: 10px 14px !important; }
}

/* MIC BUTTON - inline listener */
.micBtn {
  background: none !important;
  border: none !important;
  color: #555 !important;
  cursor: pointer !important;
  padding: 6px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s !important;
  flex-shrink: 0 !important;
}

.micBtn:hover { color: #00ff88 !important; }

.micBtn.listening {
  color: #ff4444 !important;
  animation: micPulse 1s infinite !important;
}

@keyframes micPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Input placeholder when listening */
#message.listening {
  color: #00ff88 !important;
}

/* ═══════════════════════════════════════
   PREMIUM ELEGANT FONT SYSTEM - Datta AI
   ═══════════════════════════════════════ */

/* Base - everything uses Josefin Sans (clean, geometric, premium) */
/* BASE - UI uses Josefin Sans */
body, button, input, select, textarea {
  font-family: 'Josefin Sans', sans-serif;
  letter-spacing: 0.3px;
}

/* AI responses - use CSS variable so JS can change it */
.aiBubble,
.aiBubble p,
.aiBubble li,
.aiBubble td,
.aiBubble blockquote,
.stream {
  font-family: var(--ai-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: var(--ai-font-size, 15px);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0;
}

.userBubble {
  font-size: var(--user-font-size, 15px);
}

/* Bold text in AI responses */
.aiBubble strong, .aiBubble b {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 600 !important;
  color: #fff !important;
}

/* Headings in AI responses - Playfair Display */
.aiBubble h1, .aiBubble h2, .aiBubble h3 {
  font-family: 'Playfair Display', serif !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
}

/* App title - Josefin Sans bold */
.topTitle, .sidebarBrand, .splashName {
  font-family: 'Josefin Sans', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 6px !important;
}

/* Input field - Josefin Sans light */
#message, input, textarea, select {
  font-family: 'Josefin Sans', sans-serif !important;
  font-weight: 300 !important;
  letter-spacing: 0.5px !important;
}

/* User bubbles */
.userBubble {
  font-family: 'Josefin Sans', sans-serif !important;
  font-weight: 300 !important;
  letter-spacing: 0.4px !important;
}

/* Buttons */
button {
  font-family: 'Josefin Sans', sans-serif !important;
  letter-spacing: 1px !important;
}

/* Welcome title */
.welcomeTitle {
  font-family: 'Playfair Display', serif !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  font-style: italic !important;
}

/* Welcome subtitle */
.welcomeSub {
  font-family: 'Josefin Sans', sans-serif !important;
  font-weight: 300 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
}

/* Code blocks - keep monospace */
code, pre, .aiBubble code, .aiBubble pre {
  font-family: 'Courier New', monospace !important;
  letter-spacing: 0 !important;
}

/* Chat title sidebar */
.chatTitle {
  font-family: 'Josefin Sans', sans-serif !important;
  font-weight: 300 !important;
  letter-spacing: 0.3px !important;
}

/* Section labels */
.sectionLabel {
  font-family: 'Josefin Sans', sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: 3px !important;
}

/* Model pill */
.inputModelSingle, .activeModelName {
  font-family: 'Josefin Sans', sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: 1px !important;
}









  50% { box-shadow: 0 0 0 6px rgba(255,68,68,0); }
}


/* ── SEND & STOP BUTTONS ─────────────────────── */
.sendBtn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: white;
  border: none;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.sendBtn:hover { background: #e8e8e8; transform: scale(1.05); }

.stopBtn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: white;
  border: none;
  color: #111;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.stopBtn:hover { background: #e8e8e8; }

/* ═══════════════════════════════════════
   GLOWING ORB THINKING ANIMATION
   ═══════════════════════════════════════ */

.dattaThinking {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
}

.thinkOrb {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.thinkOrbCore {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orb-color, #00ff88);
  box-shadow: 0 0 8px var(--orb-color, #00ff88),
              0 0 16px var(--orb-color, #00ff88),
              0 0 24px var(--orb-glow, rgba(0,255,136,0.4));
  animation: orbPulse 1.4s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.thinkOrbRing {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--orb-color, #00ff88);
  opacity: 0;
  animation: orbRing 1.4s ease-out infinite;
}

.thinkOrbRing.r1 {
  width: 20px; height: 20px;
  animation-delay: 0s;
}
.thinkOrbRing.r2 {
  width: 28px; height: 28px;
  animation-delay: 0.3s;
}
.thinkOrbRing.r3 {
  width: 38px; height: 38px;
  animation-delay: 0.6s;
}

@keyframes orbPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 6px var(--orb-color, #00ff88),
                0 0 12px var(--orb-color, #00ff88),
                0 0 20px var(--orb-glow, rgba(0,255,136,0.4));
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--orb-color, #00ff88),
                0 0 20px var(--orb-color, #00ff88),
                0 0 35px var(--orb-glow, rgba(0,255,136,0.4));
  }
}

@keyframes orbRing {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.thinkLabel {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 13px;
  color: #555;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: thinkFade 1.4s ease-in-out infinite;
}

@keyframes thinkFade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── USER MESSAGE ACTIONS (copy, edit, retry) ── */
.userActions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.messageRow:hover .userActions { opacity: 1; }

.uaBtn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: none;
  border: 1px solid #1e1e1e;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.uaBtn:hover {
  background: #1a1a1a;
  color: #aaa;
  border-color: #333;
}

/* ── AI BUBBLE CONTENT POLISH ── */
.aiBubble p { margin-bottom: 10px; }
.aiBubble p:last-child { margin-bottom: 0; }
.aiBubble h1, .aiBubble h2, .aiBubble h3 {
  color: #fff;
  margin: 14px 0 6px;
  font-family: 'Josefin Sans', sans-serif;
}
.aiBubble ul, .aiBubble ol {
  padding-left: 20px;
  margin: 8px 0;
}
.aiBubble li { margin-bottom: 4px; }
.aiBubble strong { color: #fff; }
.aiBubble a { color: #00ccff; }
.aiBubble code {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 13px;
  color: #00ff88;
  font-family: 'Courier New', monospace;
}
.aiBubble pre {
  background: #0a0a0a;
  border: 1px solid #1e1e1e;
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
  margin: 10px 0;
}
.aiBubble pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e0e0e0;
  font-size: 13px;
}
.aiBubble blockquote {
  border-left: 3px solid #00ff88;
  padding-left: 12px;
  color: #888;
  margin: 8px 0;
  font-style: italic;
}

/* ── THINKING BLOCK (Claude-style) ── */
.thinkingBlock {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 16px;
  padding: 16px 20px;
  max-width: 340px;
  margin: 4px 0;
}

.thinkingHeader {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.thinkingOrb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 8px rgba(0,255,136,0.6);
  animation: thinkPulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes thinkPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.thinkingTitle {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.thinkingDots {
  display: flex;
  gap: 2px;
}
.thinkingDots span {
  color: #333;
  font-size: 16px;
  animation: dotBlink 1.2s infinite;
}
.thinkingDots span:nth-child(2) { animation-delay: 0.2s; }
.thinkingDots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBlink {
  0%,100% { opacity: 0.2; }
  50% { opacity: 1; }
}

.thinkingSteps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thinkStep {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thinkStepIcon {
  font-size: 15px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.thinkStepText {
  font-size: 13px;
  color: #888;
  flex: 1;
  font-family: 'Josefin Sans', sans-serif;
  letter-spacing: 0.3px;
}

.thinkStepLoader {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Active step loader spinner */
.thinkStep:last-child:not([style*="opacity: 0"]) .thinkStepLoader::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border: 1.5px solid #333;
  border-top-color: #00ff88;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Light theme */
body.light .thinkingBlock { background: #f9f9f9; border-color: #eee; }
body.light .thinkingTitle { color: #aaa; }
body.light .thinkStepText { color: #888; }
