 :root {
  --bg-main: #0a0a0a;
  --bg-secondary: #1a1a1d;
  --accent: #00ffff;
  --text: #ffffff;
}
body.theme-gf {
  --bg-main: #140a10;
  --bg-secondary: #2a1320;
  --accent: #ff4d88;
  --text: #ffe6f0;
}
/* style.css - fameleo AI - FINAL VERSION (Desktop untouched, Mobile perfect) */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-main);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

.app {
  height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 80px 1fr 70px;
  grid-template-areas:
    "header header"
    "sidebar chat"
    "footer footer";
  background: var(--bg-main);
}
@media (max-width: 768px) {
  .app { 
    grid-template-columns: 1fr !important; 
    grid-template-areas: "header" "chat" "footer" !important; 
  }
}

/* ===== DYNAMIC SIDEBAR GRID ===== */

.app{
  transition:grid-template-columns .3s ease;
}

/* when sidebar is collapsed */
.app:has(.sidebar.collapsed){
  grid-template-columns:80px 1fr;
}

/* ===== FIXED FOOTER – ALWAYS VISIBLE ===== */

.app {
  grid-template-rows: 80px 1fr auto;
}

/* ===================== HEADER ===================== */
.header {
  grid-area: header;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  background: var(--bg-secondary);
  border-bottom: none;
}
.header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 1px;

  background: linear-gradient(
    to right,
    transparent,
    rgba(0, 255, 255, 0.35),
    transparent
  );

  pointer-events: none;
}

/* Visible ONLY on desktop – hidden on phone/tablet */
.logo {
  font-size: 32px;
  font-weight: bold;
  position: absolute;
  left: 10%;
  top: 42%;
  color: #f7f4f4;
  text-shadow: 0 0 20px rgba(238, 243, 243, 0.6);
  z-index: 11;
}

/* Hide it completely on phones and tablets */
@media only screen and (max-width: 1024px) {
  .logo {
    display: none !important;
  }
}

@media (max-width:768px){

.logo2{
  position:absolute !important;

  left:50% !important;
  top:50% !important;

  transform:translate(-50%,-50%) !important;

  font-size:24px !important;
  font-weight:bold;

  color:#f7f4f4;
  text-shadow:0 0 12px rgba(0,255,255,0.6);

  z-index:10;
}

}

.header-logo {
  position: absolute;
  left: 5%;
  top: 5px;
  transform: translateX(-50%);
  width: 110px;

  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(0, 255, 255, 0.4);
  box-shadow: 0 10px 40px rgba(0, 255, 255, 0.3);
  z-index: 10;
  transition: all 0.4s ease;
}
/* Mobile-only styles (max-width: 767px) – common for phones */
@media only screen and (max-width: 767px) {
  .header-logo {
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(0, 255, 255, 0.4);
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.3);
    z-index: 10;
    transition: all 0.4s ease;
  }
}

.header-banner {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 520px;

  height: 60px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(0, 255, 255, 0.4);
  box-shadow: 0 10px 40px rgba(0, 255, 255, 0.3);
  z-index: 10;
  transition: all 0.4s ease;
}

.header-banner:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 20px 60px rgba(0, 255, 255, 0.6);
  border-color: #00ffff;
}

.header-icons {
  position: absolute;
  right: 40px;
  top: 16px;
  display: flex;
  gap: 20px;
  z-index: 11;
}

/* USER MENU FIX – KEEP PERFECT HEADER ALIGNMENT */
/* USER MENU – EXACT SAME SLOT AS LOGIN BUTTON */
#userMenu {
  display: none;
  position: relative;

  width: 56px;
  height: 56px;

  flex-shrink: 0;
}



.header-icons button {
  background: rgba(0, 255, 255, 0.15);
  border: 1.5px solid rgba(0, 255, 255, 0.3);
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}
/* LOGIN BUTTON – FIXED & ALIGNED */
/* LOGIN BUTTON – CLEAN & PROFESSIONAL */
#loginBtn {
  width: 56px;
  height: 56px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 255, 255, 0.15);
  border: 1.5px solid rgba(0, 255, 255, 0.35);

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}



.header-icons button:hover {
  background: rgba(0, 255, 255, 0.4);
  transform: scale(1.15);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
}

