* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* FULL SAFE MOBILE HEIGHT */
body {
  background: radial-gradient(circle at top, #070a13f8, #020617);
  height: 100dvh;
  overflow: hidden;
}

/* APP CONTAINER */
.app {
  height: 100dvh;
  width: 100%;
  max-width: 420px;
  margin: auto;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.144);
  backdrop-filter: blur(80px);
  border-left: 1px solid rgba(255,255,255,0.1);
  border-right: 1px solid rgba(255,255,255,0.1);
  position: relative;
}
.header {
  color: rgb(255, 255, 255);
}
/* HEADER */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* KEY FIX */

  padding: 12px 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/*logo*/
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* OUTER RING ROTATE */
.ring-rotate {
  transform-origin: center;
  animation: rotateRing 3s linear infinite;
}

/* INNER RING REVERSE */
.ring-rotate-reverse {
  transform-origin: center;
  animation: rotateRingReverse 5s linear infinite;
}

/* ROTATION KEYFRAMES */
@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateRingReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* PULSE DOT */
.pulse-dot {
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}
.logo:hover svg {
  filter: drop-shadow(0 0 38px rgb(255, 8, 255));
  transform: scale(1.1);
  transition: 0.2s;
}
.bot-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.status {
  font-size: 12px;
  color: #00ffd0;
}

/* CHAT BODY */
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;

  /* prevent input overlap */
  padding-bottom: 80px;
}

/* MESSAGE */
.message {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  position: relative;

  /* GLASS EFFECT */
  backdrop-filter: blur(34px);
  -webkit-backdrop-filter: blur(14px);

  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);

  animation: fadeIn 0.25s ease;
}
.header-message {
  text-align: center;
  font-size: 12px;
  color: rgb(255, 255, 255);
  margin-bottom: 10px;
}

/* BOT MESSAGE (LEFT) */
.bot {
  align-self: flex-start;

  background: rgba(20, 30, 40, 0.45);
  color: #e9edef;

  border-bottom-left-radius: 6px;

  /* subtle cyan glow */
  box-shadow: 0 0 10px rgba(0,255,255,0.15);
}

/* USER MESSAGE (RIGHT) */
.user {
  align-self: flex-end;

  background: linear-gradient(
    135deg,
    rgba(0,255,255,0.15),
    rgba(255,0,255,0.15)
  );

  color: #ffffff;

  border-bottom-right-radius: 6px;

  box-shadow: 0 0 12px rgba(255,0,255,0.2);
}

.chat-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}

.message {
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* MENU BUTTON */
.menu-btn{
  display:flex;
  flex-direction:column;
  gap:5px;
  cursor:pointer;
}

/* lines */
.menu-btn span{
  width:24px;
  height:3px;
  background:#00ffff;
  border-radius:3px;

  transition: all 0.35s ease; /* IMPORTANT for smooth animation */
}

.nav-right{
  display:flex;
  align-items:center;
  gap:10px;
}

/* ANIMATION */
.menu-btn.active span:nth-child(1){
  transform: rotate(45deg) translate(5px,5px);
  background:magenta;
}

.menu-btn.active span:nth-child(2){
  opacity:0;
}

.menu-btn.active span:nth-child(3){
  transform: rotate(-45deg) translate(6px,-6px);
  background:magenta;
}

/* PANEL */
.menu-panel {
  position: absolute;
  top: 65px;
  right: 10px;

  width: 160px;
  padding: 8px;

  background: rgba(15, 25, 35, 0.85);
  backdrop-filter: blur(18px);

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);

  box-shadow: 0 10px 30px rgba(0,0,0,0.4);

  display: flex;
  flex-direction: column;
  gap: 6px;

  /* animation */
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  pointer-events: none;

  z-index: 100;

  transition: 0.25s ease;
}
.menu-item {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: white;

  transition: 0.2s;
}

#menuOverlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);

  opacity: 0;
  pointer-events: none;
  transition: 0.3s;

  z-index: 90;
}

#menuOverlay.show {
  opacity: 1;
  pointer-events: auto;
}

.menu-item:hover {
  background: rgba(0,255,255,0.1);
  color: cyan;
}
.menu-panel.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* OPEN STATE */
.menu-panel.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ITEMS */
.menu-item {
  padding: 12px;
  cursor: pointer;
  color: white;
  font-size: 14px;
  transition: 0.2s;
}

.menu-item:hover {
  background: rgba(0,255,255,0.1);
  color: cyan;
}

/* INPUT AREA */
.input-area {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 380px;
  padding: 0 10px;
  z-index: 100;

  position: relative; 
}

/* RGB BORDER */
.rgb-border {
  position: absolute;
  inset: 0;
  border-radius: 23px;
  padding: 1.5px;
  margin-right: 10px;
  margin-left: 10px;
  margin-bottom: 10px;

  background: linear-gradient(
    270deg,
    #00ffff,
    #ff00ff,
    #00ff88,
    #ffcc00,
    #00ffff
  );
  background-size: 300% 300%;
  animation: rgbFlow 5s linear infinite;

  /* PERFECT BORDER CUT */
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  pointer-events: none;
  z-index: 0;
}
/* INPUT BAR */
.input-bar {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px;
  border-radius: 20px;
  margin-bottom: 10px;

  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);

  border: none;
}

/* INPUT FIELD */
.input-bar input {
  flex: 1;
  border: none;
  outline: none;

  background: transparent;
  color: white;
  font-size: 14px;

  padding: 10px;
}

.input-bar input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* BUTTON */
button {
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(45deg, cyan, magenta);
  cursor: pointer;
}

/* ANIMATION */
@keyframes rgbFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* SCROLLBAR */
.chat-body::-webkit-scrollbar {
  width: 4px;
}
.chat-body::-webkit-scrollbar-thumb {
  background: cyan;
}

/* ANIMATION */
@keyframes fadeIn {
  from {opacity:0; transform: translateY(10px);}
  to {opacity:1; transform: translateY(0);}
}

.typing {
  padding: 12px 16px;
}

.dots {
  display: flex;
  gap: 5px;
}

.dots span {
  width: 6px;
  height: 6px;
  background: cyan;
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}

.dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

body::before {
  content: "";
  position: fixed;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0,255,255,0.08), transparent 60%);
  animation: moveBg 10s linear infinite;
}

@keyframes moveBg {
  0% { transform: translate(0,0); }
  50% { transform: translate(-25%, -25%); }
  100% { transform: translate(0,0); }
}


/* ALL footer */
.chat-body {
  padding-bottom: 170px;
}
.footer {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;

  text-align: center;
  font-size: 11px;
  padding: 6px;
  color: rgba(255, 255, 255, 0.767);
  z-index: 10;
}
.privacy-html {
  color: cyan;
  cursor: pointer;
}

.preet-link {
  color: #ff00ff;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}
.preet-link:hover {
  color: #00ffff;
  text-shadow: 0 0 8px #00ffff;
}
.privacy-link{
  padding:3px 8px;
  border-radius:6px;
  color:#00e5ff;
  text-decoration:none;
  transition:0.3s;
}

.privacy-link:hover{
  background:linear-gradient(90deg,#00ffff,#ff00ff);
  color:#000;
}


/* plus btn*/
.plus-btn {
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  cursor: pointer;

  font-size: 31px;
  color: cyan;

  transition: 0.2s;
}

.plus-btn:hover {
  background: rgba(0,255,255,0.1);
}
.chat-img {
  max-width: 200px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.1);
  margin-top: 4px;
}