/* ============================================================
   TELA DE LOGIN — OVERLAY DE SUCESSO (LOGIN / CADASTRO / RECUPERAÇÃO)
   Parte 4/9 da antiga style.css (linhas 1034–1362 do original).
   A ordem das <link> no index.html repete a ordem original do arquivo,
   então a cascata é exatamente a mesma de antes da divisão.
   ============================================================ */

/* Success overlay */
/* ===================== SUCCESS OVERLAY (login / cadastro / recuperação)
 * Cena aberta na linguagem do hero do chat: coroa flutuando sobre halo
 * radial pulsante, nome em gradiente animado e ornamento de corte. ===================== */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* Era rgba(5,5,5,0.9) + 2 gradientes radiais + blur(18px) de tela cheia.
     Desfoque de tela cheia é caro e os gradientes faixam no TN. */
  background: rgba(11, 11, 17, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: overlayIn 0.45s ease-out;
}

[data-theme="light"] .success-overlay {
  background: rgba(244, 244, 247, 0.94);
}

.success-scene {
  position: relative;
  text-align: center;
  width: min(92vw, 480px);
  animation: successPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

/* Coroa sobre o halo radial (mesma receita do .empty-crown do chat) */
.success-crown-slot {
  position: relative;
  width: 150px;
  height: 122px;
  margin: -30px auto 26px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.success-crown-slot::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 42%;
  width: 320px;
  height: 320px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.22) 0%, rgba(139, 92, 246, 0.12) 35%, transparent 70%);
  filter: blur(36px);
  animation: brandHaloPulse 6s ease-in-out infinite;
  pointer-events: none;
}

[data-theme="light"] .success-crown-slot::before {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.14) 0%, rgba(139, 92, 246, 0.08) 35%, transparent 70%);
}

.success-crown {
  position: relative;
  z-index: 1;
  width: 128px;
  animation: crownFloat 3.5s ease-in-out infinite;
}

/* Poeira mágica: partículas que sobem da base da coroa */
.success-mote {
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(196, 168, 255, 0.9);
  box-shadow: 0 0 6px rgba(167, 139, 250, 0.9);
  opacity: 0;
  animation: moteRise 7s ease-in-out infinite;
  pointer-events: none;
}

.mote-1 { left: 24%; animation-delay: 0s; }
.mote-2 { left: 66%; width: 3px; height: 3px; animation-delay: 2.3s; }
.mote-3 { left: 46%; width: 2.5px; height: 2.5px; animation-delay: 4.6s; }

[data-theme="light"] .success-mote {
  background: rgba(139, 92, 246, 0.8);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}

/* Selo do e-mail (recuperação de senha) */
.success-badge {
  position: relative;
  z-index: 1;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 34px rgba(139, 92, 246, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: crownFloat 4s ease-in-out infinite;
}

.success-badge svg {
  width: 36px;
  height: 36px;
  color: var(--color-brand-light);
}

[data-theme="light"] .success-badge {
  background: rgba(139, 92, 246, 0.07);
  box-shadow: 0 0 26px rgba(139, 92, 246, 0.12);
}

[data-theme="light"] .success-badge svg {
  color: #7c3aed;
}

/* Eyebrow — chamada em caps com tracking largo */
.success-eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  animation: riseIn 0.5s var(--ease-out-expo) 0.18s both;
}

[data-theme="light"] .success-eyebrow {
  color: var(--color-text-muted);
}

/* Nome — cor sólida (era gradiente animado + drop-shadow, repintura contínua) */
.success-name {
  margin: 0 0 4px;
  font-size: clamp(1.8rem, 5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
  color: var(--color-brand-light);
  animation: riseIn 0.5s var(--ease-out-expo) 0.24s both;
}

[data-theme="light"] .success-name {
  color: var(--color-brand-dark);
}

/* Divisor ornamental — traço com gema central */
.success-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 240px;
  max-width: 70%;
  margin: 18px auto 20px;
  animation: riseIn 0.5s var(--ease-out-expo) 0.3s both;
}

.success-ornament i {
  flex: 1;
  height: 1px;
  background: rgba(var(--color-brand-rgb), 0.5);
}

.success-ornament i:last-child {
  background: rgba(var(--color-brand-rgb), 0.5);
}

.success-ornament .gem {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border-radius: 1px;
  background: var(--color-brand-accent);
  box-shadow: 0 0 10px rgba(var(--color-brand-rgb), 0.8);
}

[data-theme="light"] .success-ornament i {
  background: rgba(var(--color-brand-rgb), 0.45);
}

[data-theme="light"] .success-ornament i:last-child {
  background: rgba(var(--color-brand-rgb), 0.45);
}

/* Linha de status com ponto pulsante */
.success-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 0 30px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.55);
  animation: riseIn 0.5s var(--ease-out-expo) 0.36s both;
}

.success-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
  animation: dotPulse 2.2s ease-in-out infinite;
}

/* Frases alternadas — sai por cima, entra por baixo com blur */
.success-phrase {
  display: inline-block;
}

.success-phrase.is-animating {
  animation: phraseSwap 0.8s ease both;
}

@keyframes phraseSwap {
  0% { opacity: 1; transform: translateY(0); filter: blur(0); }
  35% { opacity: 0; transform: translateY(-8px); filter: blur(3px); }
  40% { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

[data-theme="light"] .success-line {
  color: rgba(45, 27, 46, 0.6);
}

/* Nota descritiva (recuperação de senha) */
.success-note {
  max-width: 320px;
  margin: 0 auto 30px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  line-height: 1.6;
  animation: riseIn 0.5s var(--ease-out-expo) 0.36s both;
}

[data-theme="light"] .success-note {
  color: rgba(45, 27, 46, 0.6);
}

/* Ação dentro da nota do overlay (hoje: "Reenviar e-mail").
   É <button> de propósito, não <a>: dispara uma ação, não navega. Fica com
   cara de link porque é assim que se lê como ação secundária. */
.success-note-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--color-brand);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.success-note-link:hover:not(:disabled) {
  color: var(--color-brand-light);
}

.success-note-link:disabled {
  cursor: default;
  opacity: 0.65;
  text-decoration: none;
}

/* Botão — vidro com borda fina, preenche no hover */
.btn-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 32px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.08);
  color: #ede9fe;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease,
    transform 0.18s var(--ease-spring);
  animation: riseIn 0.5s var(--ease-out-expo) 0.44s both;
}

.btn-continue:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(124, 58, 237, 0.2));
  border-color: rgba(167, 139, 250, 0.7);
  box-shadow: 0 10px 36px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-continue:active {
  transform: translateY(0) scale(0.98);
}

.btn-continue .btn-arrow {
  color: var(--color-brand-light);
  transition: transform 0.2s var(--ease-out-expo);
}

.btn-continue:hover .btn-arrow {
  transform: translateX(4px);
}

[data-theme="light"] .btn-continue {
  color: #5b21b6;
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(124, 58, 237, 0.4);
}

[data-theme="light"] .btn-continue:hover {
  background: rgba(139, 92, 246, 0.14);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.18);
}

[data-theme="light"] .btn-continue .btn-arrow {
  color: #7c3aed;
}

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

@keyframes moteRise {
  0% { opacity: 0; transform: translateY(0) translateX(0); }
  15% { opacity: 0.9; }
  60% { opacity: 0.35; }
  100% { opacity: 0; transform: translateY(-92px) translateX(10px); }
}

