/* ========== GLOBAL RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #141e30, #243b55);
  color: #fff;
  overflow: hidden;
}

/* ========== WRAPPER ========== */
.chat-wrapper {
  width: 95%;
  max-width: 480px;
  height: 80vh;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: fadeIn 0.8s ease-in-out;
}

/* ========== HEADER ========== */
.chat-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
}

.chat-header h1 {
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.chat-header .status {
  font-size: 0.9rem;
  color: #00ff99;
  background: rgba(0, 255, 153, 0.1);
  padding: 4px 10px;
  border-radius: 10px;
}

/* ========== CHAT BOX ========== */
.chat-box {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Scrollbar */
.chat-box::-webkit-scrollbar {
  width: 6px;
}
.chat-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

/* ========== MESSAGES ========== */
.message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 80%;
}

.message p {
  padding: 10px 15px;
  border-radius: 18px;
  line-height: 1.4;
  font-size: 0.9rem;
  word-wrap: break-word;
}

.message.bot {
  align-self: flex-start;
}

.message.bot p {
  background: rgba(255, 255, 255, 0.1);
  color: #e5e5e5;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.user p {
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #fff;
}

/* Avatar (optional) */
.avatar {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 1.2rem;
}

/* ========== INPUT AREA ========== */
.input-area {
  display: flex;
  padding: 0.8rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  gap: 10px;
}

.input-area textarea {
  flex: 1;
  border: none;
  border-radius: 20px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  resize: none;
  height: 45px;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}

.input-area textarea:focus {
  background: white;
  color:black
  
}

.input-area button {
  width: 48px;
  height: 45px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.input-area button:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
  .chat-wrapper {
    height: 90vh;
    width: 100%;
    border-radius: 0;
  }
}