/* ===================== AVATAR TOGGLE BUTTONS – DESKTOP (PC) ===================== */
@media only screen and (min-width: 769px) {
  /* Left Avatar Button – aligned to the LEFT side of the banner */
  #toggleAvatarsBtn {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-620%, -50%) !important;  /* moves it ~300px left of banner center */
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: rgba(0, 255, 255, 0.35) !important;
    border: 3px solid #00ffff !important;
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.8) !important;
    font-size: 24px !important;
    z-index: 12 !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
  }

  /* Right Avatar Button – aligned to the RIGHT side of the banner */
  #toggleRightAvatars {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(520%, -50%) !important;  /* moves it ~300px right of banner center */
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: rgba(0, 255, 255, 0.35) !important;
    border: 3px solid #00ffff !important;
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.8) !important;
    font-size: 24px !important;
    z-index: 12 !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
  }

  #toggleAvatarsBtn:hover,
  #toggleRightAvatars:hover {
    background: #00ffff !important;
    color: #000 !important;
    transform: scale(1.15);
    box-shadow: 0 0 50px rgba(0, 255, 255, 1) !important;
  }
}

/* ===================== PHONE / MOBILE ===================== */
@media only screen and (max-width: 768px) {
  /* Both buttons: Top-Left corner, circular, glowing */
  #toggleAvatarsBtn,
  #toggleRightAvatars {
    position: fixed !important;
    top: 18px !important;           /* just below header */
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: rgba(0, 255, 255, 0.3) !important;
    border: 2px solid #00ffff !important;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.7) !important;
    font-size: 20px !important;
    z-index: 9999 !important;
    backdrop-filter: blur(10px);
  }

  /* Left button */
  #toggleAvatarsBtn {
    left: 16px !important;
  }

  /* Right button – slightly to the right of left one */
  #toggleRightAvatars {
    left: 76px !important;   /* 16 + 52 + 8 gap */
  }

  /* Hide unnecessary buttons but keep login */
.header-icons button:not(#toggleSidebarBtn, #loginBtn, #userAvatar) {
  display: none !important;
}
}

/* =============================================================================
   AVATAR BAR (Top sliding panel)
   ========================================================================== */

.avatar-bar-container {
  position: fixed;
  top: 120px;
  left: 0;
  right: 0;
  height: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1e2e, #2a1a3d);
  z-index: 998;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: none;
}

.avatar-bar-container.open {
  height: 120px;
}

.avatar-bar {
  padding: 20px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatars {
  display: flex;
  gap: 36px;
  overflow-x: auto;
  padding: 10px 20px;
  scrollbar-width: thin;
}

.avatars img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #555;
  object-fit: cover;
  transition: all 0.4s ease;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(0,0,0,0.6);
}

.avatars img:hover {
  transform: scale(1.2);
  border-color: #00ffff;
  box-shadow: 0 0 40px rgba(0,255,255,0.7);
}

