* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f7f7f8;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("Petal.jpeg") center center no-repeat;
  background-size: 400px;
  opacity: 0.15;
  filter: blur(1px);
  pointer-events: none;
  z-index: 0;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}


.header {
  background: linear-gradient(135deg, #7C052E, #F6299F);
  display: flex;
  align-items: center;
  padding: 10px 10px;
  border-bottom: 1px solid #eee;
}

.avatar {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 2px solid #f8bbd0;
  margin-right: 12px;
}

.title-area {
  display: flex;
  flex-direction: column;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: #FFFFFF;
}

.tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  background: #AE5280;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.message {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
  animation: fadeIn 0.2s ease;
}

.user {
  align-self: flex-end;
  background: #F03F7C;
  color: white;
  border-bottom-right-radius: 6px;
}

.petal {
  align-self: flex-start;
  background: white;
  border: 1px solid #e5e5e5;
  color: #222;
  border-bottom-left-radius: 6px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.typing-dots {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: #ff4d88;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.input-area {
  padding: 16px;
  border-top: 1px solid #e5e5e5;
  background: white;
  display: flex;
  gap: 10px;
}

#message-input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 14px;
}

#message-input:focus {
  outline: none;
  border-color: #0E2066;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

#send-btn {
  padding: 12px 16px;
  background-color: #F48FB1;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

#send-btn:hover {
  background-color: #ec407a;
}

/* Overlay */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.hidden {
  display: none;
}

/* Modal Box */
.modal-content {
  position: relative;
  background: white;
  width: 85%;
  max-width: 320px;
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.modal-content h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.modal-content p {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
}

/* Buttons */
.modal-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 12px;
  cursor: pointer;
}

.modal-btn.primary {
  background: #ff4f8b;
  color: white;
}

.modal-btn.premium {
  background: #222;
  color: white;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 16px;   /* changed from right */
  font-size: 22px;
  cursor: pointer;
  color: #3C3A3A;
  transition: 0.2s;
}

.close-btn:hover {
  color: #ff4d88;
}