/* --- Animação da Fumaça --- */
@keyframes float-smoke {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.2;
  }
  33% {
    transform: translate(30px, -30px) scale(1.05);
    opacity: 0.35;
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
    opacity: 0.25;
  }
}

.smoke-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1; /* Fica atrás de tudo */
  pointer-events: none;
}

.smoke-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px); /* Suavidade da fumaça */
  animation: float-smoke 25s infinite ease-in-out;
}

/* --- Grid Masonry (Estilo Pinterest) --- */
.masonry-grid {
  column-count: 2; /* 2 colunas no celular */
  column-gap: 0.75rem;
}

@media (min-width: 1024px) {
  .masonry-grid {
    column-count: 4; /* 4 colunas no PC */
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 0.75rem;
}

/* --- Esconder Barra de Rolagem --- */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --- ANIMAÇÃO DE GASTO DE MOEDAS --- */
@keyframes floatUpFade {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-40px) scale(1.2);
    opacity: 0;
  }
}

.expense-float {
  position: fixed; /* Fixed para não depender do scroll */
  color: #ef4444; /* Vermelho vibrante */
  font-weight: 800;
  font-size: 1.2rem;
  pointer-events: none;
  z-index: 10001; /* Acima de tudo */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  animation: floatUpFade 1s ease-out forwards;
  font-family: "Inter", sans-serif;
}

/* Classe auxiliar para o pulso no saldo */
.balance-pulse {
  transform: scale(1.2) !important;
  color: #ef4444 !important;
  transition: all 0.1s ease;
}

/* --- SISTEMA DE TUTORIAL (HOLOFOTE REAL) --- */

/* 1. O Overlay (Apenas bloqueia cliques, a cor vem do holofote) */
.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* INVISÍVEL - Deixa o holofote brilhar */
  z-index: 9998;
  display: none;
}
.tutorial-overlay.active {
  display: block;
}

/* 2. O Holofote (Elemento Destacado) */
.tutorial-highlight {
  position: relative;
  z-index: 10000 !important; /* Muito alto */

  /* Mantém o formato de pílula original do botão */
  border-radius: 9999px;
  background-color: #050505; /* Fundo sólido para leitura */

  /* O TRUQUE DO HOLOFOTE: */
  box-shadow: 
      /* Luz Branca Suave (O Brilho) */ 0 0 20px 0px
      rgba(255, 255, 255, 0.2),
    /* A Escuridão Gigante (Cobre o resto da tela) */ 0 0 0 9999px
      rgba(0, 0, 0, 0.9);

  /* Borda sutil para definição */
  border: 1px solid rgba(255, 255, 255, 0.15);

  transition: all 0.3s ease;
  pointer-events: none; /* O usuário clica no botão do tutorial, não na moeda */
}

/* 3. O Balão de Texto (Popover) */
.tutorial-popover {
  position: fixed;
  width: 280px;
  background: #121212;
  border: 1px solid rgba(217, 70, 239, 0.3);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 1); /* Sombra forte para destacar no escuro */
  z-index: 10001; /* Acima do holofote */
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
}

.tutorial-popover.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* 4. Setinha do Balão (Aponta para cima) */
.tutorial-popover::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #d946ef;
}

/* Tipografia */
.tutorial-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.tutorial-text {
  display: block;
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 16px;
}
.tutorial-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: linear-gradient(90deg, #d946ef, #722f37);
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s;
}
.tutorial-btn:hover {
  transform: scale(1.02);
}