.load-more {
  background: linear-gradient(135deg, #444, #666);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.load-more:hover {
  background: #00ffff;
  color: #000;
}

/* =============================================================================
   RIGHT AVATARS PANEL (Slide-in from right)
   ========================================================================== */

.right-avatars {
  position: fixed;
  right: -120px;
  top: 120px;
  bottom: 70px;
  width: 100px;
  background: linear-gradient(to bottom, #1a1a1d, #0f0f12);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 80px;
  gap: 30px;
  transition: right 0.5s ease;
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  z-index: 997;
}

.right-avatars.open {
  right: 0;
}

.right-avatars img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 4px solid #444;
  transition: 0.3s;
}

.right-avatars img:hover {
  border-color: #00ffff;
  transform: scale(1.2);
}

/* =============================================================================
   SIDEBAR
   ========================================================================== */

.sidebar {
  grid-area: sidebar;
  background: var(--bg-secondary);
  padding: 14px 12px;
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar button {
  background: rgba(255,255,255,0.08);
  border: none;
  color: white;
  padding: 10px 14px;
  text-align: left;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.3s;
}

.sidebar button:hover {
  background: rgba(0,255,255,0.2);
  transform: translateX(2px);
}

.version,
.upgrade {
  margin-top: auto;
  text-align: center;
  padding: 12px;
  background: rgba(0,255,255,0.1);
  border-radius: 10px;
  font-size: 13px;
  color: #00ffff;
}

/* ===== CHATGPT STYLE SIDEBAR TOGGLE ===== */

.sidebar{
  position:relative;
  transition:width .3s ease;
}

/* collapsed state */
.sidebar.collapsed{
  width:80px;
  padding:20px 10px;
}

/* hide text when collapsed */
/* ===== COLLAPSED SIDEBAR (CHATGPT STYLE) ===== */

.sidebar.collapsed{
  width:80px;
  padding:20px 10px;
}

/* hide ONLY text, not buttons */
.sidebar.collapsed .side-btn span{
  display:none;
}

/* show icons */
.sidebar.collapsed .side-btn i{
  opacity:1;
  transform:scale(1);
}

/* center icons */
.sidebar.collapsed .side-btn{
  justify-content:center;
  padding:14px 0;
}

/* hide non-button elements */
.sidebar.collapsed .history-lines,
.sidebar.collapsed .version,
.sidebar.collapsed .upgrade{
  display:none;
}

/* toggle button */
.sidebar-toggle{
  position:absolute;
  top:20px;
  right:-16px;

  width:32px;
  height:32px;
  border-radius:50%;
  border:none;

  background:rgba(255,255,255,0.12);
  color:#fff;
  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:center;

  box-shadow:0 4px 14px rgba(0,0,0,.5);
  backdrop-filter:blur(10px);
  transition:.3s;
  z-index:100;
}

.sidebar-toggle:hover{
  background:#00ffff;
  color:#000;
}

/* rotate icon when collapsed */
.sidebar.collapsed .sidebar-toggle i{
  transform:rotate(180deg);
}

/* ===== SIDEBAR BUTTON ICONS ===== */

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

/* icon default hidden */
.side-btn i{
  font-size:18px;
  min-width:22px;
  opacity:0;
  transform:scale(.6);
  transition:.25s ease;
}

/* when sidebar is collapsed */
.sidebar.collapsed .side-btn i{
  opacity:1;
  transform:scale(1);
}

/* hide text when collapsed */
.sidebar.collapsed .side-btn span{
  display:none;
}

/* center icons */
.sidebar.collapsed .side-btn{
  justify-content:center;
  padding:14px 0;
}

/* =============================================================================
   CHAT AREA
   ========================================================================== */

.chat {
  grid-area: chat;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  padding: 15px;
  overflow: hidden;
}

#messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
  justify-content: flex-start;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.message {
  max-width: 75%;
  padding: 16px 22px;
  border-radius: 20px;
  line-height: 1.7;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #4a4a4a, #333);
  border-bottom-right-radius: 6px;
}

.message.bot {
  align-self: flex-start;
  background: linear-gradient(135deg, #2a2a3a, #1a1a2a);
  border-bottom-left-radius: 6px;
  border-left: 4px solid var(--accent);
}

/* ensure chat never goes under footer */
.chat{
  padding-bottom: 90px;
}

/* =============================================================================
   INPUT AREA (Bottom fixed bar)
   ========================================================================== */

.input-area {
  position: fixed;
  bottom: 25px;
  left: 55%;
  transform: translateX(-50%);
  width: 62%;
  max-width: 900px;
  padding: 6px 14px;
  background: rgba(30,30,40,0.95);
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 2px solid rgba(0,255,255,0.3);
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  z-index: 100;
  align-items: center;
}

.input-area textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;

  font-size: 15px;
  line-height: 1.6;

  padding: 10px 6px;          /* IMPORTANT */
  margin: 0;

  outline: none;
  resize: none;

  max-height: 120px;          /* smaller = cleaner */
  overflow-y: auto;

  scrollbar-width: thin;      /* Firefox */
}

.input-area textarea::-webkit-scrollbar {
  width: 4px;
}

.input-area textarea::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
}

.input-area textarea::-webkit-scrollbar-track {
  background: transparent;
}

.plus,
.voice,
.send {
  background: rgba(0,255,255,0.2);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.plus:hover,
.voice:hover,
.send:hover {
  background: #00ffff;
  color: #000;
  transform: scale(1.1);
}

/* input bar stays above footer */
.input-area{
  bottom: 40px;
}

/* =============================================================================
   FOOTER
   ========================================================================== */

.footer {
  grid-area: footer;
  background: rgba(10,10,10,0.8);
  color: #666;
  text-align: center;
  font-size: 12.5px;
  line-height: 28px;
  backdrop-filter: blur(10px);
  border-top: 1px solid #333;
}

.footer{
  position: relative;
  height: 30px;
  flex-shrink: 0;
}

/* ===== PREMIUM SUGGESTION BAR (REFINED & COMPACT) ===== */

.suggestions{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  display:flex;
  flex-direction:column;
  gap:12px;
  z-index:50;
}

/* ===== SUGGESTION ITEM (THINNER + CLEAN) ===== */
.suggestion{
  width:240px;
  height:44px;

  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  border-radius:999px; /* pill */

  font-family:'Poppins','Inter','Segoe UI',sans-serif;
  font-size:14px;
  font-weight:500;
  letter-spacing:.2px;

  color:#ffffff;
  cursor:pointer;

  position:relative;
  overflow:hidden;

  box-shadow:
    0 6px 18px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.22);

  transition:transform .25s ease, box-shadow .25s ease;
}

/* 💖 Talk to GF */
.suggestion:nth-child(1){
  background:linear-gradient(135deg,#3a1c4a,#6b3a7d);
}

/* 🧠 Need Advice */
.suggestion:nth-child(2){
  background:linear-gradient(135deg,#0f3f3f,#3c9c76);
}

/* 😔 Feeling Lonely */
.suggestion:nth-child(3){
  background:linear-gradient(135deg,#252525,#6e2b2b);
}

/* 🔥 Motivate Me */
.suggestion:nth-child(4){
  background:linear-gradient(135deg,#6a3200,#ff8a00);
}

/* ===== SOFT TOP SHEEN ===== */
.suggestion::before{
  content:'';
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:45%;
  background:linear-gradient(
    to bottom,
    rgba(255,255,255,0.16),
    transparent
  );
  pointer-events:none;
}

/* ===== HOVER (SUBTLE PREMIUM) ===== */
.suggestion:hover{
  transform:translateY(-2px) scale(1.02);
  box-shadow:
    0 10px 28px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.28);
}

/* ===== ORBITING LINE EFFECT AROUND ALL SUGGESTIONS ===== */

.suggestions::after{
  content:'';
  position:absolute;
  top:-16px;
  left:-16px;
  right:-16px;
  bottom:-16px;

  border-radius:26px;
  pointer-events:none;

  background:
    conic-gradient(
      from 0deg,
      transparent 0deg,
      rgba(0,255,255,0.85) 40deg,
      transparent 80deg,
      transparent 180deg,
      rgba(255,0,200,0.85) 220deg,
      transparent 260deg,
      transparent 360deg
    );

  filter:blur(1.5px);
  animation:orbitGlow 5s linear infinite;

  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
          mask-composite:exclude;

  padding:2.5px;
}

/* ===== ORBIT ROTATION ===== */
@keyframes orbitGlow{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}

/* ===================== MOBILE ONLY - PHONE VIEW ===================== */
@media (max-width: 768px) {
  .sidebar {
    border-right: none !important;
  }
}
@media (max-width: 768px) {
  body.sidebar-open .suggestions {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .chat {
    position: relative;
    z-index: 1;
  }

  .sidebar {
    z-index: 10000 !important;
  }
}
@media (max-width: 768px) {
  .input-area {
    bottom: 10px !important;
    padding: 8px 10px !important;
  }

  .plus, .voice, .send {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }
}
@media (max-width: 768px) {
  .suggestions::after {
    display: none;
  }
}
@media (max-width: 768px) {
  .suggestion {
    width: 200px;
    height: 38px;
    font-size: 13px;
  }
}
@media (max-width: 768px) {
  .suggestions {
    top: 36%;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .message.bot {
    max-width: 92%;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.5;
    border-left: 3px solid #00ffff;
  }
}
@media (max-width: 768px) {
  .app { 
    grid-template-columns: 1fr !important; 
    grid-template-areas: "header" "chat" "footer" !important; 
    height: 100dvh; 
  }

/* Hide only unnecessary header buttons on mobile */
.header-icons button:not(#toggleSidebarBtn, #toggleAvatarsBtn, #loginBtn) {
  display: none !important;
}
@media (max-width:768px){

#loginBtn,
#userAvatar{
  width:38px;
  height:38px;
  font-size:14px;
}

}
  

  /* NEW: Slimmer header - no banner, smaller height */
  .header { 
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    height: 60px !important;
    min-height: 60px !important;
  }
  .header-logo {
  display: none !important;
}
  .logo { 
    position: static !important; 
    font-size: 26px !important; 
    order: 2;
  }
  .header-banner { 
    display: none !important; 
  }

  /* Left button (hamburger) */
  #toggleSidebarBtn {
  display: flex !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50%;
  font-size: 18px !important;
}

  /* Right button (avatars) */
  #toggleAvatarsBtn {
    background: rgba(0,255,255,0.25) !important; 
    border: 2px solid rgba(0,255,255,0.6) !important; 
    width: 44px !important; 
    height: 44px !important; 
    border-radius: 50% !important; 
    font-size: 19px !important; 
    order: 3;
  }

  /* Sliding Sidebar */
  .sidebar {
    position: fixed !important; top: 0; bottom: 0; left: -320px; width: 320px; height: 100dvh;
    z-index: 9999; transition: left 0.35s ease; display: block !important;
  }
  .sidebar.open { left: 0; box-shadow: 10px 0 30px rgba(0,0,0,0.7); }

  /* Dark overlay */
  body.sidebar-open::before {
    content: ''; position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 9998;
  }

  /* REMOVE FOOTER ON PHONE */
  .footer { display: none !important; }

  .chat { padding: 12px !important; height: calc(100dvh - 140px) !important; }

  /* NEW: Smaller, narrower text bar with circular buttons */
  .input-area { 
    position: fixed !important; 
    bottom: 16px !important; 
    left: 12px !important; 
    right: 12px !important; 
    width: auto !important; 
    max-width: none !important; 
    transform: none !important; 
    padding: 10px 14px !important; 
    gap: 10px !important; 
    border-radius: 50px !important;

    background: rgba(30,30,40,0.95);

box-shadow:
  0 0 0 1px rgba(0,255,255,0.25),
  0 10px 30px rgba(0,0,0,0.6);

transition: height 0.15s ease;
  }
  input { 
    font-size: 16px !important; 
    padding: 8px 0 !important;
  }
  .plus, .voice, .send { 
    width: 42px !important; 
    height: 42px !important; 
    font-size: 18px !important; 
    border-radius: 50% !important;
  }
}








/* Voice status text (e.g., "Listening..." or "Speak in Hindi/English") */
.voice-status {
  font-size: 13px;
  color: #00ffff;
  opacity: 0;
  transition: opacity 0.3s ease;
  margin-left: 8px;
  pointer-events: none;
}

.voice-status.active {
  opacity: 1;
}

/* Mic icon color changes */
#micIcon.listening {
  color: #ff3366;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}





.speak-btn {
  background: none;
  border: none;
  color: #00ffff;
  font-size: 18px;
  margin-left: 12px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.speak-btn:hover {
  opacity: 1;
  transform: scale(1.2);
}

.message.bot p {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}



.speaker-toggle {
  background: rgba(0,255,255,0.2);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.speaker-toggle.active {
  background: #00ffff;
  color: #000;
}












.version-btn {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  background: #2d2d2d;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.version-btn.pro {
  background: linear-gradient(90deg, #8b5cf6, #d946ef);
}

.version-btn.pro-plus {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}





.bot-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.bot-label {
  margin-left: 14px;
  margin-bottom: 4px;
  font-weight: bold;
  color: #00ffff;
  opacity: 0.9;
}










/* ================= USER AVATAR ================= */
/* USER AVATAR – SAME AS LOGIN BUTTON */
/* USER AVATAR – SAME SIZE, SAME ALIGNMENT */
#userAvatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 255, 255, 0.18);
  border: 1.5px solid rgba(0, 255, 255, 0.4);

  color: #000;
  font-size: 18px;
  font-weight: 700;

  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


/* SHARED HOVER EFFECT */
#loginBtn:hover,
#userAvatar:hover {
  transform: scale(1.08);
  box-shadow: 0 0 22px rgba(0, 255, 255, 0.6);
}


#userAvatar:hover {
  transform: scale(1.15);
  box-shadow: 0 0 40px rgba(255,255,255,1);
}


/* ================= DROPDOWN BASE ================= */
#userDropdown {
  position: absolute;
  top: 60px;
  right: 0;
  width: 230px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(10, 15, 30, 0.95);
  display: none;
  z-index: 9999;
  backdrop-filter: blur(16px);
  overflow: hidden;
}

/* ================= REVOLVING NEON BORDER ================= */
#userDropdown::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: conic-gradient(
    #00ffff,
    #7c3aed,
    #ff00ff,
    #00ff88,
    #00ffff
  );
  animation: spinBorder 3s linear infinite;
  z-index: -1;
}

#userDropdown::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 16px;
  background: rgba(10, 15, 30, 0.96);
  z-index: -1;
}

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

