/* WeChat Floating Button */
#wechat-btn {
  position: fixed;
  bottom: 88px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #07C160 0%, #04A751 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(7, 193, 96, 0.45);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  border: none;
  animation: wechat-float 3s ease-in-out infinite;
}

#wechat-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 30px rgba(7, 193, 96, 0.6);
  background: linear-gradient(135deg, #04A751 0%, #038545 100%);
}

#wechat-btn:active {
  transform: translateY(0) scale(0.98);
}

#wechat-btn .wechat-icon {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
}

#wechat-btn .wechat-text {
  white-space: nowrap;
}

@keyframes wechat-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Hide Luna button when WeChat overlay is open (future-proofing) */
body.wechat-open #luna-chat-btn {
  bottom: 16px;
}

/* Mobile responsive for WeChat */
@media (max-width: 640px) {
  #wechat-btn {
    bottom: 80px;
    right: 16px;
    padding: 10px 16px;
    font-size: 13px;
  }

  #wechat-btn .wechat-icon {
    font-size: 18px;
  }
}

/* Luna Chat Floating Button */
#luna-chat-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #E8A1AE 0%, #D4849B 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(232, 161, 174, 0.45);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  border: none;
  animation: luna-float 3s ease-in-out infinite;
}

#luna-chat-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 30px rgba(232, 161, 174, 0.6);
  background: linear-gradient(135deg, #D4849B 0%, #C4718A 100%);
}

#luna-chat-btn:active {
  transform: translateY(0) scale(0.98);
}

#luna-chat-btn .luna-icon {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  animation: luna-bounce 2s ease-in-out infinite;
}

#luna-chat-btn .luna-text {
  white-space: nowrap;
}

@keyframes luna-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes luna-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Chat Overlay */
#luna-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

#luna-overlay.active {
  display: flex;
  opacity: 1;
}

/* Backdrop */
#luna-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(47, 27, 23, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Chat Panel */
#luna-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 90vh;
  margin: auto;
  background: #F8F5F1;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 60px rgba(47, 27, 23, 0.2);
  animation: luna-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  #luna-panel {
    max-height: 85vh;
    border-radius: 24px;
    margin: 5vh auto;
    height: calc(90vh - 10vh);
  }
}

@keyframes luna-slide-up {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Header */
#luna-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(135deg, #E8A1AE 0%, #D4849B 100%);
  color: #fff;
  flex-shrink: 0;
  user-select: none;
}

#luna-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

#luna-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

#luna-header-info h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

#luna-header-info p {
  margin: 2px 0 0;
  font-size: 11px;
  opacity: 0.88;
  font-weight: 400;
}

#luna-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

#luna-close:hover {
  background: rgba(255,255,255,0.35);
  transform: rotate(90deg);
}

/* Body */
#luna-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

#luna-body-inner {
  width: 100%;
}

.luna-welcome-icon {
  font-size: 56px;
  margin-bottom: 8px;
  animation: luna-wave 2.5s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(232, 161, 174, 0.35));
}

@keyframes luna-wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(14deg); }
  75% { transform: rotate(-8deg); }
}

#luna-body h2 {
  margin: 0 0 6px;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: #2F1B17;
  font-weight: 600;
}

#luna-body p {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.65;
  color: #5C4037;
  max-width: 320px;
}

/* Start Button */
#luna-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: linear-gradient(135deg, #E8A1AE 0%, #D4849B 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(232, 161, 174, 0.4);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  border: none;
}

#luna-start-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 26px rgba(232, 161, 174, 0.55);
}

#luna-start-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Feature tags */
.luna-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.luna-tag {
  padding: 5px 14px;
  background: rgba(232, 161, 174, 0.12);
  color: #B07A88;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}

.luna-tag:hover {
  background: rgba(232, 161, 174, 0.24);
  color: #8B5E6A;
  transform: translateY(-1px);
}

/* Footer hint */
#luna-footer-hint {
  padding: 12px 22px;
  text-align: center;
  font-size: 11px;
  color: #A08880;
  background: rgba(47, 27, 23, 0.03);
  border-top: 1px solid rgba(47, 27, 23, 0.06);
  flex-shrink: 0;
}

/* Hide floating button when overlay is open */
body.luna-open #luna-chat-btn {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

/* Mobile responsive */
@media (max-width: 640px) {
  #luna-chat-btn {
    bottom: 16px;
    right: 16px;
    padding: 10px 16px;
    font-size: 13px;
    gap: 6px;
  }

  #luna-chat-btn .luna-icon {
    font-size: 18px;
  }

  #luna-panel {
    max-height: 100vh;
    border-radius: 0;
  }

  #luna-body {
    padding: 24px 20px;
  }

  #luna-body h2 {
    font-size: 20px;
  }
}

/* WhatsApp Floating Button */
#whatsapp-btn {
  position: fixed;
  bottom: 152px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  border: none;
  animation: whatsapp-float 3s ease-in-out infinite;
}

#whatsapp-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
  background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
}

#whatsapp-btn:active {
  transform: translateY(0) scale(0.98);
}

#whatsapp-btn .wa-icon {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
}

#whatsapp-btn .wa-text {
  white-space: nowrap;
}

@keyframes whatsapp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Mobile responsive for WhatsApp */
@media (max-width: 640px) {
  #whatsapp-btn {
    bottom: 140px;
    right: 16px;
    padding: 10px 16px;
    font-size: 13px;
  }

  #whatsapp-btn .wa-icon {
    font-size: 18px;
  }
}
