/* --- FONTES E ESTILOS GERAIS --- */
.oswald {
    font-family: "Oswald", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    letter-spacing: -2px;
}

body {
    font-family: 'Poppins', sans-serif;
}

/* --- CONTADOR NUMÉRICO --- */
.numCounter {
    display: block;
    box-sizing: content-box;
    height: 90px;
    line-height: 90px;
    font-weight: bold;
    white-space: normal;
    font-size: 80px;
    font-family: 'Fjalla One', Arial, sans-serif;
    overflow: hidden;
    padding: 0.4em;
    text-align: center;
    border-radius: 10px;
    background: linear-gradient(180deg, rgb(88 88 88), rgb(112 112 112));
    box-shadow: 0px 0px 3px rgb(0, 0, 0, .9);
    /* color: white; */
    text-shadow: 0 0 2px #FFF;
    transition: all 0.3s ease-in-out;
}

.numCounter > div {
    display: inline-block;
    vertical-align: top;
    height: 100%;
}

.numCounter > div > b {
    display: inline-block;
    width: 64px;
    height: 100%;
    /* margin: 0 0.1em; */
    /* border-radius: 8px; */
    text-align: center;
    /* text-shadow: 2px 1px 3px rgba(0, 0, 0, 0.2); */
    /* box-shadow: 0px 0px 1px 2px rgba(255, 255, 255, 0.12); */
    overflow: hidden;
    color: rgb(255, 255, 255);
    transition: width 0.3s ease-in-out;
}

.numCounter > div > b::before {
    content: ' 0 1 2 3 4 5 6 7 8 9 ';
    display: block;
    word-break: break-all;
    transition: 0.5s cubic-bezier(.75, .15, .6, 1.15);
}

.numCounter b[data-value="0"]::before { margin-top: 0; }
.numCounter b[data-value="1"]::before { margin-top: -90px; }
.numCounter b[data-value="2"]::before { margin-top: -180px; }
.numCounter b[data-value="3"]::before { margin-top: -270px; }
.numCounter b[data-value="4"]::before { margin-top: -360px; }
.numCounter b[data-value="5"]::before { margin-top: -450px; }
.numCounter b[data-value="6"]::before { margin-top: -540px; }
.numCounter b[data-value="7"]::before { margin-top: -630px; }
.numCounter b[data-value="8"]::before { margin-top: -720px; }
.numCounter b[data-value="9"]::before { margin-top: -810px; }

/* --- NOVOS ESTILOS PARA BARRA DE PROGRESSO --- */
.progress-bar-container {
    position: relative;
    width: 100%;
    background-color: #e5e7eb; /* bg-gray-200 */
    border-radius: 9999px; /* rounded-full */
    height: 10px; /* Altura da barra - um pouco mais fina */
}

#progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease-in-out;
    z-index: 1; /* Fica atrás dos marcadores */
}

.goal-marker {
    position: absolute;
    top: 50%;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    transition: all 0.5s ease-in-out;
    background: #e5e7eb;
    border: 2px solid #e5e7eb;;
}

/* Estilo para metas alcançadas */
.goal-marker.reached {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    /* Aplica o mesmo gradiente da barra de progresso */
    background: linear-gradient(to right, #4ade80, #3b82f6);
    border: 2px solid white; /* Borda branca para destaque */
    box-shadow: 0 0 8px rgba(0,0,0,0.2); /* Sombra para dar profundidade */
}

/* Adicionamos a transição apenas para os temas com cor sólida */
body.theme-initial,
body.theme-goal-1,
body.theme-goal-2,
body.theme-goal-3 {
    transition: background-color 0.5s ease-in-out;
}

/* --- TEMAS DE FUNDO PARA METAS --- */
body.theme-initial { background-color: #f3f4f6; }
body.theme-goal-1 { background-color: #e0f2fe; }
body.theme-goal-2 { background-color: #dcfce7; }
body.theme-goal-3 { background-color: #fef3c7; }
body.theme-final {
    background: linear-gradient(-45deg, #FFD700, #F0E68C, #B8860B, #DAA520);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
} 

/* Estilo para Meta 1 (Fundo Azul Claro) */
.theme-goal-1 .numCounter {
    background: linear-gradient(180deg, #4f46e5, #3b82f6); /* Gradiente de Azul/Índigo */ 
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4); /* Sombra azulada */
}
.theme-goal-1 .numCounter > div > b {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Estilo para Meta 2 (Fundo Verde Claro) */
.theme-goal-2 .numCounter {
    background: linear-gradient(180deg, #16a34a, #22c55e); /* Gradiente de Verde */
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.4); /* Sombra esverdeada */
}
.theme-goal-2 .numCounter > div > b {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}


/* Estilo para Meta 3 (Fundo Amarelo Claro) */
.theme-goal-3 .numCounter {
    background: linear-gradient(180deg, #d97706, #f59e0b); /* Gradiente de Âmbar/Laranja */
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4); /* Sombra alaranjada */
}
.theme-goal-3 .numCounter > div > b {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}


/* Estilo para Meta Final (Fundo com Gradiente Animado) */
.theme-final .numCounter {
    background: linear-gradient(180deg, #FFD700, #FF8C00); /* Gradiente de Ouro para Laranja Escuro */
    border: 2px solid white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5); /* Brilho branco */
}
.theme-final .numCounter > div > b {
    color: #FFFACD; /* Um branco levemente esverdeado para combinar */
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8); /* Efeito de brilho no texto */
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.theme-final footer p {
    color: white;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

/* --- AJUSTES DE RESPONSIVIDADE PARA TELAS PEQUENAS --- */
@media (max-width: 480px) {
    .numCounter {
        height: 50px;
        line-height: 50px;
        font-size: 36px;
        padding: 0.2em;
    }

    .numCounter > div > b {
        width: 36px;
        margin: 0 0.05em;
    }

    /* É preciso recalcular os 'margin-top' para a nova altura de 50px */
    .numCounter b[data-value="1"]::before { margin-top: -50px; }
    .numCounter b[data-value="2"]::before { margin-top: -100px; }
    .numCounter b[data-value="3"]::before { margin-top: -150px; }
    .numCounter b[data-value="4"]::before { margin-top: -200px; }
    .numCounter b[data-value="5"]::before { margin-top: -250px; }
    .numCounter b[data-value="6"]::before { margin-top: -300px; }
    .numCounter b[data-value="7"]::before { margin-top: -350px; }
    .numCounter b[data-value="8"]::before { margin-top: -400px; }
    .numCounter b[data-value="9"]::before { margin-top: -450px; }
    
    h1.oswald {
        font-size: 2.5rem; /* ~40px */
    }

    .w-full.max-w-4xl {
        padding: 1rem; /* 16px */
    }
}