/* ================= USERNAME ================= */
#usernameText {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #00ffff;
  margin-bottom: 14px;
  text-shadow: 0 0 10px rgba(0,255,255,0.8);
}

/* ================= PLAN BUTTON ================= */
#planBtn {
  background: linear-gradient(135deg, #7c3aed, #00ffff);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
  box-shadow: 0 0 15px rgba(124,58,237,0.8);
  transition: transform 0.2s, box-shadow 0.2s;
}

#planBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(124,58,237,1);
}

/* ================= LOGOUT BUTTON ================= */
#logoutBtn {
  background: linear-gradient(135deg, #ff004c, #ff8a00);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255,0,76,0.7);
  transition: transform 0.2s, box-shadow 0.2s;
}

#logoutBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(255,0,76,1);
}









/* FIX: remove sidebar from grid on mobile */
@media (max-width: 768px) {
  .sidebar {
    grid-area: unset !important;
  }
}







@media (max-width: 768px) {
  .app:has(.sidebar.collapsed) {
    grid-template-columns: 1fr !important;
  }
}


/* ================= MOBILE SIDEBAR BUTTON POLISH ================= */
@media (max-width: 768px) {

  .sidebar {
    padding: 20px 16px !important;
    gap: 18px !important;
  }

  .sidebar button {
    padding: 14px 18px !important;
    font-size: 15px !important;
    border-radius: 14px !important;

    background: rgba(255,255,255,0.10) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;

    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.15),
      0 6px 18px rgba(0,0,0,0.45) !important;
  }

  .sidebar button:not(:last-child) {
    margin-bottom: 10px !important;
  }

  .sidebar button:active {
    transform: scale(0.97) !important;
  }

  .version,
  .upgrade {
    margin-top: 22px !important;
    padding: 14px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(0,255,255,0.25) !important;
  }
}





