/* style.css */
body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #fceabb, #f8b500);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.chat-container {
  width: 100%;
  max-width: 400px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 90vh;
}

.chat-header {
  background: #075e54; /* hijau WhatsApp */
  padding: 15px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  border-bottom: 2px solid #f8b500;
  animation: fadeIn 1s ease-out;
}

.chat-box {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.message {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 20px;
  word-wrap: break-word;
  line-height: 1.4;
  font-size: 0.95rem;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.user {
  align-self: flex-end;
  background: #dcf8c6; /* hijau muda WA */
  color: #333;
  border-bottom-right-radius: 5px;
}

.bot {
  align-self: flex-start;
  background: #f0f0f0;
  color: #333;
  border-bottom-left-radius: 5px;
}

.chat-input {
  display: flex;
  border-top: 1px solid #ddd;
  position: sticky;
  bottom: 0;
  background: white;
}

.chat-input input {
  flex: 1;
  padding: 15px;
  border: none;
  border-radius: 0;
  font-size: 1rem;
  outline: none;
}

.chat-input button {
  padding: 0 20px;
  background: #075e54; /* hijau WhatsApp */
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}

.chat-input button:hover {
  background: #064e44; /* sedikit lebih gelap pas hover */
}

/* Video wrapper */
.video-wrapper {
  margin-top: 15px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Pastikan iframe video tampil penuh */
.video-wrapper iframe {
  width: 100%;
  height: 200px;
  border: none;
}

/* Confetti animasi */
.confetti {
  text-align: center;
  font-size: 2rem;
  margin-top: 10px;
}

/* FadeIn animasi */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsif untuk layar kecil, tapi tetap menjaga gaya desktop */
@media screen and (max-width: 600px) {
  .chat-container {
    height: 95vh;
    margin: 10px;
  }

  .chat-header {
    font-size: 1rem;
    padding: 12px;
  }

  .chat-box {
    padding: 10px;
    gap: 8px;
  }

  .message {
    font-size: 0.92rem;
    padding: 10px 14px;
  }

  .confetti {
    font-size: 1.6rem;
  }

  .video-wrapper iframe {
    height: 180px;
  }

  .chat-input input {
    padding: 14px;
    font-size: 1rem;
  }

  .chat-input button {
    padding: 0 18px;
    font-size: 1rem;
  }
}
