/* ─── Chat Toggle Button ─────────────────────────────────────── */
#chatToggleBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #00ffc3;
  color: #000;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 20px rgba(0, 255, 195, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
}

#chatToggleBtn:hover {
  background: #00d9a8;
  box-shadow: 0 0 32px rgba(0, 255, 195, 0.55);
  transform: scale(1.06);
}

/* ─── Chatbox container ──────────────────────────────────────── */
#chatbox {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 320px;
  height: 440px;
  border: 1px solid rgba(0, 255, 195, 0.25);
  border-radius: 18px;
  display: none;
  flex-direction: column;
  background: rgba(10, 20, 28, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #eef2f5;
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  z-index: 9999;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  box-sizing: border-box;
}

/* ─── Chat header ────────────────────────────────────────────── */
#chatHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem 0.7rem 1rem;
  background: rgba(0, 255, 195, 0.07);
  border-bottom: 1px solid rgba(0, 255, 195, 0.12);
  flex-shrink: 0;
}

#chatHeader span {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(0, 255, 195, 0.85);
}

/* ─── Close button ───────────────────────────────────────────── */
#closeChatBtn {
  background: transparent;
  border: none;
  color: rgba(0, 255, 195, 0.7);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 10001;
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

#closeChatBtn:hover {
  color: #00ffc3;
  transform: scale(1.15);
}

/* ─── Messages ───────────────────────────────────────────────── */
#messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  scroll-behavior: smooth;
}

#messages::-webkit-scrollbar {
  width: 4px;
}

#messages::-webkit-scrollbar-track {
  background: transparent;
}

#messages::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 195, 0.2);
  border-radius: 4px;
}

.message {
  margin: 6px 0;
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 85%;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
}

.user {
  margin-left: auto;
  background: rgba(0, 255, 195, 0.12);
  border: 1px solid rgba(0, 255, 195, 0.2);
  color: #00ffc3;
  text-align: right;
  border-bottom-right-radius: 4px;
}

.bot {
  margin-right: auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #c5d8e4;
  text-align: left;
  border-bottom-left-radius: 4px;
}

/* ─── Input area ─────────────────────────────────────────────── */
#inputArea {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

#input {
  flex-grow: 1;
  padding: 0.6rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #eef2f5;
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}

#input:focus {
  border-color: rgba(0, 255, 195, 0.35);
}

#input::placeholder {
  color: rgba(122, 150, 168, 0.5);
}

#sendBtn {
  background: #00ffc3;
  border: none;
  border-radius: 20px;
  padding: 0 1rem;
  cursor: pointer;
  color: #000;
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 0.25s ease, transform 0.2s ease;
  flex-shrink: 0;
}

#sendBtn:hover {
  background: #00d9a8;
  transform: scale(1.04);
}