/* Estilos customizados e animações para o Convite do Costelão */

/* Transições suaves */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Animação e visibilidade dos Passos (Stepper) */
.step-card {
  display: none;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-card.active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: stepIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes stepIn {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Botões Customizados */
.btn-primary {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 25px -5px rgba(234, 88, 12, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -4px rgba(234, 88, 12, 0.5);
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 50%, #9a3412 100%);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: rgba(38, 38, 38, 0.6);
  border: 1px solid rgba(82, 82, 82, 0.5);
  color: #d4d4d4;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(64, 64, 64, 0.8);
  color: #ffffff;
  border-color: #737373;
}

/* Estilo dos Cards de Seleção de Data */
.date-card.selected {
  border-color: #f97316 !important;
  background: linear-gradient(145deg, rgba(67, 20, 7, 0.45) 0%, rgba(20, 18, 16, 0.9) 100%) !important;
  box-shadow: 0 0 25px -5px rgba(249, 115, 22, 0.3) !important;
  transform: translateY(-2px);
}

.date-card.selected .check-badge {
  background-color: #f97316;
  border-color: #f97316;
  color: #ffffff !important;
}

.form-date-btn.active {
  border-color: #f97316 !important;
  background-color: rgba(234, 88, 12, 0.2) !important;
  color: #fdba74 !important;
}

/* Linha do tempo suave, iluminada e animada */
.timeline-track-glow {
  position: absolute;
  left: 25px;
  top: 30px;
  bottom: 35px;
  width: 2px;
  background: linear-gradient(180deg, 
    rgba(245, 158, 11, 0.3) 0%, 
    rgba(249, 115, 22, 0.75) 25%, 
    rgba(234, 88, 12, 0.8) 75%, 
    rgba(239, 68, 68, 0.3) 100%
  );
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.35);
  pointer-events: none;
}

/* Faísca/pulso de luz que percorre a linha suavemente */
.timeline-track-glow::after {
  content: '';
  position: absolute;
  top: 0;
  left: -2px;
  width: 6px;
  height: 32px;
  border-radius: 9999px;
  background: linear-gradient(180deg, transparent, #fef08a, #f97316, transparent);
  box-shadow: 0 0 12px #f59e0b, 0 0 20px #ea580c;
  animation: emberFlowDown 3.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes emberFlowDown {
  0% {
    top: 0%;
    opacity: 0;
    transform: scaleY(0.5);
  }
  20% {
    opacity: 1;
    transform: scaleY(1);
  }
  80% {
    opacity: 1;
    transform: scaleY(1);
  }
  100% {
    top: calc(100% - 32px);
    opacity: 0;
    transform: scaleY(0.5);
  }
}

.timeline-item {
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.timeline-item:hover {
  transform: translateX(4px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0c0a09;
}
::-webkit-scrollbar-thumb {
  background: #292524;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #44403c;
}

/* Estilos de Votos & Filtros */
.filter-tab {
  transition: all 0.2s ease;
}

#votes-list-container > div {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Estilos do Mapa 3D & Satélite */
#globe-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  outline: none;
}

#satellite-map {
  background: #0c0a09;
}

.leaflet-popup-content-wrapper {
  background: #1c1917 !important;
  color: #f5f5f4 !important;
  border: 1px solid #44403c !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-popup-tip {
  background: #1c1917 !important;
}

/* ==========================================
   ANIMAÇÕES VIBRANTES & MICRO-INTERAÇÕES
   ========================================== */

/* Tremulação e Brilho de Fogo nos Títulos e Ícones */
@keyframes fireFlicker {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.6));
  }
  25% {
    transform: scale(1.06) rotate(-2deg);
    filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.8));
  }
  50% {
    transform: scale(0.97) rotate(2deg);
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.7));
  }
  75% {
    transform: scale(1.04) rotate(-1deg);
    filter: drop-shadow(0 0 16px rgba(249, 115, 22, 0.9));
  }
}

.animate-fire {
  display: inline-block;
  animation: fireFlicker 2.5s infinite ease-in-out;
}

/* Animação suave para cerveja brindando */
@keyframes beerToast {
  0%, 100% { transform: rotate(0deg) scale(1); }
  30% { transform: rotate(-12deg) scale(1.1); }
  60% { transform: rotate(8deg) scale(1.1); }
}

.animate-toast:hover {
  animation: beerToast 0.8s ease-in-out;
}

/* Animação de peixe nadando / saltando */
@keyframes fishSwim {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  35% { transform: translateY(-6px) rotate(-8deg); }
  70% { transform: translateY(3px) rotate(6deg); }
}

.animate-fish {
  display: inline-block;
  animation: fishSwim 3s infinite ease-in-out;
}

/* Cards Interativos com Brilho de Brasa ao Passar o Mouse */
.interactive-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.interactive-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.08), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.interactive-card:hover::before {
  left: 100%;
}

.interactive-card:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: rgba(249, 115, 22, 0.5) !important;
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.6), 0 0 20px -3px rgba(249, 115, 22, 0.25);
}

/* Efeito de Clique com Pulso / Ripple */
.interactive-card:active {
  transform: scale(0.985);
}

