/* ==========================================================================
   Splash premium — Eleven Labs V4 (BETA)
   Dourado de alto contraste, texto grande, ondas de áudio e grão fino.
   Fundo escuro sempre (é uma peça de marca, não segue o tema do app).
   ========================================================================== */

.v4s {
  position: fixed;
  inset: 0;
  z-index: 2187483000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .32s ease, visibility .32s ease;
  font-family: Poppins, Inter, system-ui, -apple-system, sans-serif;
}

.v4s.v4s-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.v4s-trava { overflow: hidden !important; }

/* ---------------- fundo: gradiente quente + grão ---------------- */
.v4s-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 78% 12%, rgba(255, 96, 64, .55), transparent 58%),
    radial-gradient(90% 80% at 12% 88%, rgba(9, 74, 52, .78), transparent 62%),
    radial-gradient(70% 60% at 50% 50%, rgba(255, 168, 96, .20), transparent 70%),
    linear-gradient(150deg, #1b0d0a 0%, #2a1109 38%, #10160f 72%, #04100c 100%);
  backdrop-filter: blur(26px) saturate(1.15);
  -webkit-backdrop-filter: blur(26px) saturate(1.15);
}

/* granulado fino por cima do gradiente */
.v4s-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='.55'/></svg>");
  background-size: 140px 140px;
  pointer-events: none;
}

/* halo dourado respirando atrás do card */
.v4s-backdrop::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(760px, 96vw);
  height: min(620px, 88vh);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212, 175, 55, .34), rgba(212, 175, 55, .06) 46%, transparent 70%);
  filter: blur(34px);
  animation: v4s-halo 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes v4s-halo {
  0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.94); }
  50%      { opacity: .95; transform: translate(-50%, -50%) scale(1.06); }
}

/* ---------------- card ---------------- */
.v4s-card {
  position: relative;
  width: min(660px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  box-sizing: border-box;
  padding: 34px 34px 26px;
  border-radius: 24px;
  text-align: center;
  color: #fdf8ec;
  background:
    linear-gradient(165deg, rgba(26, 20, 12, .93), rgba(11, 9, 6, .96) 55%, rgba(19, 14, 8, .95));
  border: 1px solid rgba(212, 175, 55, .55);
  box-shadow:
    0 0 0 1px rgba(255, 236, 179, .14) inset,
    0 32px 80px rgba(0, 0, 0, .72),
    0 0 70px rgba(212, 175, 55, .26);
  transform: translateY(26px) scale(.965);
  transition: transform .5s cubic-bezier(.16, .86, .24, 1);
}

.v4s.v4s-open .v4s-card {
  transform: translateY(0) scale(1);
}

/* fio dourado no topo do card */
.v4s-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, transparent, #f6e6a8 18%, #d4af37 50%, #f6e6a8 82%, transparent);
  opacity: .95;
}

.v4s-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 175, 55, .28);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  color: #f3e3b4;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.v4s-close:hover { background: rgba(212, 175, 55, .16); border-color: rgba(246, 230, 168, .6); }
.v4s-close .material-icons-round { font-size: 20px; }

/* ---------------- kicker ---------------- */
.v4s-kicker {
  margin: 2px 0 22px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: #e8cd7e;
}

/* ---------------- lockup "Eleven (V4)" ---------------- */
.v4s-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 4px;
}

.v4s-word {
  font-size: clamp(40px, 8vw, 66px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 2px 26px rgba(255, 255, 255, .26);
}

.v4s-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 20px 8px;
  border-radius: 999px;
  border: 2px solid rgba(246, 230, 168, .92);
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 700;
  line-height: 1;
  color: #fffdf6;
  background: rgba(255, 255, 255, .05);
  box-shadow: 0 0 22px rgba(212, 175, 55, .42), 0 0 0 1px rgba(212, 175, 55, .3) inset;
}

/* argola dourada girando ao redor do V4 */
.v4s-ring {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(246, 230, 168, .1) 210deg, #f6e6a8 320deg, #fff 356deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: v4s-spin 4.2s linear infinite;
  pointer-events: none;
}
@keyframes v4s-spin { to { transform: rotate(360deg); } }

