#chat-button {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #ff6600;
  color: white;
  border-radius: 50%;
  padding: 15px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  z-index: 9999;
}
#chat-button:hover {
  transform: scale(1.1);
}

/* Chatbox Container (Glass) */
.chat-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 320px;
  max-height: 450px;

  /* Glass effect */
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background-clip: padding-box;

  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);

  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 9998;
}

/* When open */
.chat-container.show {
  transform: translateY(0);
  opacity: 1;
}

/* Header (semi-transparent) */
.chat-header {
  background: linear-gradient(
          135deg,
          rgba(255, 102, 0, 0.75),
          rgba(255, 102, 0, 0.5)
  );
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  backdrop-filter: blur(8px) saturate(140%);
  color: white;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
.chat-header h3 {
  margin: 0;
  font-size: 16px;
}
#close-btn {
  cursor: pointer;
  font-size: 20px;
}

/* Chat box area (transparent) */
.chat-box {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: transparent;
}

/* Chat input area (glass controls) */
.chat-input {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
}
.chat-input input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  backdrop-filter: blur(6px) saturate(140%);
  padding: 10px;
  outline: none;
  font-size: 14px;
  border-radius: 10px;
  color: #111;
}
.chat-input input::placeholder {
  color: rgba(0, 0, 0, 0.55);
}
.chat-input button {
  background: rgba(255, 102, 0, 0.9);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 10px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.chat-input button:hover {
  background: rgba(255, 102, 0, 1);
  transform: translateY(-1px);
}

/* Messages (glassy bubbles) */
.user-message, .bot-message {
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
  font-weight: 600;
  color: #111;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.user-message {
  background: rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  backdrop-filter: blur(6px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  align-self: flex-end;
  text-align: right;
}
.bot-message {
  background: rgba(255, 102, 0, 0.15);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  backdrop-filter: blur(6px) saturate(140%);
  border: 1px solid rgba(255, 102, 0, 0.35);
  align-self: flex-start;
}

/* Fallback for no backdrop-filter support */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .chat-container {
    background: rgba(255, 255, 255, 0.92);
  }
  .chat-input input {
    background: rgba(255, 255, 255, 0.9);
  }
  .user-message {
    background: rgba(255, 255, 255, 0.9);
  }
  .bot-message {
    background: rgba(255, 170, 102, 0.25);
  }
}