/* Estilo do Contador Regressivo Neon Brasa */
.countdown-box {
  background: linear-gradient(145deg, rgba(28, 25, 23, 0.8) 0%, rgba(12, 10, 9, 0.95) 100%);
  border: 1px solid rgba(249, 115, 22, 0.3);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(254, 240, 138, 0.1);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.countdown-box:hover {
  border-color: rgba(249, 115, 22, 0.6);
  transform: translateY(-2px);
}

/* Partículas Flutuantes de Reações (Emojis voando pela tela) */
.floating-reaction-emoji {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  user-select: none;
  animation: flyUpAndFade 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes flyUpAndFade {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.5) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translate(var(--drift-x, 0px), -60px) scale(1.3) rotate(var(--rot, 10deg));
  }
  80% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--drift-x, 0px) * 1.5), -280px) scale(1) rotate(calc(var(--rot, 10deg) * 2));
  }
}

/* Barra de Reações Flutuante no Rodapé */
.reaction-pill {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reaction-pill:hover {
  transform: translateY(-4px) scale(1.15);
}

.reaction-pill:active {
  transform: scale(0.92);
}

/* Equalizador animado do Som de Brasa */
.sound-bar {
  display: inline-block;
  width: 3px;
  background-color: #f97316;
  border-radius: 2px;
  animation: soundWave 1.2s infinite ease-in-out alternate;
}

.sound-bar:nth-child(2) { animation-delay: 0.2s; height: 10px; }
.sound-bar:nth-child(3) { animation-delay: 0.4s; height: 14px; }
.sound-bar:nth-child(4) { animation-delay: 0.1s; height: 8px; }

@keyframes soundWave {
  0% { height: 4px; }
  100% { height: 16px; }
}

/* Animação cômica de tremor de tela da pegadinha */
@keyframes prankShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  15% { transform: translate(-10px, 8px) rotate(-1.5deg); }
  30% { transform: translate(10px, -8px) rotate(1.5deg); }
  45% { transform: translate(-8px, -5px) rotate(-1deg); }
  60% { transform: translate(8px, 5px) rotate(1deg); }
  75% { transform: translate(-4px, 3px) rotate(-0.5deg); }
  90% { transform: translate(4px, -2px) rotate(0.5deg); }
}

.prank-shake {
  animation: prankShake 0.65s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ==========================================
   OTIMIZAÇÕES MOBILE & ANIMAÇÕES DAS PÁGINAS
   ========================================== */

/* Shimmer de luz passando pelos botões principais */
.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 20%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 80%
  );
  transform: rotate(30deg) translateX(-150%);
  animation: shimmerLight 3.8s infinite ease-in-out;
  pointer-events: none;
}

@keyframes shimmerLight {
  0% { transform: rotate(30deg) translateX(-150%); }
  25% { transform: rotate(30deg) translateX(150%); }
  100% { transform: rotate(30deg) translateX(150%); }
}

/* Radio Cards Táteis para Celular */
.radio-card-touch {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.radio-card-touch:active {
  transform: scale(0.97);
}

.radio-card-touch.selected {
  border-color: #f97316 !important;
  background: linear-gradient(145deg, rgba(67, 20, 7, 0.45) 0%, rgba(20, 18, 16, 0.95) 100%) !important;
  box-shadow: 0 0 20px -3px rgba(249, 115, 22, 0.35) !important;
}

/* Badge pulsante "Mais votada" */
@keyframes pulseBadge {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(249, 115, 22, 0); }
}

.badge-pulse {
  animation: pulseBadge 2.2s infinite ease-in-out;
}

/* Cascata suave de entrada dos votos */
#votes-list-container > div {
  animation: slideFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Melhorias de usabilidade no Celular */
@media (max-width: 640px) {
  /* Prevenir zoom involuntário do iOS Safari em inputs */
  input[type="text"], input[type="password"], select {
    font-size: 16px !important;
  }

  /* Espaçamento no rodapé para não sobrepor botões com a barra de reações */
  main {
    padding-bottom: 95px !important;
  }

  /* Barra de reações compacta no celular */
  #live-reaction-bar {
    bottom: 12px;
    right: 12px;
  }
  
  #live-reaction-bar .reaction-pill {
    padding: 6px 8px;
  }
}

/* ================= MINIGAME & LEADERBOARD EASTER EGG ================= */
.arcade-glow-box {
  background: radial-gradient(circle at top, rgba(249, 115, 22, 0.12) 0%, rgba(12, 10, 9, 0.98) 75%);
  border: 1px solid rgba(249, 115, 22, 0.45);
  box-shadow: 0 0 35px -5px rgba(249, 115, 22, 0.25), inset 0 1px 1px rgba(254, 215, 170, 0.15);
}

.arcade-font {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: 0.04em;
}

.touch-ctrl-btn {
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: all 0.1s ease;
}

.touch-ctrl-btn:active {
  transform: scale(0.93);
  background-color: rgba(234, 88, 12, 0.7) !important;
  border-color: #f97316 !important;
}

.leaderboard-row {
  transition: all 0.2s ease;
}

.leaderboard-row:hover {
  background-color: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.4);
}

.shake-canvas {
  animation: canvasShake 0.3s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes canvasShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}


