/* =====================================================
   RifaCS2 — Estilos globais customizados
   Tema: cinza espacial + roxo
   ===================================================== */

/* Alpine.js: oculta elementos com x-cloak antes da inicialização */
[x-cloak] { display: none !important; }

/* Elimina double-tap zoom em todos os elementos interativos */
a, button, input, select, textarea, label, [role="button"] {
    touch-action: manipulation;
}

/* Impede zoom automático no iOS ao focar inputs (threshold do Safari é 16px) */
input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    font-size: 16px !important;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #17171a;
}
::-webkit-scrollbar-thumb {
    background: #38383f;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a855f7;
}

/* Esconde a scrollbar (usado em carrosséis com scroll-snap no mobile) */
.no-scrollbar {
    -ms-overflow-style: none;  /* IE / Edge */
    scrollbar-width: none;     /* Firefox */
}
.no-scrollbar::-webkit-scrollbar {
    display: none;             /* Chrome / Safari */
}

/* Hint "arraste para o lado" — desliza a seta para a direita repetidamente */
@keyframes swipe-hint {
    0%   { transform: translateX(0);     opacity: .4; }
    50%  { transform: translateX(6px);   opacity: 1;  }
    100% { transform: translateX(0);     opacity: .4; }
}
.swipe-hint-icon {
    animation: swipe-hint 1.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    .swipe-hint-icon { animation: none; }
}

/* Seleção de texto */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: #fff;
}

/* Animação de pulso para barra de progresso — verde */
@keyframes glow-green {
    0%, 100% { box-shadow: 0 0 6px rgba(34, 197, 94, 0.4); }
    50%       { box-shadow: 0 0 14px rgba(34, 197, 94, 0.75); }
}

.progress-glow {
    animation: glow-green 2.5s ease-in-out infinite;
}

/* Animação de pulso para barra de progresso — âmbar (quase esgotada) */
@keyframes glow-amber {
    0%, 100% { box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
    50%       { box-shadow: 0 0 14px rgba(245, 158, 11, 0.75); }
}

.progress-glow-amber {
    animation: glow-amber 1.5s ease-in-out infinite;
}

.progress-bar-active {
    animation: glow-green 2s ease-in-out infinite;
}

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

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Card hover */
.card-rifa {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-rifa:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Badge de status */
.badge-ativa     { background: rgba(34,197,94,.12);  color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.badge-pausada   { background: rgba(234,179,8,.12);  color: #facc15; border: 1px solid rgba(234,179,8,.3); }
.badge-esgotada  { background: rgba(239,68,68,.12);  color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.badge-encerrada { background: rgba(113,113,122,.12); color: #a1a1aa; border: 1px solid rgba(113,113,122,.3); }

/* Gradiente hero — roxo sutil */
.bg-hero {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(168, 85, 247, 0.10), transparent),
        #17171a;
}

/* Número de rifa */
.numero-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: #2c2c31;
    border: 1px solid #38383f;
    font-size: 0.875rem;
    font-family: monospace;
    font-weight: 500;
    color: #d4d4d8;
}
.numero-chip.vendido {
    background: rgba(168,85,247,.12);
    border-color: rgba(168,85,247,.35);
    color: #c084fc;
}

/* =====================================================
   HERO CS2 — cena animada (skins flutuando + glow)
   ===================================================== */

/* Grid de fundo deslizando lentamente */
@keyframes hero-grid-pan {
    0%   { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}
.hero-grid {
    background-image:
        linear-gradient(rgba(168,85,247,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168,85,247,0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: hero-grid-pan 6s linear infinite;
    mask-image: radial-gradient(ellipse 70% 70% at 60% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 60% 40%, #000 30%, transparent 75%);
}

/* Glow central que pulsa atrás da skin principal */
@keyframes hero-glow-pulse {
    0%, 100% { opacity: .45; transform: translate(-50%, -50%) scale(1); }
    50%       { opacity: .8;  transform: translate(-50%, -50%) scale(1.12); }
}
.hero-glow {
    animation: hero-glow-pulse 4s ease-in-out infinite;
}

/* Skin principal — flutua de leve (mantém a centralização translate(-50%,-50%)) */
@keyframes hero-float-main {
    0%, 100% { transform: translate(-50%, -50%) rotate(-3deg); }
    50%       { transform: translate(-50%, calc(-50% - 16px)) rotate(-3deg); }
}
.hero-skin-main {
    animation: hero-float-main 5s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(168,85,247,0.55)) drop-shadow(0 18px 40px rgba(0,0,0,0.8));
}

/* Cards de skin flutuando — variações de fase/altura */
@keyframes hero-float-a {
    0%, 100% { transform: translateY(0)   rotate(-8deg); }
    50%       { transform: translateY(-22px) rotate(-8deg); }
}
@keyframes hero-float-b {
    0%, 100% { transform: translateY(0)   rotate(7deg); }
    50%       { transform: translateY(-18px) rotate(7deg); }
}
.hero-card-a { animation: hero-float-a 6s   ease-in-out infinite both; }
.hero-card-b { animation: hero-float-b 4.5s ease-in-out infinite .8s both; }

/* Partículas subindo */
@keyframes hero-particle {
    0%   { transform: translateY(0)     scale(1);   opacity: 0; }
    15%  { opacity: 1; }
    100% { transform: translateY(-140px) scale(.4); opacity: 0; }
}
.hero-particle {
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 9999px;
    background: #c084fc;
    box-shadow: 0 0 8px rgba(192,132,252,0.9);
    animation: hero-particle 5s linear infinite;
}

/* Linha de mira (crosshair) girando sutilmente */
@keyframes hero-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.hero-crosshair { animation: hero-spin 22s linear infinite; }

@media (prefers-reduced-motion: reduce) {
    .hero-grid, .hero-glow, .hero-skin-main,
    .hero-card-a, .hero-card-b, .hero-particle, .hero-crosshair {
        animation: none !important;
    }
}

/* Timer PIX */
.timer-critico {
    color: #f87171;
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}
