/* Estilos Customizados e Animações para ViralPrompt */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-light: #f5f3ff;
  --secondary: #6366f1;
  --tertiary: #059669;
  --bg-main: #faf8ff;
  --surface: #ffffff;
  --text-main: #0f131c;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

/* Scrollbar invisível mas funcional */
::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  display: none;
}
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Moldura Mobile-First Responsiva */
.mobile-viewport {
  width: 100%;
  max-width: 440px;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  background-color: var(--bg-main);
  box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  body {
    background: radial-gradient(circle at 50% 0%, #ede9fe 0%, #f1f5f9 60%, #e2e8f0 100%);
    padding: 1.5rem 0;
  }
  .mobile-viewport {
    border-radius: 28px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    overflow: hidden;
  }
}

/* Transições e controle estrito de exibição de abas (SPA) */
.screen-view {
  display: none !important;
  opacity: 0;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}
.screen-view.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  pointer-events: auto !important;
  transform: translateY(0);
}

/* Regra estrita de cantos para mídias 9:16 (Bordas retas e discretas máx 6px) */
.media-frame-9-16 {
  aspect-ratio: 9 / 16;
  border-radius: 6px !important;
  overflow: hidden;
  position: relative;
  background-color: #f1f5f9;
}
.media-frame-9-16 img {
  border-radius: 6px !important;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Efeito pulsante sutil */
@keyframes pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.04); }
}
.animate-pulse-subtle {
  animation: pulse-subtle 2.5s infinite ease-in-out;
}

/* Toast de feedback */
#toast-notification {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Micro-interações táteis nos botões */
button:active, a:active {
  transform: scale(0.97);
}

/* Previne setas duplicadas do Tailwind Forms e corte vertical de texto em combos */
select {
  background-image: none !important;
  line-height: normal !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
}
select::-ms-expand {
  display: none;
}

/* Animação de pop / pulse para o botão de favoritar (estilo TikTok / Instagram) */
@keyframes heart-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.35) rotate(-6deg); }
  70% { transform: scale(0.92) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.animate-heart-pop {
  animation: heart-pop 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