/* ================= MOBILE CHAT CONTAINER FIX ================= */
@media (max-width: 768px) {

  /* make header fixed height */
  .header{
    height:60px !important;
  }

  /* create a container area between header and input */
  .chat{
    position:fixed !important;
    top:60px !important;
    bottom:90px !important;
    left:0;
    right:0;

    overflow:hidden !important;
    padding:10px !important;
  }

  /* messages scroll inside this container */
  #messages{
    height:100%;
    overflow-y:auto;
    padding-bottom:20px;
  }

}












/* ===== MOBILE WHATSAPP STYLE INPUT ===== */

@media (max-width:768px){

.input-area{
  position:fixed;
  bottom:0;
  left:0;
  right:0;

  display:flex;
  align-items:center;
  gap:6px;

  padding:6px 8px;

  background:#0b0b0b;
  border-top:1px solid #222;
}

/* textarea gets most space */
.input-area textarea{
  flex:1;

  height:34px;
  max-height:80px;

  border-radius:20px;
  padding:6px 12px;

  background:#1c1c1c;
  border:none;
  outline:none;

  color:white;
  font-size:14px;
}

/* shrink buttons */
.input-area button{
  width:32px;
  height:32px;

  border-radius:50%;
  border:none;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:14px;
}

/* + */
.input-area .plus{
  background:#1c1c1c;
  color:#18e1d1;
}

/* mic */
.input-area .voice{
  background:#1c1c1c;
  color:#18e1d1;
}

/* speaker */
.input-area .speaker-toggle{
  background:#1c1c1c;
  color:#18e1d1;
}

/* send */
.input-area .send{
  background:#18e1d1;
  color:black;
}

}


