/* Reset */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Body */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
  color: white;

  display: flex;
  justify-content: center;
  align-items: center;

  height: 100vh;
  overflow: hidden;

  animation: fadeIn 0.8s ease;
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}

/* Fade out */
.fade-out {
  animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
  to { opacity: 0; transform: scale(0.95); }
}

/* 💎 Glass container */
.container,
.chat-container {
  width: 90%;
  max-width: 380px;
  height: 80vh;

  padding: 20px;

  border-radius: 20px;

  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid rgba(255,255,255,0.3);

  box-shadow: 0 10px 40px rgba(0,0,0,0.25);

  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* Title */
h2 {
  text-align: center;
  margin-bottom: 15px;
}

/* Input */
input {
  width: 100%;
  padding: 14px;
  border-radius: 25px;
  border: none;
  outline: none;
  text-align: center;
  font-size: 16px;
}

/* Button */
button {
  margin-top: 15px;
  width: 100%;
  padding: 14px;
  border-radius: 25px;
  border: none;
  background: white;
  color: #ff4d6d;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  transform: scale(1.05);
}

/* 💬 Chat area */
#chat {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 60px;
}

/* 💬 Bubble */
.bubble {
  background: rgba(255,255,255,0.95);
  color: #333;
  padding: 10px 15px;
  border-radius: 20px;
  max-width: 75%;
  font-size: 15px;
  align-self: flex-start;

  animation: pop 0.3s ease;
}

/* Bubble animation */
@keyframes pop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ❤️ Floating next button */
.next-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;

  width: 60px;
  height: 60px;

  border-radius: 50%;
  background: #ff4d6d;
  color: white;
  font-size: 20px;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Final image */
.final-img img {
  width: 100%;
  border-radius: 15px;
  margin-top: 10px;
}

/* WhatsApp button */
.whatsapp a {
  display: block;
  margin-top: 15px;
  text-align: center;
  background: #25D366;
  padding: 12px;
  border-radius: 20px;
  color: white;
  text-decoration: none;
}

/* ❤️ Floating hearts */
.heart {
  position: absolute;
  font-size: 18px;
  opacity: 0.5;
  animation: float 6s linear infinite;
}

@keyframes float {
  from { transform: translateY(100vh); }
  to { transform: translateY(-10vh); }
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .bubble {
    font-size: 14px;
  }
}
