/* ============================================================
   BOTÃO DO FODA-SE — style.css
   Dark mode · Neon · Mobile-first · Core Web Vitals friendly
   ============================================================ */

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Variáveis ───────────────────────────────────────────────── */
:root {
  --bg:            #08080f;
  --bg-card:       #10101a;
  --purple:        #7c3aed;
  --purple-light:  #a855f7;
  --blue-neon:     #3b82f6;
  --blue-light:    #60a5fa;
  --green-neon:    #10b981;
  --green-light:   #34d399;
  --yellow:        #fbbf24;
  --red:           #ef4444;
  --text:          #f1f5f9;
  --text-muted:    #94a3b8;
  --border-purple: rgba(124, 58, 237, 0.35);
  --border-blue:   rgba(59, 130, 246, 0.35);
  --border-green:  rgba(16, 185, 129, 0.35);
  --radius:        14px;
  --transition:    0.2s ease;
}

/* ── Base ────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  line-height: 1.5;
  transition: background-color 0.3s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 15%, rgba(124, 58, 237, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(59, 130, 246, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.3s ease;
}

/* ── AD CONTAINERS ───────────────────────────────────────────── */
.ad-container {
  width: 100%;
  max-width: 728px;
  padding: 6px 16px;
  position: relative;
  z-index: 1;
}
.top-ad    { min-height: 106px; }
.middle-ad { min-height: 282px; padding: 16px; margin: 8px auto; }
.footer-ad { min-height: 106px; margin-top: auto; }

.ad-placeholder {
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-placeholder:empty::after {
  content: "Publicidade";
  color: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── TOAST (fixo, aparece no topo) ──────────────────────────── */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: rgba(20, 20, 35, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.6);
  color: var(--purple-light);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  z-index: 9999;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
  pointer-events: none;
}
.toast.hidden { display: none; }
.toast.show   { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.hide   { transform: translateX(-50%) translateY(-80px); opacity: 0; }

/* ── SOUND BANNER ─────────────────────────────────────────────── */
.sound-banner {
  width: 100%;
  max-width: 728px;
  background: rgba(59, 130, 246, 0.12);
  border-bottom: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--blue-light);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 40px 9px 16px;
  text-align: center;
  position: relative;
  z-index: 10;
  transition: opacity 0.35s ease, max-height 0.35s ease;
  max-height: 60px;
  overflow: hidden;
}
.sound-banner.hidden  { display: none; }
.sound-banner.closing { opacity: 0; max-height: 0; padding: 0; }

.sound-banner-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--blue-light);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity var(--transition);
}
.sound-banner-close:hover { opacity: 1; }

/* ── HEADER ──────────────────────────────────────────────────── */
.site-header {
  text-align: center;
  padding: 20px 16px 6px;
  position: relative;
  z-index: 1;
  width: 100%;
}
.site-title {
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--purple-light), var(--blue-light), var(--green-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.site-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 5px;
}

/* ── MAIN CONTENT ────────────────────────────────────────────── */
.main-content {
  width: 100%;
  max-width: 580px;
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
  flex: 1;
}

