/* Estilos da mensagem final - igual à página view */
.final-message {
  width: 100%;
  max-width: 85%;
  padding: clamp(1.5rem, 5vw, 2.8rem);
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--border-radius);
  border: 1px solid rgba(244, 196, 64, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  margin: auto;
  backdrop-filter: blur(4px);
  opacity: 0.95; /* Start slightly transparent */
}

.final-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(244, 196, 64, 0.4), transparent);
  opacity: 0.8;
}

.final-message::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(244, 196, 64, 0.05) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

#previewFinalMessage, #finalMessage {
  font-family: var(--font-decorative, 'Crimson Pro', serif);
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  color: var(--color-light);
  margin: 0 0 1.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  text-align: center;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  white-space: pre-wrap;
  max-width: 100%;
  overflow-x: hidden;
}

.message-decoration {
  margin: 1rem 0 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(244, 196, 64, 0.1), transparent 70%);
  border: 1px solid rgba(244, 196, 64, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}

.message-decoration i {
  color: rgba(244, 196, 64, 0.8);
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  filter: drop-shadow(0 2px 8px rgba(244, 196, 64, 0.5));
  transition: transform 0.4s ease, color 0.4s ease, filter 0.4s ease;
}

.message-decoration:hover {
  background: radial-gradient(circle at center, rgba(244, 196, 64, 0.15), transparent 80%);
  border-color: rgba(244, 196, 64, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.message-decoration:hover i {
  transform: scale(1.2) rotate(5deg);
  color: var(--color-accent);
  filter: drop-shadow(0 3px 10px rgba(244, 196, 64, 0.6));
}

.card-author {
  font-family: var(--font-primary);
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  font-weight: 600;
  color: var(--color-accent);
  margin-top: 0.8rem;
  padding: 0.6rem 1.2rem;
  position: relative;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  border: 1px solid rgba(244, 196, 64, 0.15);
  transition: all 0.3s ease;
}

.card-author:hover {
  background: rgba(244, 196, 64, 0.08);
  border-color: rgba(244, 196, 64, 0.25);
  transform: translateY(-2px);
}

.card-author::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 1px;
  background: rgba(244, 196, 64, 0.3);
}

.final-message:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(244, 196, 64, 0.15);
  border-color: rgba(244, 196, 64, 0.3);
}

/* Animações para a seção final */
@keyframes heartbeat {
  0% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
  100% { transform: scale(1); }
}

@keyframes heartbeat-intense {
  0% { transform: scale(1); filter: brightness(1); }
  15% { transform: scale(1.25); filter: brightness(1.2); }
  30% { transform: scale(1); filter: brightness(1); }
  45% { transform: scale(1.25); filter: brightness(1.2); }
  60% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1); filter: brightness(1); }
}

.message-decoration i.heartbeat {
  animation: heartbeat 3s infinite ease-in-out;
}

.message-decoration i.heartbeat-intense {
  animation: heartbeat-intense 1.5s infinite ease-in-out;
}

.final-message.active {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(244, 196, 64, 0.2);
}

.final-message.active .message-decoration {
  animation: pulseGlow 2s infinite ease-in-out;
}