/* ---------------- badge BETA ---------------- */
.v4s-beta {
  display: inline-block;
  margin: 14px 0 0;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .22em;
  color: #201703;
  background: linear-gradient(135deg, #f7e9b0, #d4af37 55%, #f2dda0);
  box-shadow: 0 3px 16px rgba(212, 175, 55, .5);
}

/* ---------------- headline ---------------- */
.v4s-card h2 {
  margin: 18px 0 0;
  font-size: clamp(23px, 3.6vw, 33px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.015em;
  color: #fffdf7;
}

.v4s-gold {
  background: linear-gradient(100deg, #fff3c4 0%, #e8c86a 30%, #d4af37 55%, #f8e9b8 78%, #c9a227 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 14px rgba(212, 175, 55, .38));
}

.v4s-sub {
  margin: 13px auto 0;
  max-width: 30em;
  font-size: clamp(13.5px, 1.7vw, 15.5px);
  line-height: 1.62;
  color: #e6dcc4;
}
.v4s-sub strong { color: #fdf3d4; font-weight: 700; }

/* ---------------- ondas de áudio ---------------- */
.v4s-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 44px;
  margin: 20px 0 4px;
}
.v4s-wave span {
  display: block;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #f8e9b8, #d4af37 60%, #8f6f12);
  box-shadow: 0 0 8px rgba(212, 175, 55, .55);
  animation: v4s-bars 1.25s ease-in-out infinite;
  height: 12px;
}
.v4s-wave span:nth-child(1)  { animation-delay: 0s;     }
.v4s-wave span:nth-child(2)  { animation-delay: .07s;   }
.v4s-wave span:nth-child(3)  { animation-delay: .14s;   }
.v4s-wave span:nth-child(4)  { animation-delay: .21s;   }
.v4s-wave span:nth-child(5)  { animation-delay: .28s;   }
.v4s-wave span:nth-child(6)  { animation-delay: .35s;   }
.v4s-wave span:nth-child(7)  { animation-delay: .42s;   }
.v4s-wave span:nth-child(8)  { animation-delay: .35s;   }
.v4s-wave span:nth-child(9)  { animation-delay: .28s;   }
.v4s-wave span:nth-child(10) { animation-delay: .21s;   }
.v4s-wave span:nth-child(11) { animation-delay: .14s;   }
.v4s-wave span:nth-child(12) { animation-delay: .07s;   }
.v4s-wave span:nth-child(13) { animation-delay: 0s;     }
.v4s-wave span:nth-child(14) { animation-delay: .07s;   }
.v4s-wave span:nth-child(15) { animation-delay: .14s;   }
.v4s-wave span:nth-child(16) { animation-delay: .21s;   }
.v4s-wave span:nth-child(17) { animation-delay: .28s;   }
.v4s-wave span:nth-child(18) { animation-delay: .35s;   }
.v4s-wave span:nth-child(19) { animation-delay: .42s;   }
.v4s-wave span:nth-child(20) { animation-delay: .35s;   }
.v4s-wave span:nth-child(21) { animation-delay: .28s;   }
.v4s-wave span:nth-child(22) { animation-delay: .21s;   }
.v4s-wave span:nth-child(23) { animation-delay: .14s;   }
.v4s-wave span:nth-child(24) { animation-delay: .07s;   }

@keyframes v4s-bars {
  0%, 100% { height: 9px;  opacity: .65; }
  50%      { height: 38px; opacity: 1; }
}

/* ---------------- nota + botões ---------------- */
.v4s-note {
  margin: 6px auto 0;
  max-width: 34em;
  font-size: 12.5px;
  line-height: 1.6;
  color: #c9bfa6;
}

.v4s-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin: 22px 0 0;
}

.v4s-cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  padding: 14px 24px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #241a02;
  background: linear-gradient(135deg, #fff2c0 0%, #e5c460 34%, #d4af37 62%, #f7e7ae 100%);
  box-shadow: 0 10px 28px rgba(212, 175, 55, .42), 0 0 0 1px rgba(255, 245, 208, .55) inset;
  transition: transform .16s ease, box-shadow .16s ease;
}
.v4s-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(212, 175, 55, .56), 0 0 0 1px rgba(255, 245, 208, .7) inset; }
.v4s-cta:active { transform: translateY(0); }
.v4s-cta .material-icons-round { font-size: 20px; }

/* brilho varrendo o botão */
.v4s-cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: skewX(-18deg);
  animation: v4s-shine 3.6s ease-in-out infinite;
}
@keyframes v4s-shine {
  0%, 62% { left: -60%; }
  85%, 100% { left: 120%; }
}

.v4s-later {
  padding: 10px 16px;
  min-height: 40px;
  border: 0;
  background: none;
  color: #b9ae93;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.v4s-later:hover { color: #e8dcc0; }

/* ---------------- opt-out ---------------- */
.v4s-optout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 16px 0 0;
  padding-top: 15px;
  border-top: 1px solid rgba(212, 175, 55, .16);
  font-size: 12px;
  line-height: 1.45;
  color: #a99f88;
  cursor: pointer;
}
.v4s-optout input {
  width: 16px;
  height: 16px;
  accent-color: #d4af37;
  cursor: pointer;
  flex-shrink: 0;
}
.v4s-optout:hover { color: #ddd2b8; }

/* foco visível em tudo que é interativo */
.v4s button:focus-visible,
.v4s input:focus-visible {
  outline: 3px solid #f6e6a8;
  outline-offset: 3px;
}

/* ---------------- responsivo ---------------- */
@media (max-width: 560px) {
  .v4s { padding: 12px; }
  .v4s-card { padding: 28px 20px 20px; border-radius: 20px; }
  .v4s-kicker { font-size: 9px; letter-spacing: .28em; margin-bottom: 18px; }
  .v4s-wave { height: 36px; margin: 14px 0 2px; gap: 3px; }
  .v4s-wave span:nth-child(n+17) { display: none; }
  .v4s-cta { font-size: 14px; min-height: 50px; }
}

@media (max-height: 620px) {
  .v4s-card { padding: 22px 22px 18px; }
  .v4s-wave { height: 30px; margin: 12px 0 0; }
  .v4s-note { display: none; }
}

/* ---------------- acessibilidade: movimento reduzido ---------------- */
@media (prefers-reduced-motion: reduce) {
  .v4s-backdrop::before,
  .v4s-ring,
  .v4s-wave span,
  .v4s-cta::after { animation: none !important; }
  .v4s-ring { background: conic-gradient(from 300deg, #f6e6a8, #d4af37, #f6e6a8); }
  .v4s-wave span { height: 20px; opacity: .85; }
  .v4s-card { transition: none; }
}