/* ================= MOBILE INPUT FIX ================= */

@media (max-width:768px){

/* container */
.input-area{
  position:fixed !important;
  bottom:0 !important;
  left:0;
  right:0;

  display:flex !important;
  align-items:center !important;

  gap:6px !important;
  padding:6px 8px !important;

  background:#0b0b0b !important;
  border-top:1px solid #222 !important;

  
}
.input-area .voice{
  margin-left:6px !important;
}

/* textarea takes most space */
.input-area textarea{
  flex:1 !important;
  width:100% !important;

  height:34px !important;
  max-height:90px !important;

  padding:6px 10px !important;

  border-radius:18px !important;

  background:#1c1c1c !important;
  border:none !important;

  font-size:14px !important;
}

/* buttons smaller */
.input-area button{
  flex:0 0 auto !important;

  width:30px !important;
  height:30px !important;

  padding:0 !important;

  border-radius:50% !important;
}

/* send button highlight */
.input-area .send{
  background:#18e1d1 !important;
  color:black !important;
}

}












/* ===== FINAL MOBILE INPUT FIX ===== */

@media (max-width:768px){

.input-area{
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
}

/* textarea takes almost all space */
.input-area textarea{
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
}

/* make buttons smaller so textarea grows */
.plus,
.voice,
.speaker-toggle,
.send{
  width:28px !important;
  height:28px !important;
  font-size:13px !important;
}

}