/* ── FODA-SE DO DIA ──────────────────────────────────────────── */
.fodase-do-dia {
  width: 100%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.fdd-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.8;
}
.fdd-texto {
  font-size: clamp(0.9rem, 3vw, 1rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  font-style: italic;
}

/* ── CONTADOR + Sequência + GLOBAL ──────────────────────────────── */
.counter-section {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius);
  padding: 12px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.counter-text {
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  font-weight: 600;
  color: var(--purple-light);
}
.Sequência-texto {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fb923c;
}
.Sequência-texto.hidden { display: none; }

.counter-total {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.global-counter {
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 6px;
  margin-top: 2px;
}
.global-counter span {
  color: var(--green-light);
  font-weight: 700;
}

/* ── CATEGORIAS ──────────────────────────────────────────────── */
.categorias-section {
  width: 100%;
}
.categorias-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.categorias-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-cat {
  flex: 1;
  min-width: 70px;
  padding: 9px 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  white-space: nowrap;
}
.btn-cat:hover {
  border-color: var(--purple-light);
  color: var(--text);
}
.btn-cat.active {
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(168,85,247,0.2));
  border-color: var(--purple-light);
  color: var(--purple-light);
  box-shadow: 0 0 12px rgba(124,58,237,0.3);
}

/* ── BOTÃO PRINCIPAL ─────────────────────────────────────────── */
.button-section {
  display: flex;
  justify-content: center;
  width: 100%;
}

.btn-main {
  position: relative;
  width:  min(290px, 78vw);
  height: min(290px, 78vw);
  border-radius: 50%;
  background: linear-gradient(145deg, #3b0d85, #7c3aed, #a855f7);
  border: 4px solid rgba(168, 85, 247, 0.55);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow:
    0 0  40px rgba(124, 58, 237, 0.55),
    0 0  80px rgba(124, 58, 237, 0.25),
    0 0 160px rgba(124, 58, 237, 0.10),
    inset 0 0 40px rgba(255,255,255,0.06);
  transition: box-shadow var(--transition), transform var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  touch-action: manipulation;
  overflow: visible;
}
.btn-main:hover {
  box-shadow:
    0 0  60px rgba(124, 58, 237, 0.80),
    0 0 120px rgba(124, 58, 237, 0.40),
    0 0 220px rgba(124, 58, 237, 0.15),
    inset 0 0 50px rgba(255,255,255,0.10);
  transform: scale(1.03);
}
.btn-main:focus-visible {
  outline: 3px solid var(--purple-light);
  outline-offset: 6px;
}
.btn-text {
  font-size: clamp(1.9rem, 9vw, 3rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(255,255,255,0.6);
  line-height: 1;
  pointer-events: none;
}
.btn-emoji {
  font-size: clamp(1.4rem, 6vw, 2rem);
  line-height: 1;
  pointer-events: none;
}

/* Animação do clique */
@keyframes btnClick {
  0%   { transform: scale(1);    }
  25%  { transform: scale(1.13); }
  50%  { transform: scale(0.94); }
  75%  { transform: scale(1.06); }
  100% { transform: scale(1);    }
}
@keyframes btnShake {
  0%, 100% { transform: scale(1.13) rotate(0deg);  }
  20%       { transform: scale(1.13) rotate(-3deg); }
  40%       { transform: scale(1.13) rotate(3deg);  }
  60%       { transform: scale(1.13) rotate(-2deg); }
  80%       { transform: scale(1.13) rotate(2deg);  }
}
@keyframes ringExplode {
  0%   { transform: scale(1);    opacity: 0.9; }
  100% { transform: scale(1.55); opacity: 0;   }
}

.btn-main.clicked {
  animation: btnClick 0.45s ease, btnShake 0.28s ease 0.12s;
}
.btn-main.clicked::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid var(--purple-light);
  animation: ringExplode 0.45s ease forwards;
  pointer-events: none;
}

/* ── MODO CAOS — animação do fundo ──────────────────────────── */
@keyframes caosBg {
  0%   { background:
    radial-gradient(ellipse at 10% 20%, rgba(124,58,237,0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(239,68,68,0.25)  0%, transparent 50%); }
  25%  { background:
    radial-gradient(ellipse at 80% 10%, rgba(59,130,246,0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 90%, rgba(16,185,129,0.25) 0%, transparent 50%); }
  50%  { background:
    radial-gradient(ellipse at 50% 50%, rgba(245,158,11,0.3)  0%, transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(239,68,68,0.2)   0%, transparent 50%); }
  75%  { background:
    radial-gradient(ellipse at 15% 70%, rgba(168,85,247,0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 30%, rgba(34,197,94,0.25)  0%, transparent 50%); }
  100% { background:
    radial-gradient(ellipse at 60% 15%, rgba(239,68,68,0.3)   0%, transparent 50%),
    radial-gradient(ellipse at 40% 85%, rgba(59,130,246,0.3)  0%, transparent 50%); }
}

/* Anel de caos no botão (via ::before, não conflita com click em ::after) */
@keyframes caosGlow {
  0%   { box-shadow: 0 0 0 4px rgba(168,85,247,0.9), 0 0 60px rgba(168,85,247,0.6); }
  25%  { box-shadow: 0 0 0 4px rgba(96,165,250,0.9),  0 0 60px rgba(96,165,250,0.6);  }
  50%  { box-shadow: 0 0 0 4px rgba(52,211,153,0.9),  0 0 60px rgba(52,211,153,0.6);  }
  75%  { box-shadow: 0 0 0 4px rgba(248,113,113,0.9), 0 0 60px rgba(248,113,113,0.6); }
  100% { box-shadow: 0 0 0 4px rgba(251,191,36,0.9),  0 0 60px rgba(251,191,36,0.6);  }
}

body.modo-caos::before {
  animation: caosBg 0.7s ease-in-out infinite alternate;
}
body.modo-caos .btn-main {
  animation: caosGlow 0.5s ease infinite alternate;
  border-color: transparent;
}
/* Clique durante modo caos: a regra mais específica + !important garante que a animação de clique vença */
body.modo-caos .btn-main.clicked {
  animation: btnClick 0.45s ease, btnShake 0.28s ease 0.12s !important;
}

/* ── CAIXA DE MENSAGEM ───────────────────────────────────────── */
.message-section {
  width: 100%;
  min-height: 68px;
}
.message-box {
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: center;
}
.message-box.hidden { display: none; }
.message-text {
  font-size: clamp(1rem, 3.5vw, 1.15rem);
  font-weight: 600;
  color: var(--blue-light);
  line-height: 1.45;
}
@keyframes msgAppear {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
.message-box.show { animation: msgAppear 0.3s ease forwards; }

/* ── RELATÓRIO EMOCIONAL ─────────────────────────────────────── */
.relatorio-section {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-green);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.relatorio-section.hidden { display: none; }
.relatorio-titulo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-light);
  margin-bottom: 14px;
  text-align: center;
}
.relatorio-content { display: flex; flex-direction: column; gap: 10px; }
.relatorio-item    { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.relatorio-label   { color: var(--text-muted); min-width: 120px; flex-shrink: 0; }
.relatorio-bar-wrapper {
  flex: 1;
  height: 7px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.relatorio-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.7s cubic-bezier(0.4,0,0.2,1);
}
.relatorio-value {
  font-weight: 700;
  color: var(--text);
  min-width: 38px;
  text-align: right;
  font-size: 0.88rem;
}
@keyframes relAppear {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}
.relatorio-section.show { animation: relAppear 0.4s ease forwards; }

/* ── CONQUISTAS ──────────────────────────────────────────────── */
.conquista-section { width: 100%; }
.conquista-section.hidden { display: none; }
@keyframes conquistaPop {
  0%   { opacity: 0; transform: scale(0.65) translateY(12px); }
  60%  {             transform: scale(1.08) translateY(-4px); }
  100% { opacity: 1; transform: scale(1)    translateY(0);    }
}
.conquista-section.show {
  animation: conquistaPop 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.conquista-box {
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(245,158,11,0.08));
  border: 1px solid rgba(251,191,36,0.45);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.conquista-icon  { font-size: 2.2rem; display: block; margin-bottom: 6px; line-height: 1; }
.conquista-texto { font-size: 0.97rem; font-weight: 700; color: var(--yellow); line-height: 1.35; }

/* ── MODO CAOS BOTÃO ─────────────────────────────────────────── */
.caos-section { width: 100%; }
.btn-caos {
  width: 100%;
  padding: 13px 20px;
  background: var(--bg-card);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: var(--radius);
  color: #f87171;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  outline: none;
}
.btn-caos:hover {
  border-color: rgba(239,68,68,0.7);
  background: rgba(239,68,68,0.08);
  box-shadow: 0 0 16px rgba(239,68,68,0.25);
}
.btn-caos:focus-visible { outline: 2px solid #ef4444; outline-offset: 3px; }

@keyframes caosBtnPulse {
  from { box-shadow: 0 0 15px rgba(239,68,68,0.5); }
  to   { box-shadow: 0 0 35px rgba(239,68,68,0.9), 0 0 60px rgba(239,68,68,0.4); }
}
.btn-caos.ativo {
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
  border-color: #ef4444;
  color: #fff;
  animation: caosBtnPulse 0.5s ease infinite alternate;
}

/* ── BOTÃO WHATSAPP ──────────────────────────────────────────── */
.share-section { width: 100%; }
.btn-whatsapp {
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: clamp(1rem, 3.5vw, 1.1rem);
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(34,197,94,0.35);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  outline: none;
}
.btn-whatsapp:hover  { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(34,197,94,0.55); }
.btn-whatsapp:active { transform: translateY(0); }
.btn-whatsapp:focus-visible { outline: 3px solid #22c55e; outline-offset: 4px; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 14px 16px;
  color: var(--text-muted);
  font-size: 0.78rem;
  position: relative;
  z-index: 1;
  width: 100%;
}

/* ── RESPONSIVIDADE ──────────────────────────────────────────── */
@media (max-width: 420px) {
  .site-header     { padding: 14px 12px 4px; }
  .main-content    { gap: 12px; padding-bottom: 16px; }
  .top-ad          { min-height: 74px; }
  .middle-ad       { min-height: 282px; }
  .footer-ad       { min-height: 74px; }
  .relatorio-label { min-width: 100px; }
  .btn-cat         { font-size: 0.76rem; padding: 8px 8px; }
}

@media (min-width: 640px) {
  .main-content { padding-left: 24px; padding-right: 24px; }
}

/* ── ACESSIBILIDADE ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
