/* ── Design tokens Cartomante FC ───────────────────────────── */
:root {
  --primary: #5252A2;
  --primary-dark: #3d3d7a;
  --primary-light: #587EBF;
  --purple: #9460A8;
  --orange: #E88826;
  --orange-dark: #E46538;
  --success: #58BF63;
  --warning: #E8C326;
  --text-primary: #2C2C2C;
  --text-secondary: #737373;
  --bg-page: #F9F9F9;
  --radius: 16px;
  --shadow-md: 0 10px 40px rgba(0, 0, 0, .18);
  --font: 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  font-family: var(--font);
  color: var(--text-primary);
}

/* Palco 1920x1080; escalado via JS pra caber na janela (preview local). */
#stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, var(--purple));
  overflow: hidden;
}

#frame {
  position: absolute;
  inset: 0;
  width: 1920px;
  height: 1080px;
  border: 0;
  background: var(--bg-page);
}
#frame.hidden { display: none; }

/* ── Cartao (idle / anuncio / pensando / erro) ─────────────── */
.card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 160px;
  gap: 28px;
  color: #fff;
}
.card.hidden { display: none; }

.brand {
  position: absolute;
  top: 56px;
  letter-spacing: 6px;
  font-weight: 800;
  font-size: 30px;
  color: rgba(255, 255, 255, .85);
}

.kicker {
  font-size: 34px;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.kicker:empty { display: none; }

.title {
  font-size: 88px;
  font-weight: 800;
  line-height: 1.05;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .25);
}

.subtitle {
  font-size: 42px;
  font-weight: 600;
  color: rgba(255, 255, 255, .9);
  max-width: 1400px;
}
.subtitle:empty { display: none; }

.question {
  font-size: 54px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 1500px;
  background: rgba(255, 255, 255, .12);
  border-left: 10px solid var(--orange);
  border-radius: var(--radius);
  padding: 40px 56px;
  box-shadow: var(--shadow-md);
}
.question.hidden { display: none; }

.author {
  font-size: 38px;
  font-weight: 700;
  color: var(--warning);
}
.author.hidden { display: none; }

/* Reticencias animadas do "pensando". */
.thinking { display: flex; gap: 22px; margin-top: 20px; }
.thinking.hidden { display: none; }
.thinking span {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange);
  animation: bounce 1.2s infinite ease-in-out;
}
.thinking span:nth-child(2) { animation-delay: .2s; }
.thinking span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .5; }
  40% { transform: translateY(-26px); opacity: 1; }
}

/* ── Camada do widget real (fase de consulta) ──────────────── */
.widgetwrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 90px 0 60px;
}
.widgetwrap.hidden { display: none; }
.widgetwrap .wtitle {
  font-size: 46px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .25);
}
#widget {
  width: 1180px;
  height: 820px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.speaking {
  position: absolute;
  bottom: 48px;
  right: 56px;
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, .35);
  border-radius: 999px;
  padding: 14px 28px;
}
.speaking.hidden { display: none; }