/* ===== MOBILE SIDEBAR BUTTON UPGRADE ===== */

@media (max-width:768px){

#toggleSidebarBtn{
  width:44px !important;
  height:44px !important;

  border-radius:50% !important;

  background:rgba(0,255,255,0.18) !important;
  border:2px solid rgba(0,255,255,0.6) !important;

  display:flex !important;
  align-items:center;
  justify-content:center;

  font-size:20px !important;

  box-shadow:
    0 0 12px rgba(0,255,255,0.5),
    inset 0 0 6px rgba(0,255,255,0.25);

  transition:all .2s ease;
}

/* hover / tap effect */
#toggleSidebarBtn:active{
  transform:scale(.92);
  box-shadow:
    0 0 20px rgba(0,255,255,0.8);
}

}






/* ===== MOBILE HEADER BUTTON ALIGNMENT ===== */

@media (max-width:768px){

.header-icons{
  top:8px !important;          /* move buttons up */
  right:10px !important;

  display:flex !important;
  align-items:center !important;
  gap:12px !important;
}

/* make all header buttons same size */
.header-icons button,
#loginBtn,
#userAvatar{
  width:38px !important;
  height:38px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  font-size:16px !important;
}

}





/* ===== MOBILE HEADER TITLE ===== */

@media (max-width:768px){

.header{
  position:relative;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

/* fameleo text */
.mobile-title{
  position:absolute !important;
  left:50% !important;
  transform:translateX(-50%) !important;

  font-size:22px !important;
  font-weight:700;

  color:#ffffff;
  text-shadow:0 0 12px rgba(0,255,255,0.6);

  pointer-events:none;
}

}








/* ===================== THEME VARIABLES ===================== */
:root {
  --bg-main: #0a0a0a;
  --bg-secondary: #1a1a1d;
  --accent: #00ffff;
  --text: #ffffff;
}

/* Apply globally */
body {
  background: var(--bg-main);
  color: var(--text);
}

.header {
  background: var(--bg-secondary);
}

.sidebar {
  background: var(--bg-secondary);
}

.chat {
  background: var(--bg-main);
}

/* Accent usage */
.message.bot {
  border-left: 4px solid var(--accent);
}

/* ===================== THEMES ===================== */

/* 💗 GF THEME */
body.theme-gf {
  --bg-main: #140a10;
  --bg-secondary: #2a1320;
  --accent: #ff4d88;
  --text: #ffe6f0;
}

/* 👨 BRO THEME */
body.theme-bro {
  --bg-main: #0f141a;
  --bg-secondary: #18222a;
  --accent: #4da6ff;
}

/* 👩 MOM THEME */
body.theme-mom {
  --bg-main: #1a1410;
  --bg-secondary: #2a2218;
  --accent: #ff9966;
}






.header-icons button,
.plus,
.voice,
.send,
.speaker-toggle {
  background: rgba(0,255,255,0.15);
  border-color: var(--accent);
}

/* hover */
.header-icons button:hover,
.plus:hover,
.voice:hover,
.send:hover {
  background: var(--accent);
  color: #000;
}



.theme-transition {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  grid-template-rows: repeat(12, 1fr);
  z-index: 99999;
  pointer-events: none;
}

.theme-transition .block {
  background: var(--bg-main);
  transform: rotateY(0deg);
  .theme-transition .block {
  background: black;
  opacity: 1;
  animation: smoothReveal 0.8s forwards;
}
}

@keyframes smoothReveal {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes flipBlock {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(90deg);
    background: black;
  }
  100% {
    transform: rotateY(0deg);
    background: transparent;
  }
}






/* ================= FORCE THEME OVERRIDE ================= */

body.theme-gf {
  background: #140a10 !important;
}

body.theme-gf .app,
body.theme-gf .chat {
  background: #140a10 !important;
}

body.theme-gf .header,
body.theme-gf .sidebar {
  background: #2a1320 !important;
}

body.theme-gf .message.bot {
  background: linear-gradient(135deg, #3a1c2a, #2a1320) !important;
  border-left: 4px solid #ff4d88 !important;
}

body.theme-gf .message.user {
  background: linear-gradient(135deg, #5a2a3a, #3a1c2a) !important;
}

body.theme-gf .input-area {
  border: 2px solid #ff4d88 !important;
}

body.theme-gf .send,
body.theme-gf .voice,
body.theme-gf .plus {
  background: #ff4d88 !important;
  color: black !important;
}





/* ===== FINAL HARD THEME OVERRIDE ===== */

body.theme-gf,
body.theme-gf .app,
body.theme-gf .chat {
  background: #140a10 !important;
}

body.theme-gf .header,
body.theme-gf .sidebar {
  background: #2a1320 !important;
}

body.theme-gf .message.bot {
  background: linear-gradient(135deg, #3a1c2a, #2a1320) !important;
  border-left: 4px solid #ff4d88 !important;
}

body.theme-gf .message.user {
  background: linear-gradient(135deg, #5a2a3a, #3a1c2a) !important;
}

body.theme-gf .input-area {
  border: 2px solid #ff4d88 !important;
}

body.theme-gf .send,
body.theme-gf .voice,
body.theme-gf .plus,
body.theme-gf .speaker-toggle {
  background: #ff4d88 !important;
  color: black !important;
}





/* ===== ROYAL WAVE REVEAL ===== */

.theme-transition {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  grid-template-rows: repeat(18, 1fr);
  z-index: 999999;
  pointer-events: none;
}

/* 🔥 blocks START invisible → reveal new theme */
.theme-transition .block {
  background: #000;   /* OLD COVER */
  animation: revealWave 0.7s forwards;
}
/* 🔥 smooth wave reveal */
@keyframes revealWave {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes revealWave {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;  /* reveal new theme behind */
  }
}


/* ===== WAVE FRONT (ROYAL EFFECT) ===== */

.theme-wave {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;

  background: linear-gradient(
    120deg,
    transparent 35%,
    rgba(0,255,255,0.08) 45%,
    rgba(0,255,255,0.18) 50%,
    rgba(0,255,255,0.08) 55%,
    transparent 65%
  );

  transform: translate(-100%, -100%) rotate(25deg);
  transition: transform 1.4s cubic-bezier(0.4,0,0.2,1);

  pointer-events: none;
  z-index: 10;
}

  transform: translate(-100%, -100%) rotate(25deg);
  transition: transform 1.2s cubic-bezier(0.4,0,0.2,1);

  pointer-events: none;
  z-index: 10;
}

/* 🔥 animate wave */
.theme-wave.animate {
  transform: translate(100%, 100%) rotate(25deg);
}





/* LOCK SCREEN */
.setup-lock #messages,
.setup-lock textarea,
.setup-lock .send {
  pointer-events: none;
  opacity: 0.5;
}

.highlight-settings {
  pointer-events: auto !important;
  opacity: 1 !important;
  box-shadow: 0 0 20px #00ffff;
}

#settingsArrow {
  position: fixed;
  top: 80px;
  right: 120px;
  color: #00ffff;
  font-weight: bold;
  z-index: 9999;
}

/* MODAL */
.settings-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.settings-container {
  width: 1000px;
  height: 600px;
  background: #111;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 80px 1fr 60px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.8);
}

.settings-sidebar {
  background: #1e1e2e;
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 10px;
  border-right: 1px solid #333;
}

.settings-sidebar button {
  background: #2a2a3a;
  border: none;
  color: white;
  padding: 12px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
}

.settings-sidebar button:hover {
  background: #00ffff;
  color: black;
}

.settings-content {
  padding: 20px;
  overflow-y: auto;
  color: white;
}

.hidden {
  display: none;
}

.settings-avatars {
  grid-column: 1 / 3;
  display: flex;
  gap: 10px;
  padding: 15px;
  background: #1a1a1d;
  border-bottom: 1px solid #333;
  justify-content: center;
}

.settings-avatars button {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: #333;
  color: white;
  cursor: pointer;
}

.settings-avatars button:hover {
  background: #00ffff;
  color: black;
}


#saveSettingsBtn {
  grid-column: 1 / 3;
  background: #00ffff;
  border: none;
  color: black;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
}

#saveSettingsBtn:hover {
  background: #00cccc;
}
#settingsModal {
  pointer-events: auto !important;
  z-index: 9999;
}
#settingsModal * {
  pointer-events: auto;
}

/* 🔥 FORCE SETTINGS BUTTON CLICKABLE */
.setup-lock .header-icons button {
  pointer-events: auto !important;
  opacity: 1 !important;

 .settings-avatars button.active {
  background: #00ffff;
  color: black;
}
}
